diff options
author | Liangbin Lian <jjm2473@gmail.com> | 2021-04-21 18:00:48 +0800 |
---|---|---|
committer | Liangbin Lian <jjm2473@gmail.com> | 2021-04-21 18:00:48 +0800 |
commit | 97d50d2c6b80805cd7e513eeafc8b62fef4ab1b6 (patch) | |
tree | 6445fe47925e949a55f5c9f4b6463d17953cc958 /themes/luci-theme-material | |
parent | 01a0ec3e6874bff1e17d9d2085d86d1ad03702f7 (diff) |
luci-theme-material: fix wrong active state on common prefix node
Before fixed, if we have two nodes: 'services/ddns' and 'services/ddnsto',
click any one of they, will show they all actived.
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
Diffstat (limited to 'themes/luci-theme-material')
-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(); |