summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2020-03-19 11:23:18 +0100
committerAndras Timar <andras.timar@collabora.com>2020-03-19 16:37:23 +0100
commit0d531cc0b5fb14509c4e3d0684fd082f93808b44 (patch)
tree230cfd3497f577acb0bfa2c1fe4f2cd9dd37ce7f
parent4f59ad57f11ad2cfb2f4d89c4f946f7b791139cb (diff)
mobile: add a method to generate ID for submenus.
Change-Id: I45c2865573eb6b9d070fc6c36f4f1369e2ac3172 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90739 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
-rw-r--r--loleaflet/src/control/Control.JSDialogBuilder.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index f0171fb41..e6c8f5eeb 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1658,6 +1658,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
});
+L.Control.JSDialogBuilder.generateIDForSubMenu = function(menuStructure) {
+ if (menuStructure['text'] === 'Anchor')
+ menuStructure['id'] = 'submenu_anchor';
+};
+
L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainMenu, itemCommand) {
if (itemCommand.includes('sep'))
return null;
@@ -1706,6 +1711,7 @@ L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainM
element = this.getMenuStructureForMobileWizard(menu.items[menuItem], false, menuItem);
if (element)
menuStructure['children'].push(element);
+ this.generateIDForSubMenu(menuStructure);
}
}