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>
(cherry picked from commit 97d50d2c6b
)
This commit is contained in:
parent
19de3acdde
commit
ac0bcc2d10
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue