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