From b57868b1e4d125b946028a4e57b64ebd8eb59f2d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 27 Aug 2024 11:43:01 +0000 Subject: [PATCH] Bug 37748: In Bootstrap 5 "disabled" class must be on anchor tag, not list item This patch revises the markup for disabled dropdown menu items to conform to Bootstrap 5 requirements. The patch also revises many instances of Bootstrap tooltips which were not working -- tooltips which should be shown with many of the disable dropdown items. In BS5, a tooltip can't be attached to a disabled link. Instead the tooltip must be attached to the link's container. These changes also include the addition of "aria-disabled='true'" to the disabled menu items. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../prog/css/src/_variables.scss | 2 +- .../prog/css/src/staff-global.scss | 10 ---- .../en/includes/budgets-admin-toolbar.inc | 45 +++++++------- .../prog/en/includes/cat-toolbar.inc | 22 +++---- .../prog/en/includes/clubs-table.inc | 4 +- .../intranet-tmpl/prog/en/includes/header.inc | 2 +- .../prog/en/includes/members-toolbar.inc | 60 ++++++++++++++----- .../prog/en/includes/serials-toolbar.inc | 8 ++- .../prog/en/modules/admin/aqbudgetperiods.tt | 22 +++---- .../prog/en/modules/admin/aqbudgets.tt | 10 +++- .../en/modules/admin/marc-overlay-rules.tt | 1 + .../prog/en/modules/catalogue/itemsearch.tt | 1 + .../prog/en/modules/clubs/clubs.tt | 3 + .../prog/en/modules/tools/export.tt | 12 +++- .../prog/en/modules/tools/stockrotation.tt | 4 +- .../prog/en/modules/tools/upload.tt | 12 ++-- koha-tmpl/intranet-tmpl/prog/js/catalog.js | 10 ++-- .../prog/js/messaging-preference-form.js | 2 +- .../prog/js/pages/stockrotation.js | 1 + .../intranet-tmpl/prog/js/serials-toolbar.js | 1 + .../bootstrap/en/includes/masthead.inc | 2 +- 21 files changed, 137 insertions(+), 97 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss index 65ae2a556d..1cf18685d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_variables.scss @@ -1259,7 +1259,7 @@ $dropdown-divider-bg: $dropdown-border-color; $dropdown-divider-margin-y: 0; // $spacer * .5; $dropdown-box-shadow: 0 6px 12px rgba(0,0,0,0.3); // var(--#{$prefix}box-shadow); -$dropdown-link-color: $link-color; // var(--#{$prefix}body-color); +$dropdown-link-color: var(--#{$prefix}body-color); $dropdown-link-hover-color: $dropdown-link-color; $dropdown-link-hover-bg: $gray-300; // var(--#{$prefix}tertiary-bg); diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 1c6d0389e0..53d1e6fc4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -95,16 +95,6 @@ $enable-dark-mode: false; margin-top: -1px; } -.btn-group { - .dropdown-item { - color: #000; - - &:active { - color: #FFF; - } - } -} - .page-section { @include card; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc index 535ca9e500..469d6332e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc @@ -5,8 +5,8 @@