git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
01a0ec3
)
luci-theme-material: fix wrong active state on common prefix node
author
Liangbin Lian
<redacted>
Wed, 21 Apr 2021 10:00:48 +0000
(18:00 +0800)
committer
Liangbin Lian
<redacted>
Wed, 21 Apr 2021 10:00:48 +0000
(18:00 +0800)
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 <redacted>
themes/luci-theme-material/htdocs/luci-static/material/js/script.js
patch
|
blob
|
history
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 1a5fce4e2db8ce43925128fd0acc006551b66c77..8ffb6b923fbe3a2494571cb8f851cf716867e49e 100755
(executable)
--- 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();
git clone https://git.99rst.org/PROJECT