remove unecessary file + better error handling

This commit is contained in:
Martin Konecny 2013-02-15 14:19:04 -05:00
parent 39ec07e71c
commit 09baf3a47d
2 changed files with 18 additions and 1032 deletions

View File

@ -492,8 +492,10 @@ var AIRTIME = (function(AIRTIME) {
"fnStateLoad": function fnLibStateLoad(oSettings) {
var settings = localStorage.getItem('datatables-library');
if (settings !== "") {
try {
return JSON.parse(settings);
} catch (e) {
return null;
}
},
"fnStateLoadParams": function (oSettings, oData) {
@ -501,6 +503,7 @@ var AIRTIME = (function(AIRTIME) {
length,
a = oData.abVisCols;
if (a) {
// putting serialized data back into the correct js type to make
// sure everything works properly.
for (i = 0, length = a.length; i < length; i++) {
@ -508,13 +511,16 @@ var AIRTIME = (function(AIRTIME) {
a[i] = (a[i] === "true") ? true : false;
}
}
}
a = oData.ColReorder;
if (a) {
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
}
}
}
oData.iEnd = parseInt(oData.iEnd, 10);
oData.iLength = parseInt(oData.iLength, 10);