Updated client-side navigation matching to only compare the base path without the query string.

This commit is contained in:
Matt Scott 2023-02-19 20:27:22 -05:00
parent e960326a58
commit 761909f0f8

View File

@ -291,14 +291,13 @@ function copy_otp_secret_to_clipboard() {
// Side menu nav bar active selection
/** add active class and stay opened when selected */
var url = window.location;
// for sidebar menu entirely but not cover treeview
$('ul.nav-sidebar a').filter(function() {
return this.href == url;
return this.href == window.location.href.split('?')[0];
}).addClass('active');
// for treeview
$('ul.nav-treeview a').filter(function() {
return this.href == url;
return this.href == window.location.href.split('?')[0];
}).parentsUntil(".nav-sidebar > .nav-treeview").addClass('menu-open').prev('a').addClass('active');