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 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
04f5e7d4e7
commit
0fa0297d7d
1 changed files with 5 additions and 5 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue