mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Expand and highlight parent menu item when active page sidebar navigation item is a sub menu
This commit is contained in:
@@ -59,12 +59,12 @@ a.discrete-link:focus {
|
||||
.navbar-sidenav {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
border-top: 2px solid !important;
|
||||
}
|
||||
|
||||
.navbar-sidenav,
|
||||
.sidenav-second-level {
|
||||
background-color: #e5e5e5 !important;
|
||||
border-top: 2px solid !important;
|
||||
border-right: 2px solid !important;
|
||||
border-color: #d6d6d6 !important;
|
||||
}
|
||||
|
@@ -23,7 +23,14 @@ if (!Grocy.ActiveNav.isEmpty())
|
||||
{
|
||||
var menuItem = $('#sidebarResponsive').find("[data-nav-for-page='" + Grocy.ActiveNav + "']");
|
||||
menuItem.addClass('active-page');
|
||||
}
|
||||
|
||||
var parentMenuSelector = menuItem.data("sub-menu-of");
|
||||
if (typeof parentMenuSelector !== "undefined")
|
||||
{
|
||||
$(parentMenuSelector).collapse("show");
|
||||
$(parentMenuSelector).prev(".nav-link-collapse").addClass("active-page");
|
||||
}
|
||||
}
|
||||
|
||||
$.timeago.settings.allowFuture = true;
|
||||
RefreshContextualTimeago = function()
|
||||
|
Reference in New Issue
Block a user