From f7af55d22e292c1bccb573e6a5b481ad7c0d3724 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Jul 2023 13:03:22 +0000 Subject: [PATCH] Bug 34323: Enhance header search icon for more options This patch modifies header search forms which have a "more options" icon, adding a title attribute to the control and "aria-hidden" to the Font Awesome icons. I've added a bit of CSS and JS to change the appearance of the icon when it is clicked to expand the panel of options. To test, apply the patch and rebuild the staff interface CSS. - Test pages which have a "more options" icon in the search header: - Home -> Catalog search tab, with IntranetCatalogSearchPulldown enabled. - Acquisitions -> Orders search tab - Authorities -> All search tabs - Administration -> Budgets - Patrons -> Patron search tab - Serials -> Subscription search tab - On all these pages, hovering your mouse over the icon in the search form should trigger a "More options" title. - Clicking the icon should expand the panel, and the icon should be now have a highlighted style. - Clicking the icon to collapse the panel should return the icon to its original state. Signed-off-by: Sam Lau --- koha-tmpl/intranet-tmpl/prog/css/src/_header.scss | 9 +++++++++ .../prog/en/includes/acquisitions-search.inc | 2 +- .../prog/en/includes/authorities-search.inc | 8 ++++---- .../prog/en/includes/budgets-admin-search.inc | 2 +- .../prog/en/includes/catalogue-search-box.inc | 2 +- .../intranet-tmpl/prog/en/includes/member-search-box.inc | 2 +- .../intranet-tmpl/prog/en/includes/serials-search.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 2 ++ 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss index 8234f8a023..a3d68cebbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss @@ -186,6 +186,15 @@ a.navbar-toggle { &:hover { opacity: 1; } + + &.extra-content-open { + color: $background-color-secondary; + opacity: 1; + + .form-extra-content-icon { + text-shadow: 0 0 5px #ffe300; + } + } } input[type="submit"], diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc index bb7cfddd61..5c798bf599 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -23,7 +23,7 @@
- +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index e8cffd5e3f..0aeb8ae88f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -86,7 +86,7 @@
- +
@@ -113,7 +113,7 @@
- +
@@ -138,7 +138,7 @@
- +
@@ -165,7 +165,7 @@
- +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc index e1703c53cb..7e901d9a4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc @@ -15,7 +15,7 @@
- +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc index 33764470a4..b17571bbb9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc @@ -20,7 +20,7 @@ [% END %] [% IF Koha.Preference('IntranetCatalogSearchPulldown') || Koha.Preference('IntranetAddMastheadLibraryPulldown') %] - + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc index 42543b2a1e..cd4f866dac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc @@ -24,7 +24,7 @@ [% END %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc index 812387dcf9..519f79a953 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc @@ -21,7 +21,7 @@ [% END %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index abb3193bd7..524353efad 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -101,8 +101,10 @@ $(document).ready(function() { const extraContent = $(this).closest('form').find('.form-extra-content'); if (extraContent.is(':visible')) { extraContent.hide(); + $(this).removeClass("extra-content-open"); } else { extraContent.show(); + $(this).addClass("extra-content-open"); } }); -- 2.30.2