Bug 12320: Remove deprecated construct to delete cookie holdfor
$.cookie('foo', null);
is deprecated and should be replaced with
$.removeCookie('foo');
This patch replaces the occurrences for the "holdfor" cookie.
Test plan:
1/ Search for a patron
2/ On the patron detail page, click on "search to hold"
3/ Search for records
4/ On the results page, click on "Place hold" > "Forget PATRON"
5/ Reload the page.
6/ The "Place hold" button should not contain the patron anymore
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, no errors
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 04f5e7d4e7)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
1b56130e80
commit
433441685b
|
|
@ -68,7 +68,7 @@ function checkEnter(e){ //e is event object passed from function invocation
|
|||
}
|
||||
|
||||
function clearHoldFor(){
|
||||
$.cookie("holdfor",null, { path: "/", expires: 0 });
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
}
|
||||
|
||||
function logOut(){
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ function placeHold () {
|
|||
}
|
||||
|
||||
function forgetPatron(){
|
||||
$.cookie("holdfor",null, { path: "/", expires: 0 });
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
$(".holdforlink").remove();
|
||||
$("#placeholdc").html("<a class=\"btn btn-mini placehold\" href=\"#\"><i class=\"icon-hold\"></i> "+_("Place hold")+"</a>");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,14 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
|
|||
|
||||
columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) %]
|
||||
|
||||
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
|
||||
[% IF ( borrowernumber ) %]
|
||||
if($.cookie("holdfor") != [% borrowernumber %]){
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
}
|
||||
[% ELSE %]
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
[% END %]
|
||||
|
||||
[% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
|
||||
|
||||
// On-site checkout
|
||||
|
|
|
|||
Loading…
Reference in New Issue