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

@ -491,9 +491,11 @@ 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,18 +503,22 @@ var AIRTIME = (function(AIRTIME) {
length,
a = oData.abVisCols;
// putting serialized data back into the correct js type to make
// sure everything works properly.
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = (a[i] === "true") ? true : false;
}
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++) {
if (typeof(a[i]) === "string") {
a[i] = (a[i] === "true") ? true : false;
}
}
}
a = oData.ColReorder;
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
if (a) {
for (i = 0, length = a.length; i < length; i++) {
if (typeof(a[i]) === "string") {
a[i] = parseInt(a[i], 10);
}
}
}