Bugzilla – Attachment 129859 Details for
Bug 29933
Fix stray usage of jquery.cookie.js plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29933: Fix stray usage of jquery.cookie.js plugin
Bug-29933-Fix-stray-usage-of-jquerycookiejs-plugin.patch (text/plain), 5.25 KB, created by
Jonathan Druart
on 2022-01-27 10:20:21 UTC
(
hide
)
Description:
Bug 29933: Fix stray usage of jquery.cookie.js plugin
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-27 10:20:21 UTC
Size:
5.25 KB
patch
obsolete
>From 26c63171333f49c04954a8736ca17a5bb464b6ac Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 24 Jan 2022 18:33:30 +0000 >Subject: [PATCH] Bug 29933: Fix stray usage of jquery.cookie.js plugin > >This patch removes a few instances where the old cookie plugin was still >being used for deleting cookies even though the new plugin is being used >to set the cookies. > >To test, apply the patch and test the following processes in the staff >interface: > >Search to hold: > > - View a patron record and click the "Search to hold" button. > - Perform a catalog search which will return results. > - On the search results page there should be a "Place hold for > <patron>" link under each holdable title. > - Click the "Place hold" button's dropdown arrow and choose "Forget > <patron>." The "Place hold for..." links should disappear. > >Search to hold for a patron club: > > - If necessary, create a patron club. > - Add one or more patrons to the club. > - In Tools -> Patron clubs, find the club you added patrons to. > - Click the "Actions" button and then "Search to hold." > - Perform a catalog search which will return results. > - On the search results page there should be a "Place hold for > <club>" link under each holdable title. > - Click the "Place hold" button's dropdown arrow and choose > "Forget <club>." The "Place hold for..." links should disappear. > >Batch item modification show/hide columns: > > - Go to Tools -> Batch item modification. > - Submit a list of items for modification. > - Uncheck some checkboxes to hide columns on the page showing the items > you submitted. > - In the browser's storage inspector (e.g. > https://developer.mozilla.org/en-US/docs/Tools/Storage_Inspector), > should see a "showColumns" cookie with a string of numbers and > slashes. > - Click the "Show all columns" checkbox. > - The "showColumns" cookie should disappear. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js | 2 +- > koha-tmpl/intranet-tmpl/prog/js/pages/results.js | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 4 ++-- > 3 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >index d9432e74f51..e78ed98ac86 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js >@@ -100,7 +100,7 @@ function showAllColumns() { > }); > $("#selections span").addClass("selected"); > $("#itemst td:nth-child("+nb_cols+"),#itemst tr th:nth-child("+nb_cols+")").nextAll().show(); >- $.removeCookie("showColumns", { path: '/' }); >+ Cookies.remove("showColumns", { path: '/' }); > $("#hideall").prop("checked", false).parent().removeClass("selected"); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >index 070a8c473de..32194536e0a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/pages/results.js >@@ -1,4 +1,4 @@ >-/* global KOHA biblionumber new_results_browser addMultiple vShelfAdd openWindow search_result SEARCH_RESULTS PREF_LocalCoverImages PREF_IntranetCoce PREF_CoceProviders CoceHost CoceProviders addRecord delSingleRecord PREF_BrowseResultSelection resetSearchContext addBibToContext delBibToContext getContextBiblioNumbers holdfor_cardnumber holdforclub strQuery PREF_NotHighlightedWords __ */ >+/* global KOHA biblionumber new_results_browser addMultiple vShelfAdd openWindow search_result SEARCH_RESULTS PREF_LocalCoverImages PREF_IntranetCoce PREF_CoceProviders CoceHost CoceProviders addRecord delSingleRecord PREF_BrowseResultSelection resetSearchContext addBibToContext delBibToContext getContextBiblioNumbers holdfor_cardnumber holdforclub strQuery PREF_NotHighlightedWords __ Cookies */ > > function verify_cover_images() { > /* Loop over each container in the template which contains covers */ >@@ -348,8 +348,8 @@ function placeHold () { > } > > function forgetPatronAndClub(){ >- $.removeCookie("holdfor", { path: '/' }); >- $.removeCookie("holdforclub", { path: '/' }); >+ Cookies.remove("holdfor", { path: '/' }); >+ Cookies.remove("holdforclub", { path: '/' }); > $(".holdforlink").remove(); > $("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> " + __("Place hold") + "</a>"); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index ad7d932fca5..ad51b99e1b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -1,4 +1,4 @@ >-/* global shortcut delBasket Sticky AUDIO_ALERT_PATH */ >+/* global shortcut delBasket Sticky AUDIO_ALERT_PATH Cookies */ > /* exported addBibToContext delBibToContext escape_str escape_price openWindow _ removeFocus toUC confirmDelete confirmClone playSound */ > if ( KOHA === undefined ) var KOHA = {}; > >@@ -194,7 +194,7 @@ function checkEnter(e){ //e is event object passed from function invocation > } > > function clearHoldFor(){ >- $.removeCookie("holdfor", { path: '/' }); >+ Cookies.remove("holdfor", { path: '/' }); > } > > function logOut(){ >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29933
:
129736
|
129811
| 129859