From 2e1833b89d04fd48d82dfb52c0ab3b781a41af69 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 26 Apr 2024 17:37:52 +0000 Subject: [PATCH] Bug 36694: Remove HC sticky from OPAC pages Rebased-by: Victor Grousset/tuxayo Signed-off-by: Owen Leonard Signed-off-by: Victor Grousset/tuxayo --- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 2 +- koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 6 ++++++ .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 8 +------- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 3 +-- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 3 +-- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 11 ++++++++++- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index b6f165c776..ca92dae010 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -61,7 +61,7 @@ $.fn.selectTabByID = function (tabID) { $(document).ready(function () { //check if sticky element is stuck, if so add floating class - if ( $('#toolbar.sticky').length ) { + if ( $('.sticky').length ) { const observer = new IntersectionObserver( ([e]) => e.target.classList.toggle('floating', e.intersectionRatio < 1), {threshold: [1]} diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index e3e16efa7b..108234c5bd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2898,6 +2898,12 @@ $star-selected: #EDB867; margin-top: 30px; } +.sticky { + position: sticky; + top: -1px; + z-index: 999; +} + .chocolat-wrapper { z-index: 1050; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 143cd99827..c4b5ad9bf0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -24,7 +24,7 @@

Your cart

-
+
[% IF ( verbose ) %] Brief display @@ -369,7 +369,6 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] - [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] [% INCLUDE 'datatables.inc' %]