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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Sun Dec 1 15:33:19 UTC 2019


 loleaflet/src/control/Control.ContextMenu.js |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 5aaca986d08da1109fddbe8faf5835d1bf8f4aca
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Fri Nov 29 14:19:50 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sun Dec 1 16:33:01 2019 +0100

    SpellingPopup: disable dialog items on mobile.
    
    Change-Id: I7e48ccfbcf007db1b4310cad14d230360860a966
    Reviewed-on: https://gerrit.libreoffice.org/84156
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index caad6dcc4..a5bf98ad9 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -54,8 +54,13 @@ L.Control.ContextMenu = L.Control.extend({
 
 			presentation: [],
 			drawing: []
-		}
+		},
 		// UNOCOMMANDS_EXTRACT_END <- don't remove this line, it's used by unocommands.py
+
+		// This black list contains those menu items which should be disabled on mobile even if they
+		// are allowed in general. We need to have only those items here which are also part
+		// of the whitelist, otherwise the menu items are not visible anyway.
+		mobileBlackList: ['SpellingAndGrammarDialog', 'FontDialog', 'FontDialogForParagraph']
 	},
 
 
@@ -166,6 +171,9 @@ L.Control.ContextMenu = L.Control.extend({
 					continue;
 				}
 
+				if (window.mode.isMobile() && this.options.mobileBlackList.indexOf(commandName) !== -1)
+					continue;
+
 				if (this._map.getDocType() == 'spreadsheet' && commandName == 'ShowNote') {
 					if (this._map._docLayer.isCurrentCellCommentShown())
 						item.command = '.uno:HideNote';


More information about the Libreoffice-commits mailing list