mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter row is now included in stickyHeader + pager. Fixes #449
This commit is contained in:
parent
d1cfbd7bae
commit
b34bbba563
@ -298,7 +298,7 @@
|
|||||||
// only add new header text if the length matches
|
// only add new header text if the length matches
|
||||||
if ( th && th.length === hl ) {
|
if ( th && th.length === hl ) {
|
||||||
hsh = $t.hasClass('hasStickyHeaders');
|
hsh = $t.hasClass('hasStickyHeaders');
|
||||||
$sh = hsh ? c.$sticky.children('thead:first').children().children() : '';
|
$sh = hsh ? c.widgetOptions.$sticky.children('thead:first').children().children() : '';
|
||||||
$f = $t.find('tfoot tr:first').children();
|
$f = $t.find('tfoot tr:first').children();
|
||||||
// don't change td headers (may contain pager)
|
// don't change td headers (may contain pager)
|
||||||
c.$headers.filter('th').each(function(j){
|
c.$headers.filter('th').each(function(j){
|
||||||
|
@ -1066,7 +1066,10 @@ ts.addWidget({
|
|||||||
stickyHeaders_zIndex : 2 // The zIndex of the stickyHeaders, allows the user to adjust this to their needs
|
stickyHeaders_zIndex : 2 // The zIndex of the stickyHeaders, allows the user to adjust this to their needs
|
||||||
},
|
},
|
||||||
format: function(table, c, wo) {
|
format: function(table, c, wo) {
|
||||||
if (c.$table.hasClass('hasStickyHeaders')) { return; }
|
// filter widget doesn't initialize on an empty table. Fixes #449
|
||||||
|
if ( c.$table.hasClass('hasStickyHeaders') || ($.inArray('filter', c.widgets) >= 0 && !c.$table.hasClass('hasFilters')) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var $cell,
|
var $cell,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
$attach = $(wo.stickyHeaders_attachTo),
|
$attach = $(wo.stickyHeaders_attachTo),
|
||||||
|
@ -484,7 +484,7 @@ tsp = ts.pager = {
|
|||||||
// only add new header text if the length matches
|
// only add new header text if the length matches
|
||||||
if ( th && th.length === hl ) {
|
if ( th && th.length === hl ) {
|
||||||
hsh = $t.hasClass('hasStickyHeaders');
|
hsh = $t.hasClass('hasStickyHeaders');
|
||||||
$sh = hsh ? c.$sticky.children('thead:first').children().children() : '';
|
$sh = hsh ? wo.$sticky.children('thead:first').children().children() : '';
|
||||||
$f = $t.find('tfoot tr:first').children();
|
$f = $t.find('tfoot tr:first').children();
|
||||||
// don't change td headers (may contain pager)
|
// don't change td headers (may contain pager)
|
||||||
c.$headers.filter('th').each(function(j){
|
c.$headers.filter('th').each(function(j){
|
||||||
|
Loading…
Reference in New Issue
Block a user