Bugzilla – Attachment 38601 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 showColumns
Bug-12320-Remove-deprecated-construct-to-delete-co.patch (text/plain), 2.90 KB, created by
Jonathan Druart
on 2015-04-28 10:58:35 UTC
(
hide
)
Description:
Bug 12320: Remove deprecated construct to delete cookie showColumns
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-28 10:58:35 UTC
Size:
2.90 KB
patch
obsolete
>From 43153dfdae4e4332ef677cb8548150b5dc23a2ea 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] 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 >--- > koha-tmpl/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() { >-- >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