mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Merge pull request #256 from Cthulhu59/master
Add parameters to ajx url
This commit is contained in:
commit
6fde718ec1
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user