From 4b82ed3549fcea3588b1500574a6715d0fe51702 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 6 Dec 2018 17:15:49 +0000 Subject: [PATCH] Bug 21751: Replace fixFloat with HC-sticky to fix Chrome display This patch replaces the fixFloat jQuery plugin with a new one: HC-sticky (https://github.com/somewebmedia/hc-sticky). This plugin provides the same functionality without the page-reflow problems fixFloat suffers from. To test, apply the patch and regenerate the staff client CSS. Test the behavior of the floating toolbar on these pages: - Acquisitions -> Vendor -> Vendor details - Acquisitions -> Vendor -> View basket - On both these pages, test toolbar behavior before and after expanding the "Orders search" options at the top of the page. - Administration -> System preferences - Authorities -> Create or edit an authority - Catalog -> Advanced search - Search results - Catalog -> Item search - Cataloging -> Add or edit a record - Open the plugin window for the 008 field - Tools -> Label creator -> New label batch -> Add items -> Search -> Results - Patrons -> New patron - Test before and after expanding the patron search options at the top of the page - Test editing a patron too - Tools -> Automatic item modifications by age -> Edit - Tools -> Notices & slips -> Edit - Lists -> View list Check that the About page has been updated with information about the plugin. Signed-off-by: David Cook Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- gulpfile.js | 2 +- koha-tmpl/intranet-tmpl/lib/hc-sticky.js | 11 +++++ .../prog/css/src/staff-global.scss | 23 +++++------ .../intranet-tmpl/prog/en/modules/about.tt | 3 ++ .../prog/en/modules/acqui/basket.tt | 13 +++++- .../prog/en/modules/acqui/supplier.tt | 11 ++++- .../prog/en/modules/admin/preferences.tt | 14 ++++--- .../en/modules/authorities/authorities.tt | 9 +++- .../prog/en/modules/catalogue/advsearch.tt | 9 +++- .../prog/en/modules/catalogue/itemsearch.tt | 10 +++-- .../prog/en/modules/catalogue/results.tt | 11 +++-- .../prog/en/modules/cataloguing/addbiblio.tt | 9 +++- .../value_builder/marc21_field_008.tt | 11 +++-- .../prog/en/modules/labels/result.tt | 11 +++-- .../prog/en/modules/members/memberentrygen.tt | 41 ++++++++----------- .../automatic_item_modification_by_age.tt | 9 +++- .../prog/en/modules/tools/letter.tt | 2 +- .../prog/en/modules/virtualshelves/shelves.tt | 9 +++- koha-tmpl/intranet-tmpl/prog/js/letter.js | 8 +++- .../intranet-tmpl/prog/js/members-menu.js | 3 ++ .../intranet-tmpl/prog/js/staff-global.js | 5 ++- 21 files changed, 151 insertions(+), 73 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/lib/hc-sticky.js diff --git a/gulpfile.js b/gulpfile.js index 1eb0d6ba31..1214585d21 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -52,7 +52,7 @@ gulp.task('build', function() { return gulp.src( css_base + "/src/**/*.scss" ) .pipe(sass( sassOptions ).on('error', sass.logError)) .pipe(autoprefixer()) - .pipe(cssnano()) + .pipe(cssnano({ zindex: false })) .pipe(gulp.dest( css_base )); }); diff --git a/koha-tmpl/intranet-tmpl/lib/hc-sticky.js b/koha-tmpl/intranet-tmpl/lib/hc-sticky.js new file mode 100644 index 0000000000..748bfe6c86 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/lib/hc-sticky.js @@ -0,0 +1,11 @@ +/*! + * 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(1Noto fonts

Noto by Google is a family of fonts licensed under the SIL Open Font License (OFL) v1.1.

+ +

HC Sticky

+

HC Sticky by Some Web Media is a JavaScript library that makes any element on your page visible while you scroll, licensed under the MIT license.

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 aee05cf24d..f40205aa3b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -765,7 +765,7 @@ [% Asset.js("js/acquisitions-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] - [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] + [% Asset.js("lib/hc-sticky.js") | $raw %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt index 6cc0570db3..4d24de3e9b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -159,14 +159,18 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] - [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] + [% Asset.js("lib/hc-sticky.js") | $raw %] [% Asset.js("lib/jquery/plugins/multiple-select/jquery.multiple.select.js") | $raw %]