Bugzilla – Attachment 39368 Details for
Bug 12320
$.cookie('foo', null) deprecated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 12320: Remove deprecated construct to delete cookie showColumns
SIGNED-OFF-Bug-12320-Remove-deprecated-construct-t.patch (text/plain), 3.01 KB, created by
Bernardo Gonzalez Kriegel
on 2015-05-21 17:49:22 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 12320: Remove deprecated construct to delete cookie showColumns
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-05-21 17:49:22 UTC
Size:
3.01 KB
patch
obsolete
>From e29c5f3511bc116de3c7a3f7be869c5aefe4ca97 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 28 Apr 2015 12:52:36 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 12320: Remove deprecated construct to > delete cookie showColumns > > $.cookie('foo', null); >is deprecated and should be replaced with > $.removeCookie('foo'); > >This patch replaces the occurrences for the "showColumns" cookie. > >Before this patch, there was a bug on the batchmod tools. >To reproduce the issue: >1/ Go on the Batch item modification tool >2/ Fill the textarea with barcodes and submit >3/ Click on some column names (to create the cookie) >4/ Click on 'Show all columns" (to set the cookie to null) >5/ Don't submit and repeat steps 1 & 2 >6/ You should see a js error: > Error: Syntax error, unrecognized expression: :nth-child > ...break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecogni... > >Test plan: >Confirm the issue has gone away and there is no regression on the column >selection > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >No js error, no regressions, no errors >--- > .../intranet-tmpl/prog/en/js/pages/batchMod.js | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >index 19abef3..133194a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >@@ -40,10 +40,10 @@ function hideColumn(num) { > if( !found ){ > valCookie.push(hide); > var cookieString = valCookie.join("/"); >- $.cookie("showColumns", cookieString, { expires : date }); >+ $.cookie("showColumns", cookieString, { expires : date, path: '/' }); > } > } else { >- $.cookie("showColumns", hide, { expires : date }); >+ $.cookie("showColumns", hide, { expires : date, path: '/' }); > } > } > >@@ -75,7 +75,7 @@ function showColumn(num){ > } > if( found ){ > var cookieString = valCookie.join("/"); >- $.cookie("showColumns", cookieString, { expires : date }); >+ $.cookie("showColumns", cookieString, { expires : date, path: '/' }); > } > } > } >@@ -83,7 +83,7 @@ function showAllColumns(){ > $("#selections").checkCheckboxes(); > $("#selections span").addClass("selected"); > $("#itemst td:nth-child(2),#itemst tr th:nth-child(2)").nextAll().show(); >- $.cookie("showColumns",null); >+ $.removeCookie("showColumns", { path: '/' }); > $("#hideall").removeAttr("checked").parent().removeClass("selected"); > } > function hideAllColumns(){ >@@ -92,7 +92,7 @@ function hideAllColumns(){ > $("#itemst td:nth-child(2),#itemst th:nth-child(2)").nextAll().hide(); > $("#hideall").attr("checked","checked").parent().addClass("selected"); > var cookieString = allColumns.join("/"); >- $.cookie("showColumns", cookieString, { expires : date }); >+ $.cookie("showColumns", cookieString, { expires : date, path: '/' }); > } > > $(document).ready(function() { >-- >1.7.9.5
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