Merge pull request #5000 from jjm2473/fix-luci-theme-material-nav-node-active

luci-theme-material: fix wrong active state on common prefix node
This commit is contained in:
Jo-Philipp Wich 2021-05-25 11:38:35 +02:00 committed by GitHub
commit 385df16584
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();