The "Browse selected records" feature (enabled by the BrowseResultSelection system preference) sets a "bibs_selected" cookie when the user checks items in staff interface catalog search results. This cookie can be replaced with the use of localStorage.
Created attachment 129734 [details] [review] Bug 29932: Use localStorage instead of cookie for bibs_selected This patch replaces the use of the jquery.cookie.js plugin in the "Browse selected records" feature. The feature is modified to use localStorage instead of cookies. To test, apply the patch and go to Administration -> System preferences. - Enable the "BrowseResultSelection" system preference. - Perform a catalog search which will return multiple results. - On the search results page, check the checkbox for a number of titles. - Click the "Browse selected biblios" button in the toolbar. - You should be directed to the detail page for the first title you checked. - Clicking the right-arrow in the sidebar should take you through each one of your selected titles. - When you click the "Results" link in the sidebar you should be returned to the same search results set and the same titles should be checked. _ If you uncheck those titles and reload the page the checkboxes should remain unchecked. - If you log out of the staff interface the "bibs_selected" item in localStorage should be deleted. See, for example, https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for information about viewing local storage.
Created attachment 129809 [details] [review] Bug 29932: Use localStorage instead of cookie for bibs_selected This patch replaces the use of the jquery.cookie.js plugin in the "Browse selected records" feature. The feature is modified to use localStorage instead of cookies. To test, apply the patch and go to Administration -> System preferences. - Enable the "BrowseResultSelection" system preference. - Perform a catalog search which will return multiple results. - On the search results page, check the checkbox for a number of titles. - Click the "Browse selected biblios" button in the toolbar. - You should be directed to the detail page for the first title you checked. - Clicking the right-arrow in the sidebar should take you through each one of your selected titles. - When you click the "Results" link in the sidebar you should be returned to the same search results set and the same titles should be checked. _ If you uncheck those titles and reload the page the checkboxes should remain unchecked. - If you log out of the staff interface the "bibs_selected" item in localStorage should be deleted. See, for example, https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for information about viewing local storage. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 129858 [details] [review] Bug 29932: Use localStorage instead of cookie for bibs_selected This patch replaces the use of the jquery.cookie.js plugin in the "Browse selected records" feature. The feature is modified to use localStorage instead of cookies. To test, apply the patch and go to Administration -> System preferences. - Enable the "BrowseResultSelection" system preference. - Perform a catalog search which will return multiple results. - On the search results page, check the checkbox for a number of titles. - Click the "Browse selected biblios" button in the toolbar. - You should be directed to the detail page for the first title you checked. - Clicking the right-arrow in the sidebar should take you through each one of your selected titles. - When you click the "Results" link in the sidebar you should be returned to the same search results set and the same titles should be checked. _ If you uncheck those titles and reload the page the checkboxes should remain unchecked. - If you log out of the staff interface the "bibs_selected" item in localStorage should be deleted. See, for example, https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector for information about viewing local storage. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
I see this has been pushed to 21.11. Pushed to 21.05.x for 21.05.11
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.