r97378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97377‎ | r97378 | r97379 >
Date:15:52, 17 September 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup to r97150 per CR: use .children() instead of .find(), more efficient and prevents potential issues with nested tables.
Modified paths:
  • /trunk/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/jquery/jquery.tablesorter.js
@@ -229,7 +229,7 @@
230230 function emulateTHead( $table ) {
231231 var $thead = $( '<thead>' );
232232 $table.find( 'tr' ).each( function() {
233 - if ( $(this).find( 'td' ).length > 0 ) {
 233+ if ( $(this).children( 'td' ).length > 0 ) {
234234 // This row contains a <td>, so it's not a header row
235235 // Stop here
236236 return false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r97459REL1_18 MFT r97145, r97150, r97378...reedy08:21, 19 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97150Update jquery.tablesorter for r97145: emulate <thead> if there is no <thead> ...catrope13:15, 15 September 2011

Status & tagging log