From be869c15abd07635f86c063546ab309fc0be6b9e Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Wed, 24 Apr 2024 22:07:50 +0000 Subject: [PATCH] Bug 36693: Remove hc-sticky and use CSS sticky To test: 1. APPLY PATCH and regenerate OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) 2. DO an OPAC search that has enough results to scroll. 3. The toolbar which includes pagination, select all, clear all, etc. should scoll the same as it did without the patch. 4. There should no longer be a small gap between the pagination and the other tools. --- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 6 ++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 7d0cc68aff..0eafdca5b7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -1954,6 +1954,12 @@ nav { color: #666; font-size: 85%; } + + #floating { + position: sticky; + top: 0; + background-color: #F0F3F3; + } } .commentline .avatar { diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 5df882aff7..a1bd7d6062 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -571,7 +571,6 @@ [% END %] [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %] [% Asset.js("js/authtoresults.js") | $raw %] - [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] [% IF ( OpacHighlightedWords ) %] [% Asset.js("lib/jquery/plugins/jquery.highlight-5.js") | $raw %] [% END %] @@ -902,13 +901,6 @@ $("input.newtag").on('keydown', function(e){ if (e.keyCode == 13) { e.preventDefault(); } }); - - Sticky = $("#floating"); - Sticky.hcSticky({ - stickTo: ".searchresults", - stickyClass: "floating" - }); - }); [% END %] -- 2.30.2