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

Tamás Zolnai (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 3 13:40:46 UTC 2019


 loleaflet/src/control/Control.ContextMenu.js     |    3 +++
 loleaflet/src/control/Control.JSDialogBuilder.js |    4 ++++
 2 files changed, 7 insertions(+)

New commits:
commit 3e6ea32f91fde345a12cb130c5b5c0870a9e3905
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Tue Dec 3 13:03:01 2019 +0100
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Tue Dec 3 14:40:28 2019 +0100

    Spelling context menu, mobile: Show a tick mark next to the selected entry.
    
    Change-Id: Id934e1608e3dccbbd0bf05cfdcaa1eb30dd90fe3
    Reviewed-on: https://gerrit.libreoffice.org/84340
    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 b2e9b58ae..87f2ad02a 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -276,6 +276,9 @@ L.Control.ContextMenu = L.Control.extend({
 		};
 		if (itemCommand)
 			menuStructure['command'] = itemCommand;
+		if (menu.icon)
+			menuStructure['checked'] = true;
+
 		if (mainMenu) {
 			for (var menuItem in menu) {
 				var element = this.getMenuStructureForMobileWizard(menu[menuItem], false, menuItem);
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index b7e3bfa9e..b7e1ebec9 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1384,6 +1384,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 			icon = L.DomUtil.create('img', '', iconSpan);
 			icon.src = iconPath;
 		}
+		if (data.checked && data.checked === true) {
+			$(menuEntry).css('background', 'url(images/lc_listitem-selected.svg) no-repeat right');
+		}
+
 		var titleSpan = L.DomUtil.create('span', '', menuEntry);
 		titleSpan.innerHTML = title;
 		var paddingClass = icon ? 'menu-entry-with-icon' : 'menu-entry-no-icon';


More information about the Libreoffice-commits mailing list