From 761909f0f8a6ee326390149488a9c76d62964b52 Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Sun, 19 Feb 2023 20:27:22 -0500 Subject: [PATCH] Updated client-side navigation matching to only compare the base path without the query string. --- powerdnsadmin/static/custom/js/custom.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/powerdnsadmin/static/custom/js/custom.js b/powerdnsadmin/static/custom/js/custom.js index 0f096bf..8b6d078 100644 --- a/powerdnsadmin/static/custom/js/custom.js +++ b/powerdnsadmin/static/custom/js/custom.js @@ -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');