From 8b1fb387acee35ba64f61d59fd332a79d5759e06 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 16 Aug 2019 13:51:25 +0000 Subject: [PATCH] Bug 14862: Upgrade jQuery from 1.7 to 3.4.1 in OPAC This patch upgrades jQuery to 3.4.1, jQuery-UI to 1.12.1, and adds the jQuery-migrate plugin to ensure backwards-compatibility with existing jQuery plugins and code. An updated of jquery-ui-rtl.css has been created by converting the new version of jquery-ui.css. All jQuery assets are now include the version number in the file name just as we now do in the staff client. Besides updating file names in the templates, there was only one change made: opac-results.tt had a typo which has been corrected. To test, apply the patch and test as many different pages in the OPAC as possible, including self-checkout and self checkin. Keep the browser console open and watch for JavaScript errors. All JavaScript-driven behavior should work correctly. For instance: - Tabs - Datepickers - Select all/none operations - Cart and lists popups - Search result highlighting Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- .../bootstrap/en/includes/doc-head-close.inc | 4 +- .../bootstrap/en/includes/opac-bottom.inc | 5 +- .../bootstrap/en/modules/opac-results.tt | 2 +- .../bootstrap/en/modules/sci/sci-main.tt | 2 +- .../bootstrap/en/modules/sco/help.tt | 2 +- .../bootstrap/en/modules/sco/sco-main.tt | 2 +- .../bootstrap/lib/jquery/jquery-3.4.1.js | 10598 ++++++++++++++++ .../bootstrap/lib/jquery/jquery-3.4.1.min.js | 10598 ++++++++++++++++ .../lib/jquery/jquery-migrate-3.1.0.js | 678 + .../lib/jquery/jquery-migrate-3.1.0.min.js | 2 + .../bootstrap/lib/jquery/jquery-ui-1.12.1.css | 876 ++ .../bootstrap/lib/jquery/jquery-ui-1.12.1.js | 8737 +++++++++++++ .../lib/jquery/jquery-ui-1.12.1.min.css | 7 + .../lib/jquery/jquery-ui-1.12.1.min.js | 9 + .../lib/jquery/jquery-ui-rtl-1.12.1.css | 876 ++ .../lib/jquery/jquery-ui-rtl-1.12.1.min.css | 5 + .../bootstrap/lib/jquery/jquery-ui-rtl.css | 5 - .../bootstrap/lib/jquery/jquery-ui.css | 5 - .../bootstrap/lib/jquery/jquery-ui.js | 6 - .../opac-tmpl/bootstrap/lib/jquery/jquery.js | 4 - 20 files changed, 32395 insertions(+), 28 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-3.4.1.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-3.4.1.min.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-migrate-3.1.0.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-migrate-3.1.0.min.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.css create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.min.css create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-1.12.1.min.js create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl-1.12.1.css create mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl-1.12.1.min.css delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui-rtl.css delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui.css delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery-ui.js delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/lib/jquery/jquery.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc index 9d4e0f532f..ee84825445 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc @@ -8,11 +8,11 @@ [% IF ( bidi ) %] [% Asset.css("lib/bootstrap/css/bootstrap-rtl.min.css") | $raw %] - [% Asset.css("lib/jquery/jquery-ui-rtl.css") | $raw %] + [% Asset.css("lib/jquery/jquery-ui-rtl-1.12.1.min.css") | $raw %] [% Asset.css("css/right-to-left.css") | $raw %] [% ELSE %] [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %] - [% Asset.css("lib/jquery/jquery-ui.css") | $raw %] + [% Asset.css("lib/jquery/jquery-ui-1.12.1.min.css") | $raw %] [% END %] [% IF ( Koha.Preference('opaclayoutstylesheet') ) %] [% SET opaclayoutstylesheet = Koha.Preference('opaclayoutstylesheet') %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index f5f07ef7bc..14dcfe7e2b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -81,8 +81,9 @@ -[% Asset.js("lib/jquery/jquery.js") | $raw %] -[% Asset.js("lib/jquery/jquery-ui.js") | $raw %] +[% Asset.js("lib/jquery/jquery-3.4.1.min.js") | $raw %] +[% Asset.js("lib/jquery/jquery-migrate-3.1.0.min.js") | $raw %] +[% Asset.js("lib/jquery/jquery-ui-1.12.1.min.js") | $raw %]