mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: Restore check for new headers. Fixes #1343
This commit is contained in:
parent
6032b121f3
commit
7528607eb4
@ -472,8 +472,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.processAjaxOnInit = true;
|
p.processAjaxOnInit = true;
|
||||||
// only add new header text if the length matches
|
// update new header text
|
||||||
if ( th && th.length === hl ) {
|
if ( th ) {
|
||||||
hsh = $table.hasClass('hasStickyHeaders');
|
hsh = $table.hasClass('hasStickyHeaders');
|
||||||
$sh = hsh ?
|
$sh = hsh ?
|
||||||
c.widgetOptions.$sticky.children('thead:first').children('tr:not(.' + c.cssIgnoreRow + ')').children() :
|
c.widgetOptions.$sticky.children('thead:first').children('tr:not(.' + c.cssIgnoreRow + ')').children() :
|
||||||
|
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-pager.min.js
vendored
2
dist/js/widgets/widget-pager.min.js
vendored
File diff suppressed because one or more lines are too long
@ -774,36 +774,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wo.pager_processAjaxOnInit = true;
|
wo.pager_processAjaxOnInit = true;
|
||||||
hsh = $table.hasClass( 'hasStickyHeaders' );
|
// update new header text
|
||||||
$sh = hsh ?
|
if ( th ) {
|
||||||
wo.$sticky.children( 'thead:first' ).children( 'tr:not(.' + c.cssIgnoreRow + ')' ).children() :
|
hsh = $table.hasClass( 'hasStickyHeaders' );
|
||||||
'';
|
$sh = hsh ?
|
||||||
$f = $table.find( 'tfoot tr:first' ).children();
|
wo.$sticky.children( 'thead:first' ).children( 'tr:not(.' + c.cssIgnoreRow + ')' ).children() :
|
||||||
// don't change td headers (may contain pager)
|
'';
|
||||||
$headers = c.$headers.filter( 'th' );
|
$f = $table.find( 'tfoot tr:first' ).children();
|
||||||
len = $headers.length;
|
// don't change td headers (may contain pager)
|
||||||
for ( j = 0; j < len; j++ ) {
|
$headers = c.$headers.filter( 'th' );
|
||||||
$h = $headers.eq( j );
|
len = $headers.length;
|
||||||
// add new test within the first span it finds, or just in the header
|
for ( j = 0; j < len; j++ ) {
|
||||||
if ( $h.find( '.' + ts.css.icon ).length ) {
|
$h = $headers.eq( j );
|
||||||
icon = $h.find( '.' + ts.css.icon ).clone( true );
|
// add new test within the first span it finds, or just in the header
|
||||||
$h.find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
|
if ( $h.find( '.' + ts.css.icon ).length ) {
|
||||||
if ( hsh && $sh.length ) {
|
icon = $h.find( '.' + ts.css.icon ).clone( true );
|
||||||
icon = $sh.eq( j ).find( '.' + ts.css.icon ).clone( true );
|
$h.find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
|
||||||
$sh.eq( j ).find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
|
if ( hsh && $sh.length ) {
|
||||||
}
|
icon = $sh.eq( j ).find( '.' + ts.css.icon ).clone( true );
|
||||||
} else {
|
$sh.eq( j ).find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
|
||||||
$h.find( '.' + ts.css.headerIn ).html( th[ j ] );
|
}
|
||||||
if ( hsh && $sh.length ) {
|
} else {
|
||||||
// add sticky header to container just in case it contains pager controls
|
$h.find( '.' + ts.css.headerIn ).html( th[ j ] );
|
||||||
p.$container = p.$container.add( wo.$sticky );
|
if ( hsh && $sh.length ) {
|
||||||
$sh.eq( j ).find( '.' + ts.css.headerIn ).html( th[ j ] );
|
// add sticky header to container just in case it contains pager controls
|
||||||
|
p.$container = p.$container.add( wo.$sticky );
|
||||||
|
$sh.eq( j ).find( '.' + ts.css.headerIn ).html( th[ j ] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$f.eq( j ).html( th[ j ] );
|
||||||
|
}
|
||||||
|
if ( hsh ) {
|
||||||
|
tsp.bindEvents( c );
|
||||||
}
|
}
|
||||||
$f.eq( j ).html( th[ j ] );
|
|
||||||
}
|
|
||||||
if (hsh) {
|
|
||||||
tsp.bindEvents( c );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user