diff --git a/Bootstrap.Admin/Models/NavigatorBarModel.cs b/Bootstrap.Admin/Models/NavigatorBarModel.cs index c9d1e8c7..05e6aaf5 100644 --- a/Bootstrap.Admin/Models/NavigatorBarModel.cs +++ b/Bootstrap.Admin/Models/NavigatorBarModel.cs @@ -1,8 +1,6 @@ using Bootstrap.DataAccess; using Bootstrap.Security; -using System; using System.Collections.Generic; -using System.Linq; namespace Bootstrap.Admin.Models { @@ -10,21 +8,10 @@ namespace Bootstrap.Admin.Models { public NavigatorBarModel(string url) { - Navigations = BootstrapMenu.RetrieveSystemMenus(UserName); + Navigations = BootstrapMenu.RetrieveSystemMenus(UserName, url); Applications = DictHelper.RetrieveApps(); - ActiveMenu(null, Navigations.ToList(), url); HomeUrl = "~/Admin/Index"; } - - private void ActiveMenu(BootstrapMenu parent, List menus, string url) - { - menus.ForEach(m => - { - m.Active = m.Url.Equals(url, StringComparison.OrdinalIgnoreCase) ? "active" : ""; - ActiveMenu(m, m.Menus.ToList(), url); - if (parent != null && m.Active != "") parent.Active = m.Active; - }); - } /// /// ///