mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: Add url check to allow ajax updating of table. Fixes #730
This commit is contained in:
parent
235fc037fa
commit
6fbdc1a3b9
@ -661,6 +661,7 @@
|
|||||||
// don't allow rendering multiple times on the same page/size/totalRows/filters/sorts
|
// don't allow rendering multiple times on the same page/size/totalRows/filters/sorts
|
||||||
if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
|
if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
|
||||||
(l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') &&
|
(l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') &&
|
||||||
|
(l.ajaxUrl || '') === (p.ajaxObject.url || '') &&
|
||||||
l.sortList === (c.sortList || []).join(',') ) { return; }
|
l.sortList === (c.sortList || []).join(',') ) { return; }
|
||||||
if (c.debug) {
|
if (c.debug) {
|
||||||
ts.log('Pager changing to page ' + p.page);
|
ts.log('Pager changing to page ' + p.page);
|
||||||
@ -671,7 +672,8 @@
|
|||||||
// fixes #408; modify sortList otherwise it auto-updates
|
// fixes #408; modify sortList otherwise it auto-updates
|
||||||
sortList : (c.sortList || []).join(','),
|
sortList : (c.sortList || []).join(','),
|
||||||
totalRows : p.totalRows,
|
totalRows : p.totalRows,
|
||||||
currentFilters : p.currentFilters || []
|
currentFilters : p.currentFilters || [],
|
||||||
|
ajaxUrl : p.ajaxObject.url || ''
|
||||||
};
|
};
|
||||||
if (p.ajax) {
|
if (p.ajax) {
|
||||||
getAjax(table, p);
|
getAjax(table, p);
|
||||||
|
@ -886,6 +886,7 @@ tsp = ts.pager = {
|
|||||||
// don't allow rendering multiple times on the same page/size/totalRows/filters/sorts
|
// don't allow rendering multiple times on the same page/size/totalRows/filters/sorts
|
||||||
if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
|
if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
|
||||||
(l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') &&
|
(l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') &&
|
||||||
|
(l.ajaxUrl || '') === (p.ajaxObject.url || '') &&
|
||||||
l.sortList === (c.sortList || []).join(',') ) {
|
l.sortList === (c.sortList || []).join(',') ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -898,7 +899,8 @@ tsp = ts.pager = {
|
|||||||
// fixes #408; modify sortList otherwise it auto-updates
|
// fixes #408; modify sortList otherwise it auto-updates
|
||||||
sortList : (c.sortList || []).join(','),
|
sortList : (c.sortList || []).join(','),
|
||||||
totalRows : p.totalRows,
|
totalRows : p.totalRows,
|
||||||
currentFilters : p.currentFilters || []
|
currentFilters : p.currentFilters || [],
|
||||||
|
ajaxUrl : p.ajaxObject.url || ''
|
||||||
};
|
};
|
||||||
if (p.ajax) {
|
if (p.ajax) {
|
||||||
tsp.getAjax(table, c);
|
tsp.getAjax(table, c);
|
||||||
|
Loading…
Reference in New Issue
Block a user