mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Expand and highlight parent menu item when active page sidebar navigation item is a sub menu
This commit is contained in:
@@ -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