diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-08-11 17:15:08 +0200 |
---|---|---|
committer | Ansuel Smith <ansuelsmth@gmail.com> | 2021-08-17 16:47:11 +0200 |
commit | 05d100442bbdb18c57a768abddad3221a3fd22a0 (patch) | |
tree | dcbc23d84a0c4b690e14a103496743f6a7a0e2cf /themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js | |
parent | 031424c0d31b726d445bbb824373661ca1b9a905 (diff) |
luci-theme-material: add support for modmenu
Improve support for modmenu.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js')
-rw-r--r-- | themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |