Bug 30011 - Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface
Summary: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 29228 29616
Blocks: 29155 30509 30514 30950 32672
  Show dependency treegraph
 
Reported: 2022-02-02 17:26 UTC by Owen Leonard
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface (1.67 MB, patch)
2022-02-09 17:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc. (67.39 KB, patch)
2022-02-09 17:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface (1.67 MB, patch)
2022-02-18 11:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc. (67.55 KB, patch)
2022-02-18 11:25 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface (1.67 MB, patch)
2022-02-23 16:04 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc. (67.60 KB, patch)
2022-02-23 16:04 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface (1.67 MB, patch)
2022-04-02 21:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc. (67.66 KB, patch)
2022-04-02 21:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-02-02 17:26:54 UTC
I would like to upgrade jQueryUI to 1.13.1 everywhere. At the same time, the library will be re-compiled to get rid of unused modules like datepicker.
Comment 1 Owen Leonard 2022-02-03 17:17:36 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2022-02-09 17:48:53 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2022-02-09 17:48:57 UTC Comment hidden (obsolete)
Comment 4 Lucas Gass 2022-02-17 17:03:10 UTC
I was working through this test plan and everything seemed to be working pretty well, I came back for some more testing today and the patch doesn't apply clean anymore.
Comment 5 Owen Leonard 2022-02-18 11:24:57 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2022-02-18 11:25:01 UTC Comment hidden (obsolete)
Comment 7 Lucas Gass 2022-02-23 16:04:28 UTC Comment hidden (obsolete)
Comment 8 Lucas Gass 2022-02-23 16:04:32 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2022-04-02 21:11:37 UTC
Only a note: I don't get an auto-complete on cgi-bin/koha/reserve/request.pl?biblionumber=255 with and without the patch set.

Everything else worked as expected.
Comment 10 Katrin Fischer 2022-04-02 21:13:56 UTC
Created attachment 132882 [details] [review]
Bug 30011: Upgrade jQueryUI to 1.13.1 in the OPAC and staff interface

This patch updates jQueryUI in the OPAC and staff interface. Old assets
are removed and new assets added.

jQueryUI has been re-compiled in each interface to include only the
required features. In the OPAC: tabs and tooltip. In the staff
interface: accordion, autocomplete, sortable, and tabs.

The next patch will make the required updates to templates.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2022-04-02 21:14:02 UTC
Created attachment 132883 [details] [review]
Bug 30011: Update links to jQueryUI assets, remove datepicker references, etc.

This patch updates templates to include the new version of jQueryUI. It
removes some references to the now unused datepicker widget as well as
the jQuery timepicker addon.

Some minor JavaScript and style updates to fix issues resulting from the
upgrade.

To test, apply the patch and update the CSS in the staff interface AND
in the OPAC
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

IN THE OPAC:

 - The OPAC only uses the tabs jQueryUI widget.
 - View pages where tabs are used: Bibliographic details, user summary,
   advanced search.

IN THE STAFF INTERFACE:

 - The staff interface uses four jQueryUI widgets: accordion,
   autocomplete, sortable, and tabs
 - Test the accordion widget on two pages: Administration -> Table
   settings and Patrons -> Patrons requesting modifications.
 - Test autocomplete (requires PatronAutoComplete to be enabled) on
   various pages. For example:
   - From the "Check out" tab in the header search box.
   - From the "Search patrons" tab in the header search box, e.g. from
     the main Patrons page.
   - Place hold -> Search patrons.
   - Tools -> Patron lists -> Add patrons to list -> Patron search.
 - Test sortable:
   - Administration -> System preferences -> Language.
     - With more than one language installed you should be able to
       drag to re-order the enabled languages. Confirm that your change
       is saved successfully.
   - Administration -> MARC bibliographic framework -> MARC structure ->
     Edit subfields on a tag with multiple subfields. You should be able
     to drag to re-order the tabs at the top of the subfield constraints
     edit page. Confirm that your changes are saved successfully.
   - Cataloging -> New record. Test that you can re-order subfields
     under a tag with multiple subfields and that your changes are
     saved.
 - Tabs: View various pages with tabs: Check out, bibliographic details,
   basic MARC editor. They're everywhere.

Also confirm that the removal of the leftover datepicker doesn't affect
pages which use the calendar include: Test various pages which use
Flatpickr, e.g. check out, renew, reports, etc.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Fridolin Somers 2022-04-08 13:53:18 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 13 Jonathan Druart 2022-04-29 14:05:08 UTC
dateformat_string has been removed from calendar.inc but it still used from calendar.js
There is a warning in the console: ReferenceError: dateformat_string is not defined
Comment 14 Jonathan Druart 2022-04-29 14:07:10 UTC
Maybe we need to apply this change.

diff --git a/koha-tmpl/intranet-tmpl/prog/js/calendar.js b/koha-tmpl/intranet-tmpl/prog/js/calendar.js
index 7a4a5083e8a..6ee428feaa2 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js
@@ -8,7 +8,7 @@ if (debug > 1) {
 function is_valid_date(date) {
     // An empty string is considered as a valid date for convenient reasons.
     if (date === '') return 1;
-    var dateformat = dateformat_string;
+    var dateformat = dateformat_pref;
     if (dateformat == 'us') {
         if (date.search(/^\d{2}\/\d{2}\/\d{4}($|\s)/) == -1) return 0;
         dateformat = 'mm/dd/yy';
Comment 15 Jonathan Druart 2022-04-29 14:11:15 UTC
It has been reported on bug 30514 already.