[Libreoffice-commits] online.git: 2 commits - loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 16 09:11:40 UTC 2020


 loleaflet/src/control/Control.Toolbar.js     |    3 ---
 loleaflet/src/layer/tile/CalcTileLayer.js    |    4 ++++
 loleaflet/src/layer/tile/ImpressTileLayer.js |    6 ++++++
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 1d1651795c73a7f2b73bdb17b7e2926047ffcbee
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Apr 16 10:42:42 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Apr 16 11:11:34 2020 +0200

    Initialize sheets and formula bars only in Calc
    
    Change-Id: I4b27f21404e75ae22faa2bcf8a9dc27564f2dd56
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92337
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 5812d6a0b..529e0fa71 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -852,9 +852,7 @@ function createSigningBar() {
 
 function initNormalToolbar() {
 	createMainToolbar();
-	map.addControl(L.control.formulaBar({showfunctionwizard: true}));
 	createSigningBar();
-	map.addControl(L.control.sheetsBar({shownavigation: true}));
 }
 
 function setupSearchInput() {
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index bc4a30f3d..658b6362d 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -50,9 +50,13 @@ L.CalcTileLayer = L.TileLayer.extend({
 		map.on('AnnotationCancel', this._onAnnotationCancel, this);
 		map.on('AnnotationReply', this._onAnnotationReply, this);
 		map.on('AnnotationSave', this._onAnnotationSave, this);
+
 		if (window.mode.isMobile() || window.mode.isTablet()) {
 			this.onMobileInit(map);
 		}
+
+		map.addControl(L.control.sheetsBar({shownavigation: true}));
+		map.addControl(L.control.formulaBar({showfunctionwizard: true}));
 	},
 
 	clearAnnotations: function () {
commit 6b0fbeda6b61421aaa179e018a1651d326f85736
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Apr 16 10:42:03 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Apr 16 11:11:22 2020 +0200

    Initialize presentation bar only in Impress
    
    Change-Id: I50db46b0117b34cbbb0a95c59e8707be958c62a4
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92336
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 428b4c74b..5812d6a0b 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -855,7 +855,6 @@ function initNormalToolbar() {
 	map.addControl(L.control.formulaBar({showfunctionwizard: true}));
 	createSigningBar();
 	map.addControl(L.control.sheetsBar({shownavigation: true}));
-	map.addControl(L.control.presentationBar());
 }
 
 function setupSearchInput() {
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 886509798..933a89c77 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -60,6 +60,8 @@ L.ImpressTileLayer = L.TileLayer.extend({
 			L.DomUtil.toBack(container);
 			map.addControl(L.control.partsPreview(container, preview, {fetchThumbnail: false}));
 			L.DomUtil.addClass(mobileWizardContent, 'with-slide-sorter-above');
+		} else {
+			this.onDesktopAndTabletInit(map);
 		}
 	},
 
@@ -113,6 +115,10 @@ L.ImpressTileLayer = L.TileLayer.extend({
 		}
 	},
 
+	onDesktopAndTabletInit: function(map) {
+		map.addControl(L.control.presentationBar());
+	},
+
 	onMobileInit: function (map) {
 		map.addControl(L.control.mobileTopBar('presentation'));
 


More information about the Libreoffice-commits mailing list