From 05d100442bbdb18c57a768abddad3221a3fd22a0 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Wed, 11 Aug 2021 17:15:08 +0200 Subject: luci-theme-material: add support for modmenu Improve support for modmenu. Signed-off-by: Ansuel Smith --- .../htdocs/luci-static/resources/menu-material.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js') diff --git a/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js b/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js index 3499d5d19f..a994c4f463 100644 --- a/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js +++ b/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js @@ -117,12 +117,12 @@ return baseclass.extend({ if (isActive) this.renderMainMenu(children[i], children[i].name); - if (i > 0 || i < children.length) + if (i > 0 && i < children.length) ul.appendChild(E('li', {'class': 'divider'}, [E('span')])) } - if (ul.children.length > 1) - ul.style.display = ''; + if (children.length > 1) + ul.parentElement.style.display = ''; }, renderTabMenu: function(tree, url, level) { -- cgit v1.2.3