[Libreoffice-commits] online.git: loleaflet/js

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 5 12:50:17 UTC 2019


 loleaflet/js/toolbar.js |   31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 8418d43e8974350c84f25bc8d0d21d9688d33a8e
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Jan 15 16:09:47 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Mar 5 08:49:34 2019 -0400

    loleaflet: filter mobile toolbar event listeners
    
    Change-Id: Iba4fc6f81b6efa5aae15f7964037e490385d2adb

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index b8587e79c..51fb07db0 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -2547,24 +2547,27 @@ function setupToolbar(e) {
 		}
 	});
 
-	map.on('updatetoolbarcommandvalues', function() {
-		w2ui['editbar'].refresh();
-	});
 
-	map.on('showbusy', function(e) {
-		w2utils.lock(w2ui['actionbar'].box, e.label, true);
-	});
+	if (!window.mode.isMobile()) {
+		map.on('updatetoolbarcommandvalues', function() {
+			w2ui['editbar'].refresh();
+		});
 
-	map.on('hidebusy', function() {
-		// If locked, unlock
-		if (w2ui['actionbar'].box.firstChild.className === 'w2ui-lock') {
-			w2utils.unlock(w2ui['actionbar'].box);
-		}
-	});
+		map.on('showbusy', function(e) {
+			w2utils.lock(w2ui['actionbar'].box, e.label, true);
+		});
 
-	map.on('doclayerinit', onDocLayerInit);
+		map.on('hidebusy', function() {
+			// If locked, unlock
+			if (w2ui['actionbar'].box.firstChild.className === 'w2ui-lock') {
+				w2utils.unlock(w2ui['actionbar'].box);
+			}
+		});
+
+		map.on('doclayerinit', onDocLayerInit);
+		map.on('updatepermission', onUpdatePermission);
+	}
 	map.on('wopiprops', onWopiProps);
-	map.on('updatepermission', onUpdatePermission);
 	map.on('commandresult', onCommandResult);
 	map.on('updateparts pagenumberchanged', onUpdateParts);
 	map.on('commandstatechanged', onCommandStateChanged);


More information about the Libreoffice-commits mailing list