Merge pull request #427 from myst3k/ui-fix-duplicate-backup-path

UI fix duplicate path names for active menu detection
This commit is contained in:
Usman Nasir
2020-08-30 11:08:53 +05:00
committed by GitHub
2 changed files with 12 additions and 8 deletions

View File

@@ -883,11 +883,13 @@ $(document).ready(function() {
});
//automatically open the current path
var path = window.location.pathname.split('/');
path = path[path.length-1];
let path = window.location.pathname;
if (path !== undefined) {
$("#sidebar-menu").find("a[href$='" + path + "']").addClass('sfActive');
$("#sidebar-menu").find("a[href$='" + path + "']").parents().eq(3).superclick('show');
let menuItem = $("#sidebar-menu").find("a[href$='" + path + "']");
if (menuItem !== undefined) {
menuItem.addClass('sfActive');
menuItem.parents().eq(3).superclick('show');
}
}
});

View File

@@ -883,11 +883,13 @@ $(document).ready(function() {
});
//automatically open the current path
var path = window.location.pathname.split('/');
path = path[path.length-1];
let path = window.location.pathname;
if (path !== undefined) {
$("#sidebar-menu").find("a[href$='" + path + "']").addClass('sfActive');
$("#sidebar-menu").find("a[href$='" + path + "']").parents().eq(3).superclick('show');
let menuItem = $("#sidebar-menu").find("a[href$='" + path + "']");
if (menuItem !== undefined) {
menuItem.addClass('sfActive');
menuItem.parents().eq(3).superclick('show');
}
}
});