Bug 23944 - Phase out use of jquery.cookie.js in favor of js.cookie.js
Summary: Phase out use of jquery.cookie.js in favor of js.cookie.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23947 24347 24619 24621 24623 24624 27749 27750 27751 29933
  Show dependency treegraph
 
Reported: 2019-11-01 12:13 UTC by Owen Leonard
Modified: 2022-01-24 18:28 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.08


Attachments
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js (9.43 KB, patch)
2019-11-01 13:15 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23944: (follow-up) Update circulation to use new library (3.30 KB, patch)
2019-11-01 14:56 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js (9.46 KB, patch)
2020-01-05 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23944: (follow-up) Update circulation to use new library (3.30 KB, patch)
2020-01-05 19:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js (9.51 KB, patch)
2020-01-25 03:15 UTC, David Nind
Details | Diff | Splinter Review
Bug 23944: (follow-up) Update circulation to use new library (3.34 KB, patch)
2020-01-25 03:15 UTC, David Nind
Details | Diff | Splinter Review
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js (9.56 KB, patch)
2020-01-29 07:21 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23944: (follow-up) Update circulation to use new library (3.40 KB, patch)
2020-01-29 07:21 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 2019-11-01 12:13:32 UTC
The jQuery plugin we use for setting cookies is obsolete:

https://github.com/carhartl/jquery-cookie -- "No longer maintained, superseded by JS Cookie: https://github.com/js-cookie/js-cookie"
Comment 1 Owen Leonard 2019-11-01 13:15:21 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2019-11-01 14:56:26 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2020-01-05 19:52:54 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2020-01-05 19:52:56 UTC Comment hidden (obsolete)
Comment 5 David Nind 2020-01-25 03:15:06 UTC
Created attachment 97937 [details] [review]
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js

This patch adds a new JavaScript file to the staff client's global
JavaScript include file: js.cookie-2.2.1.min.js. This "plugin" will
replace jquery.cookie.js which is no longer maintained.

The "About" page in the staff client is updated to include this new
resource as well as adding previously-missing information about the old
plugin which will remain until all instances of its usage have been
removed.

To test, apply the patch and check the About page to confirm the correct
information is included.

No functionality change is introduced by this bug. The only other
observable change is the existence of the new files and the inclusion of
the minified version of the file in any staff client page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2020-01-25 03:15:10 UTC
Created attachment 97938 [details] [review]
Bug 23944: (follow-up) Update circulation to use new library

This patch updates the circulation page to use the new JavaScript Cookie
library for cookie management.

To test, apply the patch and open a patron record for checkout in the
staff client.

 - Click "Search to hold" in the toolbar and perform a catalog search
   which will return results.
 - On the search results page, the toolbar at the top of the results
   should include a split "Place hold" button. The button's menu should
   include "Place hold for <patron>" and "Forget <patron>" options. Test
   that these work correctly.
 - In the table of search results each title should include a "Place
   hold for <patron>" link.
 - Go to the checkouts page for a patron with one or more checked-out
   items.
   - Check the "Always show checkouts immediately" checkbox.
   - The patron's checkouts should load.
   - Open another patron for checkout who has checked-out items.
   - The table of checkouts should load automatically.

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2020-01-29 07:20:38 UTC
I had to delete my old issues-table-load-immediately-circulation cookies first to get this to work, but now it does :)
Comment 8 Katrin Fischer 2020-01-29 07:21:15 UTC
Created attachment 98050 [details] [review]
Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js

This patch adds a new JavaScript file to the staff client's global
JavaScript include file: js.cookie-2.2.1.min.js. This "plugin" will
replace jquery.cookie.js which is no longer maintained.

The "About" page in the staff client is updated to include this new
resource as well as adding previously-missing information about the old
plugin which will remain until all instances of its usage have been
removed.

To test, apply the patch and check the About page to confirm the correct
information is included.

No functionality change is introduced by this bug. The only other
observable change is the existence of the new files and the inclusion of
the minified version of the file in any staff client page.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2020-01-29 07:21:18 UTC
Created attachment 98051 [details] [review]
Bug 23944: (follow-up) Update circulation to use new library

This patch updates the circulation page to use the new JavaScript Cookie
library for cookie management.

To test, apply the patch and open a patron record for checkout in the
staff client.

 - Click "Search to hold" in the toolbar and perform a catalog search
   which will return results.
 - On the search results page, the toolbar at the top of the results
   should include a split "Place hold" button. The button's menu should
   include "Place hold for <patron>" and "Forget <patron>" options. Test
   that these work correctly.
 - In the table of search results each title should include a "Place
   hold for <patron>" link.
 - Go to the checkouts page for a patron with one or more checked-out
   items.
   - Check the "Always show checkouts immediately" checkbox.
   - The patron's checkouts should load.
   - Open another patron for checkout who has checked-out items.
   - The table of checkouts should load automatically.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Martin Renvoize 2020-01-29 09:10:23 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-02-10 22:56:13 UTC
Backported to 19.11.x branch for 19.11.03
Comment 12 Lucas Gass 2020-02-14 19:14:41 UTC
choosing to backport this enhancement into 19.05.x for 19.05.08
Comment 13 Hayley Pelham 2020-02-17 20:29:51 UTC
Enhancement will not be backported to 18.11.x.