From df34496aa2a2f233b8395827709588b9f8ffea03 Mon Sep 17 00:00:00 2001 From: Benedek Farkas Date: Wed, 20 Nov 2024 14:30:14 +0100 Subject: [PATCH] Fixing conflict between lists and container admin navicon by applying the unused menu.list-definition.png to lists --- src/Orchard.Web/Core/Containers/AdminMenu.cs | 2 +- .../Styles/menu.container-admin.css | 19 ++---------------- .../Modules/Orchard.Lists/AdminMenu.cs | 2 +- .../Orchard.Lists/Orchard.Lists.csproj | 3 ++- ...enu.list-definition.png => menu.lists.png} | Bin .../Orchard.Lists/Styles/menu.lists-admin.css | 7 +++++++ 6 files changed, 13 insertions(+), 20 deletions(-) rename src/Orchard.Web/Modules/Orchard.Lists/Styles/images/{menu.list-definition.png => menu.lists.png} (100%) create mode 100644 src/Orchard.Web/Modules/Orchard.Lists/Styles/menu.lists-admin.css diff --git a/src/Orchard.Web/Core/Containers/AdminMenu.cs b/src/Orchard.Web/Core/Containers/AdminMenu.cs index d87e4221d..b5fe4cd3b 100644 --- a/src/Orchard.Web/Core/Containers/AdminMenu.cs +++ b/src/Orchard.Web/Core/Containers/AdminMenu.cs @@ -76,7 +76,7 @@ namespace Orchard.Core.Containers { item.Action(containerMetadata.AdminRouteValues); item.Action(containerMetadata.AdminRouteValues); - item.AddClass("nav-list"); + item.AddClass("section-container"); item.AddClass(closureContainer.AdminMenuText.HtmlClassify()); item.LinkToFirstChild(false); diff --git a/src/Orchard.Web/Core/Containers/Styles/menu.container-admin.css b/src/Orchard.Web/Core/Containers/Styles/menu.container-admin.css index f8198846b..a795a07ce 100644 --- a/src/Orchard.Web/Core/Containers/Styles/menu.container-admin.css +++ b/src/Orchard.Web/Core/Containers/Styles/menu.container-admin.css @@ -1,22 +1,7 @@ -.navicon-list, -.navicon-lists, -.section-new .subnavicon-list, -.nav-list > h3 > a, -.nav-list-definition > h3 > a { +.menu-admin > .section-container > h3 > a { background-image: url(images/menu.container.png) !important; } -.navicon-list:hover, -.navicon-lists:hover, -.nav-list > h3 > a:hover, -.nav-list-definition > h3 > a:hover { +.menu-admin > .section-container > h3 > a:hover { background-position: 0 -30px !important; } - -.navicon-lists { - background-image: url(images/menu.container.png) !important; -} - -.navicon-lists:hover { - background-position: 0 -30px !important; -} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/Orchard.Lists/AdminMenu.cs b/src/Orchard.Web/Modules/Orchard.Lists/AdminMenu.cs index 7e0c01c1d..eb2ad4627 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/AdminMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.Lists/AdminMenu.cs @@ -8,7 +8,7 @@ namespace Orchard.Lists { public void GetNavigation(NavigationBuilder builder) => builder - .AddImageSet("container") + .AddImageSet("lists") .Add(T("Lists"), "11", item => item .Action("Index", "Admin", new { area = "Orchard.Lists" }).Permission(Permissions.ManageLists)); } diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj b/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj index 523ce376c..f8b3eb32f 100644 --- a/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj +++ b/src/Orchard.Web/Modules/Orchard.Lists/Orchard.Lists.csproj @@ -115,6 +115,7 @@ + @@ -143,7 +144,7 @@ orchard-lists-admin.js - + diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Styles/images/menu.list-definition.png b/src/Orchard.Web/Modules/Orchard.Lists/Styles/images/menu.lists.png similarity index 100% rename from src/Orchard.Web/Modules/Orchard.Lists/Styles/images/menu.list-definition.png rename to src/Orchard.Web/Modules/Orchard.Lists/Styles/images/menu.lists.png diff --git a/src/Orchard.Web/Modules/Orchard.Lists/Styles/menu.lists-admin.css b/src/Orchard.Web/Modules/Orchard.Lists/Styles/menu.lists-admin.css new file mode 100644 index 000000000..2199b6ee8 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.Lists/Styles/menu.lists-admin.css @@ -0,0 +1,7 @@ +.navicon-lists { + background-image: url(images/menu.lists.png) !important; +} + +.navicon-lists:hover { + background-position: 0 -30px !important; +}