mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge branch 'working'
This commit is contained in:
commit
70d3fe57f3
@ -1076,6 +1076,8 @@
|
|||||||
if (c.delayInit && isEmptyObject(c.cache)) { buildCache(table); }
|
if (c.delayInit && isEmptyObject(c.cache)) { buildCache(table); }
|
||||||
// jQuery v1.2.6 doesn't have closest()
|
// jQuery v1.2.6 doesn't have closest()
|
||||||
cell = /TH|TD/.test(this.tagName) ? this : $(this).parents('th, td')[0];
|
cell = /TH|TD/.test(this.tagName) ? this : $(this).parents('th, td')[0];
|
||||||
|
// reference original table headers and find the same cell
|
||||||
|
cell = c.$headers[ $headers.index( cell ) ];
|
||||||
if (!cell.sortDisabled) {
|
if (!cell.sortDisabled) {
|
||||||
initSort(table, cell, e);
|
initSort(table, cell, e);
|
||||||
}
|
}
|
||||||
|
@ -571,7 +571,7 @@ ts.filter = {
|
|||||||
} else {
|
} else {
|
||||||
// send false argument to force a new search; otherwise if the filter hasn't changed, it will return
|
// send false argument to force a new search; otherwise if the filter hasn't changed, it will return
|
||||||
filter = event.type === 'search' ? filter : event.type === 'updateComplete' ? c.$table.data('lastSearch') : '';
|
filter = event.type === 'search' ? filter : event.type === 'updateComplete' ? c.$table.data('lastSearch') : '';
|
||||||
if (/(update|add)/.test(event.type)) {
|
if (/(update|add)/.test(event.type) && event.type !== "updateComplete") {
|
||||||
// force a new search since content has changed
|
// force a new search since content has changed
|
||||||
c.lastCombinedFilter = null;
|
c.lastCombinedFilter = null;
|
||||||
}
|
}
|
||||||
@ -1229,8 +1229,8 @@ ts.addWidget({
|
|||||||
// fix clone ID, if it exists - fixes #271
|
// fix clone ID, if it exists - fixes #271
|
||||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||||
// clear out cloned table, except for sticky header
|
// clear out cloned table, except for sticky header
|
||||||
// include caption & filter row (fixes #126 & #249)
|
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||||
$stickyTable.find('thead:gt(0), tr.sticky-false, tbody, tfoot').remove();
|
$stickyTable.find('thead:gt(0), tr.sticky-false, tbody, tfoot').hide();
|
||||||
if (!wo.stickyHeaders_includeCaption) {
|
if (!wo.stickyHeaders_includeCaption) {
|
||||||
$stickyTable.find('caption').remove();
|
$stickyTable.find('caption').remove();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user