From a5dd9e21cde7e29cf671c68251b94f8fdda64e51 Mon Sep 17 00:00:00 2001 From: Tatiana Ovchinnikova Date: Fri, 22 Apr 2022 11:45:11 -0500 Subject: [PATCH] Some tweaks to improve work with Material Theme Material Theme css tags differ from the ones from Default Theme, so the navigation we have doesn't work for some actions such as opening a new details page or reloading it, displaying breadcrumbs and menu panels. This patch adds some tweaks to fix that. Closes-Bug: #1968272 Change-Id: I18bd2e8515614463a911978879523744a9b059d7 --- .../framework/util/navigations/navigations.service.js | 2 ++ openstack_dashboard/themes/material/static/_styles.scss | 6 ++++++ .../themes/material/templates/horizon/_sidebar.html | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/horizon/static/framework/util/navigations/navigations.service.js b/horizon/static/framework/util/navigations/navigations.service.js index 5d7a3571ff..bd68c2c1c8 100644 --- a/horizon/static/framework/util/navigations/navigations.service.js +++ b/horizon/static/framework/util/navigations/navigations.service.js @@ -75,6 +75,8 @@ // open panelgroup on nav_bar if exists if (panelgroup.length) { panelgroup.removeClass("collapsed").attr("aria-expanded", true); + panelgroup.siblings("ul").addClass("in").attr("style", null); + panelgroup.siblings("ul").removeClass("collapsed").attr("aria-expanded", true); // get panelgroup label labels.push(panelgroup.text().trim()); } diff --git a/openstack_dashboard/themes/material/static/_styles.scss b/openstack_dashboard/themes/material/static/_styles.scss index 3feb2efa70..a31b632067 100644 --- a/openstack_dashboard/themes/material/static/_styles.scss +++ b/openstack_dashboard/themes/material/static/_styles.scss @@ -1,2 +1,8 @@ @import "bootstrap/styles"; @import "horizon/styles"; + +#sidebar { + .openstack-panel-group { + text-align: left; + } +} \ No newline at end of file diff --git a/openstack_dashboard/themes/material/templates/horizon/_sidebar.html b/openstack_dashboard/themes/material/templates/horizon/_sidebar.html index 9d7163d466..8414218762 100644 --- a/openstack_dashboard/themes/material/templates/horizon/_sidebar.html +++ b/openstack_dashboard/themes/material/templates/horizon/_sidebar.html @@ -21,7 +21,7 @@ {% with panels|has_permissions_on_list:user as filtered_panels %} {% if filtered_panels %} {% if group.name %} -