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

New commits:
commit e6d420b906ff8bbcffbde74e0d9c7217f3675bd3
Author:     Jan Holesovsky <ke...@collabora.com>
AuthorDate: Fri Feb 21 16:36:24 2020 +0100
Commit:     Jan Holesovsky <ke...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Jan Holesovsky <ke...@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;
        },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to