[Libreoffice-commits] online.git: 2 commits - loleaflet/dist
Pranav Kant
pranavk at collabora.com
Fri Apr 29 16:21:42 UTC 2016
loleaflet/dist/loleaflet.html | 1 +
loleaflet/dist/toolbar.css | 25 +++++++++++++++++++------
loleaflet/dist/toolbar/toolbar.js | 37 ++++++++++++++++++++++++++++++-------
3 files changed, 50 insertions(+), 13 deletions(-)
New commits:
commit 787bdc276f836875b04072cbb4b402a22d5909d1
Author: Pranav Kant <pranavk at collabora.com>
Date: Fri Apr 29 21:25:00 2016 +0530
bccu#1758: Move presentation control below slide sorter
Change-Id: I0f1046f55f4bdc8af209138a51e74e1b637a5a34
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index ee3aaf5..b547251 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -69,6 +69,7 @@
<div id="map"></div>
</div>
<div id="spreadsheet-toolbar"></div>
+ <div id="presentation-toolbar"></div>
<div id="toolbar-down"></div>
<script>
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 3178de7..0eb71f3 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -12,6 +12,7 @@
right: 0;
text-align: center;
padding: 10px;
+ z-index: 1000;
}
#toolbar-down {
@@ -21,6 +22,7 @@
padding: 0;
position: fixed;
bottom: 0;
+ z-index: 1000;
}
#toolbar-up-more {
@@ -41,7 +43,18 @@
position: absolute;
}
+#presentation-toolbar {
+ background: #DFDFDF;
+ left: 0;
+ text-align: center;
+ bottom: 28px;
+ width: 203px;
+ position: absolute;
+ z-index: 500;
+}
+
/* center the toolbar */
+#tb_presentation-toolbar_item_left,
#tb_toolbar-up_item_left,
#tb_formulabar_item_left {
width: 50%;
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 0128b2c..9d2075d 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -122,6 +122,20 @@ $(function () {
onClick(e.target);
}
});
+ $('#presentation-toolbar').w2toolbar({
+ name: 'presentation-toolbar',
+ items: [
+ { type: 'html', id: 'left' },
+ { type: 'button', id: 'presentation', img: 'presentation', hidden:true, hint: _("Fullscreen presentation") },
+ { type: 'button', id: 'insertpage', img: 'insertpage', hidden:true, hint: _("Insert Page") },
+ { type: 'button', id: 'duplicatepage', img: 'duplicatepage', hidden:true, hint: _("Duplicate Page") },
+ { type: 'button', id: 'deletepage', img: 'deletepage', hidden:true, hint: _("Delete Page") },
+ { type: 'html', id: 'right' }
+ ],
+ onClick: function (e) {
+ onClick(e.target);
+ }
+ });
$('#toolbar-down').w2toolbar({
name: 'toolbar-down',
items: [
@@ -135,12 +149,8 @@ $(function () {
{ type: 'button', id: 'searchprev', img: 'prev', hint: _("Search backwards"), disabled: true },
{ type: 'button', id: 'searchnext', img: 'next', hint: _("Search forward"), disabled: true },
{ type: 'button', id: 'cancelsearch', img: 'cancel', hint: _("Cancel the search"), hidden: true },
- { type: 'html', id: 'left' },
- { type: 'button', id: 'presentation', img: 'presentation', hint: _("Fullscreen presentation") },
- { type: 'button', id: 'insertpage', img: 'insertpage', hint: _("Insert Page") },
- { type: 'button', id: 'duplicatepage', img: 'duplicatepage', hint: _("Duplicate Page") },
- { type: 'button', id: 'deletepage', img: 'deletepage', hint: _("Delete Page") },
- { type: 'html', id: 'right' },
+ { type: 'html', id: 'left' },
+ { type: 'html', id: 'right' },
{ type: 'html', id: 'modifiedstatuslabel', html: '<div id="modifiedstatuslabel"></div>' },
{ type: 'break' },
{ type: 'button', id: 'takeedit', img: 'edit', hint: _("Take edit lock (others can only view)")},
@@ -203,6 +213,10 @@ function onClick(id) {
toolbar = w2ui['spreadsheet-toolbar'];
item = toolbar.get(id) ;
}
+ else if (w2ui['presentation-toolbar'].get(id) != null) {
+ toolbar = w2ui['presentation-toolbar'];
+ item = toolbar.get(id);
+ }
else if (id.indexOf(':') >= 0) {
// we just handle a menu item click,
// like File->Download as
@@ -555,7 +569,16 @@ map.on('updatepermission', function (e) {
var docType = map.getDocType();
if (docType !== 'text') {
toolbar.hide('writer:menu:file');
- if (docType === 'presentation' || docType === 'drawing') {
+ if (docType === 'presentation') {
+ toolbar.show('impress:menu:file');
+
+ toolbar = w2ui['presentation-toolbar'];
+ toolbar.show('presentation');
+ toolbar.show('insertpage');
+ toolbar.show('duplicatepage');
+ toolbar.show('deletepage');
+ }
+ else if (docType === 'drawing') {
toolbar.show('impress:menu:file');
}
else if (docType === 'spreadsheet') {
commit edd248e25cb3ca431f9c3854d5d49ac5515f3ce2
Author: Pranav Kant <pranavk at collabora.com>
Date: Fri Apr 29 18:36:51 2016 +0530
loleaflet: Fix indentation
Change-Id: I4996f235d20976e969ae48874d0a6c98ee212c43
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 3c70486..3178de7 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -1,10 +1,10 @@
#toolbar {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- padding-bottom: 15px;
- text-align: center;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ padding-bottom: 15px;
+ text-align: center;
}
#toolbar-up {
More information about the Libreoffice-commits
mailing list