Index: trunk/phase3/resources/jquery/jquery.tablesorter.js |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | * @param $table jQuery object for a <table> |
232 | 232 | */ |
233 | 233 | function emulateTHeadAndFoot( $table ) { |
234 | | - var $rows = $table.find( 'tr' ); |
| 234 | + var $rows = $table.find( '> tbody > tr' ); |
235 | 235 | if( !$table.get(0).tHead ) { |
236 | 236 | var $thead = $( '<thead>' ); |
237 | 237 | $rows.each( function() { |
— | — | @@ -270,7 +270,7 @@ |
271 | 271 | }); |
272 | 272 | $tableHeaders = $( longest ); |
273 | 273 | } |
274 | | - $tableHeaders = $tableHeaders.find( 'th' ).each( function( index ) { |
| 274 | + $tableHeaders = $tableHeaders.children( 'th' ).each( function( index ) { |
275 | 275 | this.column = realCellIndex; |
276 | 276 | |
277 | 277 | var colspan = this.colspan; |
— | — | @@ -442,13 +442,13 @@ |
443 | 443 | |
444 | 444 | function explodeRowspans( $table ) { |
445 | 445 | // Split multi row cells into multiple cells with the same content |
446 | | - $table.find( 'tbody [rowspan]' ).each(function() { |
| 446 | + $table.find( '> tbody [rowspan]' ).each(function() { |
447 | 447 | var rowSpan = this.rowSpan; |
448 | 448 | this.rowSpan = 1; |
449 | 449 | var cell = $( this ); |
450 | 450 | var next = cell.parent().nextAll(); |
451 | 451 | for ( var i = 0; i < rowSpan - 1; i++ ) { |
452 | | - var td = next.eq( i ).find( 'td' ); |
| 452 | + var td = next.eq( i ).children( 'td' ); |
453 | 453 | if ( !td.length ) { |
454 | 454 | next.eq( i ).append( cell.clone() ); |
455 | 455 | } else if ( this.cellIndex === 0 ) { |
— | — | @@ -599,10 +599,10 @@ |
600 | 600 | // Legacy fix of .sortbottoms |
601 | 601 | // Wrap them inside inside a tfoot (because that's what they actually want to be) & |
602 | 602 | // and put the <tfoot> at the end of the <table> |
603 | | - var $sortbottoms = $table.find( 'tr.sortbottom' ); |
| 603 | + var $sortbottoms = $table.find( '> tbody > tr.sortbottom' ); |
604 | 604 | if ( $sortbottoms.length ) { |
605 | | - var $tfoot = $table.find( 'tfoot' ); |
606 | | - if( $tfoot.length ) { |
| 605 | + var $tfoot = $table.children( 'tfoot' ); |
| 606 | + if ( $tfoot.length ) { |
607 | 607 | $tfoot.eq(0).prepend( $sortbottoms ); |
608 | 608 | } else { |
609 | 609 | $table.append( $( '<tfoot>' ).append( $sortbottoms ) ) |