mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: update widget to also pass jqxhr to ajaxProcessing. See #626
This commit is contained in:
parent
f7f6efcb78
commit
d2eb430d2b
@ -480,7 +480,7 @@ tsp = ts.pager = {
|
||||
var i, j, t, hsh, $f, $sh, th, d, l, rr_count,
|
||||
$t = c.$table,
|
||||
tds = '',
|
||||
result = wo.pager_ajaxProcessing(data, table) || [ 0, [] ],
|
||||
result = wo.pager_ajaxProcessing(data, table, xhr) || [ 0, [] ],
|
||||
hl = $t.find('thead th').length;
|
||||
|
||||
// Clean up any previous error.
|
||||
@ -597,12 +597,12 @@ tsp = ts.pager = {
|
||||
});
|
||||
counter = ++p.ajaxCounter;
|
||||
wo.pager_ajaxObject.url = url; // from the ajaxUrl option and modified by customAjaxUrl
|
||||
wo.pager_ajaxObject.success = function(data) {
|
||||
wo.pager_ajaxObject.success = function(data, status, jqxhr) {
|
||||
// Refuse to process old ajax commands that were overwritten by new ones - see #443
|
||||
if (counter < p.ajaxCounter){
|
||||
return;
|
||||
}
|
||||
tsp.renderAjax(data, table, c);
|
||||
tsp.renderAjax(data, table, c, jqxhr);
|
||||
$doc.unbind('ajaxError.pager');
|
||||
if (typeof p.oldAjaxSuccess === 'function') {
|
||||
p.oldAjaxSuccess(data);
|
||||
@ -682,7 +682,7 @@ tsp = ts.pager = {
|
||||
// if filtered, start from zero
|
||||
index = f ? 0 : s;
|
||||
count = f ? 0 : s;
|
||||
added = 0;
|
||||
added = 0;
|
||||
while (added < e && index < rows.length) {
|
||||
if (!f || !/filtered/.test(rows[index][0].className)){
|
||||
count++;
|
||||
|
Loading…
Reference in New Issue
Block a user