Merge pull request #256 from Cthulhu59/master

Add parameters to ajx url
This commit is contained in:
Rob G 2013-03-27 17:16:06 -07:00
commit 6fde718ec1

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){