From ed5062aa97852a995c5cf03e8a5a1dfb33295b13 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 22 Dec 2023 16:02:42 +0000 Subject: [PATCH] Bug 35643: Upgrade HC Sticky library from v2.2.3 to v2.2.7 This patch upgrades the HC Sticky library in the OPAC and staff interface to the latest version, 2.2.7. The file is moved to its own directory for consistency's sake. To test, apply the patch and clear your browser cache if ncessary. Test pages in the OPAC and staff interface which use the "sticky" heading feature. As you scroll down the header should "stick" to the top of the viewport. For example: - Administration -> System preferences - Catalog -> Search results - Cataloging -> Basic MARC editor - Patrons -> Add or edit patron - Lists -> List contents In the OPAC: - Catalog search results - Lists -> List contents Signed-off-by: Lucas Gass Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/lib/hc-sticky.js | 11 ----------- koha-tmpl/intranet-tmpl/lib/hc-sticky/hc-sticky.js | 11 +++++++++++ .../intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 2 +- .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 2 +- .../prog/en/modules/admin/preferences.tt | 2 +- .../prog/en/modules/authorities/authorities.tt | 2 +- .../prog/en/modules/catalogue/advsearch.tt | 2 +- .../prog/en/modules/catalogue/itemsearch.tt | 2 +- .../prog/en/modules/catalogue/results.tt | 2 +- .../prog/en/modules/cataloguing/addbiblio.tt | 2 +- .../cataloguing/value_builder/marc21_field_008.tt | 2 +- .../intranet-tmpl/prog/en/modules/labels/result.tt | 1 + .../prog/en/modules/members/member-flags.tt | 2 +- .../prog/en/modules/members/memberentrygen.tt | 2 +- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- .../prog/en/modules/tools/additional-contents.tt | 2 +- .../tools/automatic_item_modification_by_age.tt | 2 +- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 2 +- .../prog/en/modules/virtualshelves/shelves.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-basket.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 2 +- koha-tmpl/opac-tmpl/lib/hc-sticky.js | 11 ----------- koha-tmpl/opac-tmpl/lib/hc-sticky/hc-sticky.js | 11 +++++++++++ 27 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/lib/hc-sticky.js create mode 100755 koha-tmpl/intranet-tmpl/lib/hc-sticky/hc-sticky.js delete mode 100644 koha-tmpl/opac-tmpl/lib/hc-sticky.js create mode 100755 koha-tmpl/opac-tmpl/lib/hc-sticky/hc-sticky.js diff --git a/koha-tmpl/intranet-tmpl/lib/hc-sticky.js b/koha-tmpl/intranet-tmpl/lib/hc-sticky.js deleted file mode 100644 index 748bfe6c86..0000000000 --- a/koha-tmpl/intranet-tmpl/lib/hc-sticky.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * HC-Sticky - * ========= - * Version: 2.2.3 - * Author: Some Web Media - * Author URL: http://somewebmedia.com - * Plugin URL: https://github.com/somewebmedia/hc-sticky - * Description: Cross-browser plugin that makes any element on your page visible while you scroll - * License: MIT - */ -!function(t,e){"use strict";if("object"==typeof module&&"object"==typeof module.exports){if(!t.document)throw new Error("HC-Sticky requires a browser to run.");module.exports=e(t)}else"function"==typeof define&&define.amd?define("hcSticky",[],e(t)):e(t)}("undefined"!=typeof window?window:this,function(U){"use strict";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},$=function(t,e,o){console.log("%c! HC Sticky:%c "+t+"%c "+o+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},Q=U.document,X=function(n,f){var o=this;if("string"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$("queries","responsive","option"),f.queryFlow&&$("queryFlow","mobileFirst","option");var p={},d=X.Helpers,s=n.parentNode;"static"===d.getStyle(s,"position")&&(s.style.position="relative");var u=function(){var t=0>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1 diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 4e916f75a3..111dd20958 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -1059,7 +1059,7 @@

HC Sticky

- HC Sticky JavaScript library v2.2.3: MIT License + HC Sticky JavaScript library v2.2.7: MIT License

Highlight

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 21c0351f1a..d6d264806f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -962,7 +962,7 @@ [% Asset.js("js/acquisitions-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] - [% Asset.js("lib/hc-sticky.js") | $raw %] + [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %] [% Asset.js("js/acq.js") | $raw %] [% INCLUDE 'calendar.inc' %]