diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-05-25 11:38:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 11:38:35 +0200 |
commit | 385df16584e789dc2f35c0b94b553baee5be9561 (patch) | |
tree | e0b589b215ec2776d7dbefb7e30f4f4c37aa23f6 | |
parent | 398932f39b3a86ea4f7d25e18d1683acc8e76ea3 (diff) | |
parent | 97d50d2c6b80805cd7e513eeafc8b62fef4ab1b6 (diff) |
Merge pull request #5000 from jjm2473/fix-luci-theme-material-nav-node-active
luci-theme-material: fix wrong active state on common prefix node
-rwxr-xr-x | themes/luci-theme-material/htdocs/luci-static/material/js/script.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js index 1a5fce4e2d..8ffb6b923f 100755 --- a/themes/luci-theme-material/htdocs/luci-static/material/js/script.js +++ b/themes/luci-theme-material/htdocs/luci-static/material/js/script.js @@ -68,7 +68,7 @@ document.addEventListener('luci-loaded', function(ev) { var that = $(this); var href = that.attr("href"); - if (href.indexOf(nodeUrl) != -1) { + if (href.endsWith(nodeUrl) || href.indexOf('/' + nodeUrl + '/') != -1) { ulNode.click(); ulNode.next(".slide-menu").stop(true, true); lastNode = that.parent(); |