Bug 24621 - Phase out jquery.cookie.js: Basic MARC editor
Summary: Phase out jquery.cookie.js: Basic MARC editor
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: 23944
Blocks: 27750
  Show dependency treegraph
 
Reported: 2020-02-10 19:01 UTC by Owen Leonard
Modified: 2021-02-22 15:17 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.04, 19.05.09


Attachments
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor (5.05 KB, patch)
2020-02-10 19:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor (5.10 KB, patch)
2020-02-14 09:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor (5.15 KB, patch)
2020-02-14 14:46 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 2020-02-10 19:01:36 UTC
The basic cataloging editor uses cookies to set preferences for whether to show tag numbers or MARC documentation links.

This process should use the newer cookie library, js-cookie.
Comment 1 Owen Leonard 2020-02-10 19:21:14 UTC
Created attachment 98684 [details] [review]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor

This patch removes the use of the jquery.cookie plugin by the basic MARC
editor for setting two interface preferences: Showing MARC tag numbers
and showing MARC documentation links.

To test, apply tThiss he patch and open the basic MARC editor.

 - From the "Settings" menu, select the "Show MARC tag documentation
   links" link. This should toggle the display of the "?" link next to
   MARC tag descriptions.
 - Reload the page to confirm that your selection has been saved.
 - Perform the same test with the "Show tags" menu item.

You can also follow the changes to the cookie using the browser's
developer console. Look for cookies named 'marcdocs_***' and
'marctags_***' (where *** is the borrowernumber of the logged-in
user) and confirm that the value of each flips from "show" to "hide" and
back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies
Comment 2 David Nind 2020-02-14 09:45:14 UTC
Created attachment 98919 [details] [review]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor

This patch removes the use of the jquery.cookie plugin by the basic MARC
editor for setting two interface preferences: Showing MARC tag numbers
and showing MARC documentation links.

To test, apply this patch and open the basic MARC editor.

 - From the "Settings" menu, select the "Show MARC tag documentation
   links" link. This should toggle the display of the "?" link next to
   MARC tag descriptions.
 - Reload the page to confirm that your selection has been saved.
 - Perform the same test with the "Show tags" menu item.

You can also follow the changes to the cookie using the browser's
developer console. Look for cookies named 'marcdocs_***' and
'marctags_***' (where *** is the borrowernumber of the logged-in
user) and confirm that the value of each flips from "show" to "hide" and
back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-02-14 14:46:02 UTC
Created attachment 98955 [details] [review]
Bug 24621: Phase out jquery.cookie.js: Basic MARC editor

This patch removes the use of the jquery.cookie plugin by the basic MARC
editor for setting two interface preferences: Showing MARC tag numbers
and showing MARC documentation links.

To test, apply the patch and open the basic MARC editor.

 - From the "Settings" menu, select the "Show MARC tag documentation
   links" link. This should toggle the display of the "?" link next to
   MARC tag descriptions.
 - Reload the page to confirm that your selection has been saved.
 - Perform the same test with the "Show tags" menu item.

You can also follow the changes to the cookie using the browser's
developer console. Look for cookies named 'marcdocs_***' and
'marctags_***' (where *** is the borrowernumber of the logged-in
user) and confirm that the value of each flips from "show" to "hide" and
back.

https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector
https://developers.google.com/web/tools/chrome-devtools/storage/cookies

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Martin Renvoize 2020-02-17 13:48:51 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-03-05 01:45:20 UTC
Pushed to 19.11.x for 19.11.04
Comment 6 Lucas Gass 2020-03-10 22:30:13 UTC
backported to 19.05.x for 19.05.09