From 2fa7ea7332d7045adfbefc35e12c0227eed01588 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 19 Jan 2023 19:04:53 +0000 Subject: [PATCH] Bug 32683: Convert header search tabs to Bootstrap This patch updates all search header include files so that they have Bootstrap tab markup instead of jQueryUI. jQueryUI-related JavaScript is updated to work with Bootstrap. To test, apply the patch and rebuild the staff interface CSS. Clear your browser cache if necessary. Test that keyboard shortcuts work correctly: Alt-U for circulation, Alt-R for returns, Alt-W for renewals, and Alt-Q for search. Each shortcut should either activate the correct search tab (if present on the page) or redirect you to that page. Cursor focus should be automatically placed in expanded header search form, whether it be on page load or when switching tabs. Test search header forms with additional search options work correctly: Clicking the "settings" icon should expand the panel with additional fields. Test at least one page which uses each include file: - acquisitions-search.inc - Acquisitions and related pages - adv-search.inc - Advanced catalog search - authorities-search.inc - Authorities and related pages - Check that the right tab is preselected after each kind of search, e.g. a search by "Main heading" should return a search results page where the "Main heading" tab is preselected. - budgets-admin-search.inc - Administration -> Budgets - cat-search.inc - Catalog search results, bibliographic details, etc. - cataloging-search.inc - Cataloging home page and cataloging search results - checkin-search.inc - Circulation -> Check in - circ-search.inc - Circulation -> Check out - cities-admin-search.inc - Administration -> Cities and towns - contracts-admin-search.inc - Acquisitions -> Vendor -> Contracts - currencies-admin-search.inc - Administration -> Currencies - desks-admin-search.inc - Administration -> Desks (must have UseCirculationDesks enabled) - erm-search.inc - ERM (must have ERMModule enabled) - home-search.inc - Staff interface home page - letters-search.inc - Tools -> Notices - patron-search-header.inc - Patron details, patron accounting, etc. - patrons-admin-search.inc - Administratoin -> Patron categories - prefs-admin-search.inc - Administration home page and system preferences - serials-search.inc - Serials and related pages - suggestions-add-search.inc - Not used - z3950-admin-search.inc - Administration -> Z39.50 servers Signed-off-by: David Nind --- .../intranet-tmpl/prog/css/src/_header.scss | 77 +++-- .../prog/css/src/staff-global.scss | 80 ----- .../prog/en/includes/acquisitions-search.inc | 97 +++--- .../prog/en/includes/adv-search.inc | 43 ++- .../prog/en/includes/authorities-search.inc | 280 +++++++++--------- .../prog/en/includes/authorities_js.inc | 8 +- .../prog/en/includes/budgets-admin-search.inc | 87 +++--- .../prog/en/includes/cat-search.inc | 46 ++- .../prog/en/includes/cataloging-search.inc | 71 +++-- .../prog/en/includes/catalogue-search-box.inc | 16 +- .../prog/en/includes/checkin-search-box.inc | 16 +- .../prog/en/includes/checkin-search.inc | 42 ++- .../prog/en/includes/circ-search.inc | 45 ++- .../prog/en/includes/cities-admin-search.inc | 58 ++-- .../en/includes/contracts-admin-search.inc | 59 ++-- .../en/includes/currencies-admin-search.inc | 59 ++-- .../prog/en/includes/desks-admin-search.inc | 58 ++-- .../prog/en/includes/erm-search.inc | 90 +++--- .../prog/en/includes/home-search.inc | 57 ++-- .../prog/en/includes/letters-search.inc | 59 ++-- .../prog/en/includes/member-search-box.inc | 32 +- .../prog/en/includes/merge-record.inc | 1 + .../prog/en/includes/patron-search-box.inc | 18 +- .../prog/en/includes/patron-search-header.inc | 50 +++- .../prog/en/includes/patrons-admin-search.inc | 58 ++-- .../prog/en/includes/prefs-admin-search.inc | 62 ++-- .../prog/en/includes/renew-search-box.inc | 16 +- .../prog/en/includes/search_indexes.inc | 74 ++--- .../prog/en/includes/serials-search.inc | 87 +++--- .../en/includes/suggestions-add-search.inc | 64 ++-- .../prog/en/includes/z3950-admin-search.inc | 59 ++-- .../prog/en/modules/circ/offline.tt | 2 +- .../intranet-tmpl/prog/js/staff-global.js | 55 +++- 33 files changed, 1130 insertions(+), 796 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss index a11a5a64a9..feb24eeb72 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_header.scss @@ -54,19 +54,7 @@ a.navbar-toggle { display: flex; padding: 0 .8em; - .residentsearch { - padding: 0; - border: 0; - background-color: transparent; - display: none; - flex-basis: 50%; - - &:first-of-type { - display: block; - } - } - - > ul { + ul { padding: 0; margin: 0; border-radius: 0 16px 16px 0; @@ -87,6 +75,7 @@ a.navbar-toggle { padding-bottom: 0; list-style-type: none; margin: 0; + white-space: nowrap; a { color: #FFF; @@ -96,11 +85,6 @@ a.navbar-toggle { } } } - .ui-state-hover, .ui-state-active { - a { - border-bottom: 2px solid #FFFFFF; - } - } form { display: flex; @@ -148,6 +132,14 @@ a.navbar-toggle { border-left: 1px solid #e0e0e0; } } + + input + input { + padding-right: .5em; + } + } + + .form-control { + font-size: 1em; } .form-extra-content { @@ -184,8 +176,9 @@ a.navbar-toggle { } .form-extra-content-toggle { - opacity: .5; background-color: transparent; + opacity: .5; + padding-right: 1em; &:hover { opacity: 1; @@ -219,6 +212,52 @@ a.navbar-toggle { box-shadow: unset; } } + + .tab-content { + background-color: transparent; + padding: 0; + + &:first-of-type { + flex-basis: 50%; + } + } + + .nav-tabs { + > li { + + > a { + background-color: $background-color-primary; + border: 2px solid $background-color-primary; + border-radius: 0; + color: #FFF; + font-weight: normal; + line-height: 1.3; + margin: 0 .25em; + padding: 0 .25em; + + &:hover, &:focus, &:active { + background-color: $background-color-primary; + border: 2px solid $background-color-primary; + border-bottom-color: $background-color-secondary; + border-bottom: 0; + padding: 0 .25em; + text-decoration: none; + } + } + + &.active { + a { + cursor: default; + padding: 0 .25em; + border-bottom: 2px solid #FFF; + + &:hover, + &:focus { + } + } + } + } + } } #logged-in-menu { 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 baf0ff7b73..39ffdf3911 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -725,12 +725,6 @@ ul { list-style-type: none; } } - - &.ui-tabs-nav { - li { - list-style: none; - } - } } ol { @@ -2657,80 +2651,6 @@ td.bundle { background: #FFF url("../img/spinner-small.gif") right center no-repeat; } -// jQuery UI standard tabs -.ui-menu { - li { - list-style: none; - } -} - -.ui-tabs-nav { - .ui-tabs-active a, - a:hover, - a:focus, - a:active, - span.a { - background: none repeat scroll 0 0 transparent; - outline: 0 none; - } - - &.ui-widget-header { - background: none; - border: 0; - padding: .2em .9em 0 .9em; - } -} - -.ui-tabs { - .ui-tabs-panel { - background: #FFF none; - border-radius: 4px; - border: 2px solid $background-color-primary; - - fieldset { - box-shadow: none; - } - } - .ui-tabs-nav { - li { - background: $background-color-secondary; - border: 0; - margin-right: .4em; - border-radius: 4px 4px 0 0; - - a { - color: #111; - } - - &.ui-tabs-active, &.ui-state-hover { - background-color: $background-color-primary; - - a { - color: #fff; - } - } - } - } - - &.ui-widget-content { - background: transparent none; - border: 0; - } - - - .ui-state-hover { - a { - color: $green-text-color; - - &:link, - &:visited { - color: $green-text-color; - } - } - } - -} - .ui-widget { font-family: inherit; 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 4264cb9256..825fa6444b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-search.inc @@ -1,53 +1,56 @@ - - -