mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: Passing jqxhr for ajaxProcessing function.
This commit is contained in:
parent
8d306abd78
commit
b7100dc27c
@ -271,7 +271,7 @@
|
|||||||
c = table.config,
|
c = table.config,
|
||||||
$t = c.$table,
|
$t = c.$table,
|
||||||
tds = '',
|
tds = '',
|
||||||
result = p.ajaxProcessing(data, table) || [ 0, [] ],
|
result = p.ajaxProcessing(data, table, xhr) || [ 0, [] ],
|
||||||
hl = $t.find('thead th').length;
|
hl = $t.find('thead th').length;
|
||||||
|
|
||||||
// Clean up any previous error.
|
// Clean up any previous error.
|
||||||
@ -401,12 +401,12 @@
|
|||||||
counter = ++p.ajaxCounter;
|
counter = ++p.ajaxCounter;
|
||||||
|
|
||||||
p.ajaxObject.url = url; // from the ajaxUrl option and modified by customAjaxUrl
|
p.ajaxObject.url = url; // from the ajaxUrl option and modified by customAjaxUrl
|
||||||
p.ajaxObject.success = function(data) {
|
p.ajaxObject.success = function(data, status, jqxhr) {
|
||||||
// Refuse to process old ajax commands that were overwritten by new ones - see #443
|
// Refuse to process old ajax commands that were overwritten by new ones - see #443
|
||||||
if (counter < p.ajaxCounter){
|
if (counter < p.ajaxCounter){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
renderAjax(data, table, p);
|
renderAjax(data, table, p, jqxhr);
|
||||||
$doc.unbind('ajaxError.pager');
|
$doc.unbind('ajaxError.pager');
|
||||||
if (typeof p.oldAjaxSuccess === 'function') {
|
if (typeof p.oldAjaxSuccess === 'function') {
|
||||||
p.oldAjaxSuccess(data);
|
p.oldAjaxSuccess(data);
|
||||||
|
Loading…
Reference in New Issue
Block a user