mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Scroller: Move caption to cloned thead. Fixes #1141
This commit is contained in:
parent
268706acbe
commit
61f38b81b1
2
dist/js/widgets/widget-scroller.min.js
vendored
2
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
@ -214,6 +214,7 @@
|
|||||||
maxHt = wo.scroller_height || 300;
|
maxHt = wo.scroller_height || 300;
|
||||||
|
|
||||||
$hdr = $( '<table class="' + $table.attr( 'class' ) + '" cellpadding=0 cellspacing=0>' +
|
$hdr = $( '<table class="' + $table.attr( 'class' ) + '" cellpadding=0 cellspacing=0>' +
|
||||||
|
$table.children( 'caption' )[ 0 ].outerHTML +
|
||||||
$table.children( 'thead' )[ 0 ].outerHTML + '</table>' );
|
$table.children( 'thead' )[ 0 ].outerHTML + '</table>' );
|
||||||
wo.scroller_$header = $hdr.addClass( c.namespace.slice( 1 ) + '_extra_table' );
|
wo.scroller_$header = $hdr.addClass( c.namespace.slice( 1 ) + '_extra_table' );
|
||||||
|
|
||||||
@ -260,9 +261,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$table
|
$table
|
||||||
.find( 'thead' )
|
.children( 'thead, caption' )
|
||||||
.addClass( tscss.scrollerHideElement );
|
.addClass( tscss.scrollerHideElement );
|
||||||
|
|
||||||
tbHt = $tableWrap.parent().height();
|
tbHt = $tableWrap.parent().height();
|
||||||
|
|
||||||
// The header will always jump into view if scrolling the table body
|
// The header will always jump into view if scrolling the table body
|
||||||
@ -444,7 +444,7 @@
|
|||||||
.width( setWidth + temp );
|
.width( setWidth + temp );
|
||||||
|
|
||||||
// hide original table thead
|
// hide original table thead
|
||||||
$table.children( 'thead' ).addClass( tscss.scrollerHideElement );
|
$table.children( 'thead, caption' ).addClass( tscss.scrollerHideElement );
|
||||||
|
|
||||||
// update fixed column sizes
|
// update fixed column sizes
|
||||||
tsScroller.updateFixed( c, wo );
|
tsScroller.updateFixed( c, wo );
|
||||||
@ -479,6 +479,8 @@
|
|||||||
.removeClass( tscss.scrollerWrap )
|
.removeClass( tscss.scrollerWrap )
|
||||||
.attr( 'id', '' );
|
.attr( 'id', '' );
|
||||||
|
|
||||||
|
$fixedColumn.find('caption').html(' ');
|
||||||
|
|
||||||
if ( wo.scroller_addFixedOverlay ) {
|
if ( wo.scroller_addFixedOverlay ) {
|
||||||
$fixedColumn.append( '<div class="' + tscss.scrollerFixedPanel + '">' );
|
$fixedColumn.append( '<div class="' + tscss.scrollerFixedPanel + '">' );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user