Add custom ajax url to add custom params to url

This commit is contained in:
Cthulhu59 2013-03-11 17:14:17 +01:00
parent 82697d9167
commit 6fbce2b35c

View File

@ -20,6 +20,9 @@
// and a filterList = [[2,Blue],[3,13]] becomes "&fcol[2]=Blue&fcol[3]=13" in the url
ajaxUrl: null,
customAjaxUrl: function(table, url) { return url; },
// process ajax so that the following information is returned:
// [ total_rows (number), rows (array of arrays), headers (array; optional) ]
// example:
@ -278,6 +281,11 @@
sortCol = url.match(/\{sortList[\s+]?:[\s+]?([^}]*)\}/),
filterCol = url.match(/\{filterList[\s+]?:[\s+]?([^}]*)\}/),
arry = [];
if ( typeof(c.customAjaxUrl) === "function" ) {
url = c.customAjaxUrl(table, url);
}
if (sortCol) {
sortCol = sortCol[1];
$.each(sl, function(i,v){