|
|
@ -47,7 +47,6 @@
|
|
|
|
* );
|
|
|
|
* );
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
(function(window, document, $, undefined) {
|
|
|
|
(function(window, document, $, undefined) {
|
|
|
|
|
|
|
|
|
|
|
|
// Use DataTables' object builder so strings can be used to represent
|
|
|
|
// Use DataTables' object builder so strings can be used to represent
|
|
|
|
// nested objects
|
|
|
|
// nested objects
|
|
|
|
var setBuilder = $.fn.dataTable.ext.internal._fnSetObjectDataFn;
|
|
|
|
var setBuilder = $.fn.dataTable.ext.internal._fnSetObjectDataFn;
|
|
|
@ -60,26 +59,22 @@ $.fn.dataTable.ext.deepLink = function(whitelist) {
|
|
|
|
var pair = search[i].split('=');
|
|
|
|
var pair = search[i].split('=');
|
|
|
|
var key = decodeURIComponent(pair[0]);
|
|
|
|
var key = decodeURIComponent(pair[0]);
|
|
|
|
var value = decodeURIComponent(pair[1]);
|
|
|
|
var value = decodeURIComponent(pair[1]);
|
|
|
|
console.log("key: " + key);
|
|
|
|
console.log('key: ' + key);
|
|
|
|
console.log("value: " + value);
|
|
|
|
console.log('value: ' + value);
|
|
|
|
|
|
|
|
|
|
|
|
// "Casting"
|
|
|
|
// "Casting"
|
|
|
|
if (value === 'true') {
|
|
|
|
if (value === 'true') {
|
|
|
|
value = true;
|
|
|
|
value = true;
|
|
|
|
}
|
|
|
|
} else if (value === 'false') {
|
|
|
|
else if (value === 'false') {
|
|
|
|
|
|
|
|
value = false;
|
|
|
|
value = false;
|
|
|
|
}
|
|
|
|
} else if (!value.match(/[^\d]/) && key !== 'search.search') {
|
|
|
|
else if (!value.match(/[^\d]/) && key !== 'search.search') {
|
|
|
|
|
|
|
|
// don't convert if searching or it'll break the search
|
|
|
|
// don't convert if searching or it'll break the search
|
|
|
|
value = value * 1;
|
|
|
|
value = value * 1;
|
|
|
|
}
|
|
|
|
} else if (value.indexOf('{') === 0 || value.indexOf('[') === 0) {
|
|
|
|
else if (value.indexOf('{') === 0 || value.indexOf('[') === 0) {
|
|
|
|
|
|
|
|
// Try to JSON parse for arrays and obejcts
|
|
|
|
// Try to JSON parse for arrays and obejcts
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
value = $.parseJSON(value);
|
|
|
|
value = $.parseJSON(value);
|
|
|
|
}
|
|
|
|
} catch (e) {}
|
|
|
|
catch(e){}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (whitelist === 'all' || $.inArray(key, whitelist) !== -1) {
|
|
|
|
if (whitelist === 'all' || $.inArray(key, whitelist) !== -1) {
|
|
|
@ -90,5 +85,4 @@ $.fn.dataTable.ext.deepLink = function(whitelist) {
|
|
|
|
|
|
|
|
|
|
|
|
return out;
|
|
|
|
return out;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
})(window, document, jQuery);
|
|
|
|
})(window, document, jQuery);
|
|
|
|