Bug 29940 - Phase out jquery.cookie.js in the OPAC
Summary: Phase out jquery.cookie.js in the OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 11873
Blocks: 26019 27750
  Show dependency treegraph
 
Reported: 2022-01-25 12:49 UTC by Owen Leonard
Modified: 2023-12-28 20:43 UTC (History)
4 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:
22.05.00,21.11.05


Attachments
Bug 29940: Phase out jquery.cookie.js in the OPAC (14.18 KB, patch)
2022-01-25 13:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29940: Phase out jquery.cookie.js in the OPAC (9.60 KB, patch)
2022-01-26 16:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29940: Phase out jquery.cookie.js in the OPAC (9.68 KB, patch)
2022-01-27 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29940: Don't surround value by quote (1.98 KB, patch)
2022-01-27 14:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29940: Phase out jquery.cookie.js in the OPAC (9.77 KB, patch)
2022-03-17 12:53 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 29940: Don't surround value by quote (2.07 KB, patch)
2022-03-17 12:53 UTC, Marcel de Rooy
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-01-25 12:49:43 UTC
The OPAC uses jquery.cookie.js in one feature: "Return to advanced search." This patch will replace use of jquery.cookie.js with js-cookie.
Comment 1 Owen Leonard 2022-01-25 13:10:53 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2022-01-26 14:24:06 UTC
Same as bug 11873, I would remove the non-minified version.
Comment 3 Owen Leonard 2022-01-26 16:29:55 UTC
Created attachment 129835 [details] [review]
Bug 29940: Phase out jquery.cookie.js in the OPAC

This patch replaces the use of jquery.cookie.js in the OPAC with the
newer js-cookie plugin. The patch adds the latest version of the
js-cookie library and removes the old jquery.cookie plugin.

To test, apply the patch and go to the advanced search page in the OPAC.

- Perform a search using a number of different limits and settings, e.g.
  keyword, item type, and sort-by.
- On the search results page you should see at the top of the results
  list a link to "Return to the last advanced search."
- The link should take you back to the advanced search page with all the
  same settings filled into the form.
- A search with the "More options" view enabled in the advanced search
  form should result in a link which returns to the "More options" view.
- Searching via the "quick search" form at the top of the page should
  clear the cookies which were set in order to remember the advanced
  search. See
  https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for
  information on viewing your browser's stored cookies.
Comment 4 Jonathan Druart 2022-01-27 14:30:55 UTC
Created attachment 129890 [details] [review]
Bug 29940: Phase out jquery.cookie.js in the OPAC

This patch replaces the use of jquery.cookie.js in the OPAC with the
newer js-cookie plugin. The patch adds the latest version of the
js-cookie library and removes the old jquery.cookie plugin.

To test, apply the patch and go to the advanced search page in the OPAC.

- Perform a search using a number of different limits and settings, e.g.
  keyword, item type, and sort-by.
- On the search results page you should see at the top of the results
  list a link to "Return to the last advanced search."
- The link should take you back to the advanced search page with all the
  same settings filled into the form.
- A search with the "More options" view enabled in the advanced search
  form should result in a link which returns to the "More options" view.
- Searching via the "quick search" form at the top of the page should
  clear the cookies which were set in order to remember the advanced
  search. See
  https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for
  information on viewing your browser's stored cookies.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2022-01-27 14:30:58 UTC
Created attachment 129891 [details] [review]
Bug 29940: Don't surround value by quote

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2022-01-27 15:02:35 UTC
Consider my stamp a PQA if someone else tests this.
Comment 7 Marcel de Rooy 2022-03-17 12:53:07 UTC
Created attachment 131838 [details] [review]
Bug 29940: Phase out jquery.cookie.js in the OPAC

This patch replaces the use of jquery.cookie.js in the OPAC with the
newer js-cookie plugin. The patch adds the latest version of the
js-cookie library and removes the old jquery.cookie plugin.

To test, apply the patch and go to the advanced search page in the OPAC.

- Perform a search using a number of different limits and settings, e.g.
  keyword, item type, and sort-by.
- On the search results page you should see at the top of the results
  list a link to "Return to the last advanced search."
- The link should take you back to the advanced search page with all the
  same settings filled into the form.
- A search with the "More options" view enabled in the advanced search
  form should result in a link which returns to the "More options" view.
- Searching via the "quick search" form at the top of the page should
  clear the cookies which were set in order to remember the advanced
  search. See
  https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for
  information on viewing your browser's stored cookies.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Marcel de Rooy 2022-03-17 12:53:11 UTC
Created attachment 131839 [details] [review]
Bug 29940: Don't surround value by quote

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2022-03-17 12:54:25 UTC
(In reply to Jonathan Druart from comment #6)
> Consider my stamp a PQA if someone else tests this.

Haha
Comment 10 Fridolin Somers 2022-03-22 20:19:00 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 11 Kyle M Hall 2022-03-25 13:45:03 UTC
Pushed to 21.11.x for 21.11.05