[Libreoffice-commits] online.git: 2 commits - loleaflet/css loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 30 12:13:46 UTC 2019
loleaflet/css/spreadsheet.css | 3 +
loleaflet/css/toolbar.css | 1
loleaflet/src/control/Control.Toolbar.js | 48 ++++++++++++++--------------
loleaflet/src/layer/tile/WriterTileLayer.js | 1
4 files changed, 29 insertions(+), 24 deletions(-)
New commits:
commit 1df1275e3b7b78c5a0b1616c2adec384ec9f9fe1
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Sep 30 13:56:18 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Sep 30 14:13:39 2019 +0200
Show toolbars in edit mode on mobile
- fix position of rows container
- avoid using uninitialized 'toolbar' variable
- fire onUpdatePermission in Writer also...
Change-Id: I3a57c4185814d7784c591dfd9dcda7661d4adc72
Reviewed-on: https://gerrit.libreoffice.org/79853
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/css/spreadsheet.css b/loleaflet/css/spreadsheet.css
index a0059b07f..fe4db5847 100644
--- a/loleaflet/css/spreadsheet.css
+++ b/loleaflet/css/spreadsheet.css
@@ -74,7 +74,8 @@
}
#spreadsheet-row-column-frame.readonly {
- top: 36px;
+ top: 36px;
+ bottom: 0px;
}
#spreadsheet-row-column-frame.tablet {
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 0776c8e61..5f98160d0 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -2010,23 +2010,25 @@ function onUpdatePermission(e) {
});
}
- presentationButtons.forEach(function(id) {
- if (id === 'deletepage') {
- var itemState = map['stateChangeHandler'].getItemValue('.uno:DeletePage');
- } else if (id === 'insertpage') {
- itemState = map['stateChangeHandler'].getItemValue('.uno:InsertPage');
- } else if (id === 'duplicatepage') {
- itemState = map['stateChangeHandler'].getItemValue('.uno:DuplicatePage');
- } else {
- itemState = 'enabled';
- }
+ if (toolbar) {
+ presentationButtons.forEach(function(id) {
+ if (id === 'deletepage') {
+ var itemState = map['stateChangeHandler'].getItemValue('.uno:DeletePage');
+ } else if (id === 'insertpage') {
+ itemState = map['stateChangeHandler'].getItemValue('.uno:InsertPage');
+ } else if (id === 'duplicatepage') {
+ itemState = map['stateChangeHandler'].getItemValue('.uno:DuplicatePage');
+ } else {
+ itemState = 'enabled';
+ }
- if (itemState === 'enabled') {
- toolbar.enable(id);
- } else {
- toolbar.disable(id);
- }
- });
+ if (itemState === 'enabled') {
+ toolbar.enable(id);
+ } else {
+ toolbar.disable(id);
+ }
+ });
+ }
toolbar = w2ui['actionbar'];
if (toolbar) {
@@ -2041,15 +2043,15 @@ function onUpdatePermission(e) {
$('#toolbar-down').show();
switch (map._docLayer._docType) {
case 'text':
- $('#document-container').css('bottom', '33px');
+ $('#document-container').css('bottom', '35px');
break;
case 'spreadsheet':
- $('#document-container').css('bottom', '68px'); // FIXME this and spreadsheet-row-column-frame are supposed to be the same, but are not
- $('#spreadsheet-row-column-frame').css('bottom', '65px');
+ $('#document-container').css('bottom', '68px');
+ $('#spreadsheet-row-column-frame').css('bottom', '68px');
$('#spreadsheet-toolbar').show();
break;
case 'presentation':
- $('#document-container').css('bottom', '33px');
+ $('#document-container').css('bottom', '35px');
break;
}
}
@@ -2098,15 +2100,15 @@ function onUpdatePermission(e) {
$('#toolbar-down').hide();
switch (map._docLayer._docType) {
case 'text':
- $('#document-container').css('bottom', '0');
+ $('#document-container').css('bottom', '35px');
break;
case 'spreadsheet':
$('#document-container').css('bottom', '35px');
- $('#spreadsheet-row-column-frame').css('bottom', '0');
+ $('#spreadsheet-row-column-frame').css('bottom', '68px');
$('#spreadsheet-toolbar').show();
break;
case 'presentation':
- $('#document-container').css('bottom', '0');
+ $('#document-container').css('bottom', '35px');
break;
}
}
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js
index e5ffbca4c..7f5f57b4c 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -165,6 +165,7 @@ L.WriterTileLayer = L.TileLayer.extend({
}
});
+ map.on('updatepermission', window.onUpdatePermission);
},
onAnnotationModify: function (annotation) {
commit f97ae94410af0d5cf40b93301971989869c4eb07
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 13 16:38:01 2019 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Sep 30 14:13:27 2019 +0200
Hide close button by default
Change-Id: I44528a096849324d68304165f7698fcd7e3b4130
Reviewed-on: https://gerrit.libreoffice.org/69185
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/79852
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index b69c9bc23..0747e86a6 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -132,6 +132,7 @@ w2ui-toolbar {
width: 28px;
height: 28px;
background-color: white;
+ display: none;
}
#closebutton {
More information about the Libreoffice-commits
mailing list