Bugzilla – Attachment 38600 Details for
Bug 12320
$.cookie('foo', null) deprecated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12320: Remove deprecated construct to delete cookie holdfor
Bug-12320-Remove-deprecated-construct-to-delete-co.patch (text/plain), 3.10 KB, created by
Jonathan Druart
on 2015-04-28 10:58:31 UTC
(
hide
)
Description:
Bug 12320: Remove deprecated construct to delete cookie holdfor
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-28 10:58:31 UTC
Size:
3.10 KB
patch
obsolete
>From 7bb9cebbb48b6750f7a11543969f84c9e1613125 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 28 Apr 2015 12:52:00 +0200 >Subject: [PATCH] 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 >--- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 9 ++++++++- > 3 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >index 5b086f1..c7d962f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js >@@ -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(){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 785da66..9660bb4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -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>"); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 49d910a..4306bc2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -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 >-- >2.1.0
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 12320
:
38600
|
38601
|
39367
|
39368
|
39424
|
39425