1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Fixed (from last commit): Incorrect variable when saving state caused state saving to stop working

Fixed: Removed unnecessary white space from state saving cookies
This commit is contained in:
Allan Jardine 2010-08-20 18:58:25 +01:00
parent 85b923cff3
commit 05995bd655

View File

@ -5625,14 +5625,14 @@
/* Store the interesting variables */ /* Store the interesting variables */
var i; var i;
var sValue = "{"; var sValue = "{";
sValue += '"iCreate": '+new Date().getTime()+','; sValue += '"iCreate":'+ new Date().getTime()+',';
sValue += '"iStart": '+oSettings._iDisplayStart+','; sValue += '"iStart":'+ oSettings._iDisplayStart+',';
sValue += '"iEnd": '+oSettings._iDisplayEnd+','; sValue += '"iEnd":'+ oSettings._iDisplayEnd+',';
sValue += '"iLength": '+oSettings._iDisplayLength+','; sValue += '"iLength":'+ oSettings._iDisplayLength+',';
sValue += '"sFilter": "'+oSettings.oPreviousSearch.sSearch.replace('"','\\"')+'",'; sValue += '"sFilter":"'+ oSettings.oPreviousSearch.sSearch.replace('"','\\"')+'",';
sValue += '"sFilterEsc": '+!oSettings.oPreviousSearch.bRegex+','; sValue += '"sFilterEsc":'+ !oSettings.oPreviousSearch.bRegex+',';
sValue += '"aaSorting": [ '; sValue += '"aaSorting":[';
for ( i=0 ; i<oSettings.aaSorting.length ; i++ ) for ( i=0 ; i<oSettings.aaSorting.length ; i++ )
{ {
sValue += '['+oSettings.aaSorting[i][0]+',"'+oSettings.aaSorting[i][1]+'"],'; sValue += '['+oSettings.aaSorting[i][0]+',"'+oSettings.aaSorting[i][1]+'"],';
@ -5640,7 +5640,7 @@
sValue = sValue.substring(0, sValue.length-1); sValue = sValue.substring(0, sValue.length-1);
sValue += "],"; sValue += "],";
sValue += '"aaSearchCols": [ '; sValue += '"aaSearchCols":[';
for ( i=0 ; i<oSettings.aoPreSearchCols.length ; i++ ) for ( i=0 ; i<oSettings.aoPreSearchCols.length ; i++ )
{ {
sValue += '["'+oSettings.aoPreSearchCols[i].sSearch.replace('"','\\"')+ sValue += '["'+oSettings.aoPreSearchCols[i].sSearch.replace('"','\\"')+
@ -5649,7 +5649,7 @@
sValue = sValue.substring(0, sValue.length-1); sValue = sValue.substring(0, sValue.length-1);
sValue += "],"; sValue += "],";
sValue += '"abVisCols": [ '; sValue += '"abVisCols":[';
for ( i=0 ; i<oSettings.aoColumns.length ; i++ ) for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
{ {
sValue += oSettings.aoColumns[i].bVisible+","; sValue += oSettings.aoColumns[i].bVisible+",";
@ -5686,7 +5686,7 @@
try try
{ {
oData = (typeof $.parseJSON == 'function') ? oData = (typeof $.parseJSON == 'function') ?
$.parseJSON( oData.replace(/'/g, '"') ) : eval( '('+sData+')' ); $.parseJSON( sData.replace(/'/g, '"') ) : eval( '('+sData+')' );
} }
catch( e ) catch( e )
{ {