Merge branch 'working'

This commit is contained in:
Mottie 2014-02-21 17:28:06 -06:00
commit 70d3fe57f3
2 changed files with 5 additions and 3 deletions

View File

@ -1076,6 +1076,8 @@
if (c.delayInit && isEmptyObject(c.cache)) { buildCache(table); }
// jQuery v1.2.6 doesn't have closest()
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) {
initSort(table, cell, e);
}

View File

@ -571,7 +571,7 @@ ts.filter = {
} else {
// 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') : '';
if (/(update|add)/.test(event.type)) {
if (/(update|add)/.test(event.type) && event.type !== "updateComplete") {
// force a new search since content has changed
c.lastCombinedFilter = null;
}
@ -1229,8 +1229,8 @@ ts.addWidget({
// fix clone ID, if it exists - fixes #271
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
// clear out cloned table, except for sticky header
// include caption & filter row (fixes #126 & #249)
$stickyTable.find('thead:gt(0), tr.sticky-false, tbody, tfoot').remove();
// 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').hide();
if (!wo.stickyHeaders_includeCaption) {
$stickyTable.find('caption').remove();
} else {