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

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 21 17:40:46 UTC 2020


 loleaflet/src/control/Control.JSDialogBuilder.js |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit e6d420b906ff8bbcffbde74e0d9c7217f3675bd3
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Feb 21 16:36:24 2020 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Feb 21 18:40:28 2020 +0100

    mobilewizard: Allow icons even for the toplevel menubar entries.
    
    Change-Id: Ic16e9a3b6a54dc06a6c443d9b102cf2a87170ac7
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89227
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index affce90ce..45a00d502 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -349,10 +349,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		var sectionTitle = L.DomUtil.create('div', 'ui-header level-' + builder._currentDepth + ' mobile-wizard ui-widget', parentContainer);
 		$(sectionTitle).css('justify-content', 'space-between');
 
-
-		if (dataid === 'inserttable') {
-			var iconSpan = L.DomUtil.create('span', 'menu-entry-icon inserttable', sectionTitle);
-			var iconPath = 'images/lc_inserttable_mono.svg';
+		var commandName = dataid;
+		if (commandName && commandName.length && L.LOUtil.existsIconForCommand(commandName)) {
+			var iconSpan = L.DomUtil.create('span', 'menu-entry-icon ' + commandName.toLowerCase(), sectionTitle);
+			var iconPath = 'images/lc_' + commandName.toLowerCase() + '.svg';
 			icon = L.DomUtil.create('img', '', iconSpan);
 			icon.src = iconPath;
 			icon.alt = '';
@@ -1443,7 +1443,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 
 	_subMenuHandler: function(parentContainer, data, builder) {
 		var title = data.text;
-		builder._explorableMenu(parentContainer, title, data.children, builder);
+		builder._explorableMenu(parentContainer, title, data.children, builder, undefined, data.id);
 
 		return false;
 	},


More information about the Libreoffice-commits mailing list