[Libreoffice-commits] online.git: 2 commits - loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 10 15:51:34 UTC 2019
loleaflet/src/control/Control.LokDialog.js | 2 +-
loleaflet/src/control/Control.MobileWizard.js | 7 +++++++
loleaflet/src/layer/tile/TileLayer.js | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 4ca6a57ca5c588cc919c462bd569aaf6cef30d12
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Oct 10 16:57:27 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Oct 10 17:51:11 2019 +0200
jsdialog: close after click on document
and uncheck toolbar item
Change-Id: I8e427fa9697132add9bd0b9e5c06970ab7e9f850
diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index 6cbb4e68e..b3600cdc6 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -51,6 +51,13 @@ L.Control.MobileWizard = L.Control.extend({
$('#mobile-wizard-content').empty();
$('#toolbar-down').show();
this._isActive = false;
+ if (window.mobileWizard === true) {
+ var toolbar = w2ui['actionbar'];
+ if (toolbar && toolbar.get('mobile_wizard').checked)
+ toolbar.uncheck('mobile_wizard');
+ this.map.sendUnoCommand('.uno:Sidebar');
+ window.mobileWizard = false;
+ }
},
_hideKeyboard: function() {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 1609b9ed0..ec5a74c98 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -446,6 +446,7 @@ L.TileLayer = L.GridLayer.extend({
}
else if (textMsg.startsWith('cellcursor:')) {
this._onCellCursorMsg(textMsg);
+ this._closeMobileWizard();
}
else if (textMsg.startsWith('celladdress:')) {
this._onCellAddressMsg(textMsg);
@@ -464,6 +465,7 @@ L.TileLayer = L.GridLayer.extend({
}
else if (textMsg.startsWith('invalidatecursor:')) {
this._onInvalidateCursorMsg(textMsg);
+ this._closeMobileWizard();
}
else if (textMsg.startsWith('invalidatetiles:')) {
var payload = textMsg.substring('invalidatetiles:'.length + 1);
commit 9d98ed11c65be89954524bb7f857613b2d41a896
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Oct 10 17:30:51 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Oct 10 17:51:11 2019 +0200
Be sure sidebar is not shown on mobile
Change-Id: I776c87754979dbfcea66dc067f07e5474e2872aa
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 30eebeaa0..b346eb3f2 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -261,7 +261,7 @@ L.Control.LokDialog = L.Control.extend({
// When left/top are invalid, the dialog shows in the center.
this._launchDialog(e.id, left, top, width, height, e.title);
} else if (e.winType === 'deck') {
- if (window.mobileWizard !== true) {
+ if (!window.mode.isMobile()) {
this._launchSidebar(e.id, width, height);
}
} else if (e.winType === 'child') {
More information about the Libreoffice-commits
mailing list