User "Krinkle" changed the status of MediaWiki.r97150.

Old Status: new
New Status: fixme

User "Krinkle" also posted a comment on MediaWiki.r97150.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97150#c22706
Commit summary:

Update jquery.tablesorter for r97145: emulate <thead> if there is no <thead> in 
the HTML, by walking down the table starting at the first row and moving rows 
to the <thead> as long as all of its cells are <th>s (or the row is empty). 
Also fix and simplify the sortbottom code, which was incorrectly creating 
multiple <tfoot> elements if there were multiple sortbottom rows.

Comment:

Also needs testing, last time I tried a table without a THEAD will not work 
properly with sortable. Would be nice to have that. Then I found this rev and 
turns out it doesn't work (atleast not for me, so let's build in a unit test)

Bug:
<pre>

+               $table.find( 'tr' ).each( function() {
+                       if ( $(this).find( 'td' ).length > 0 ) {
+                               // This row contains a <td>, so it's not a 
header row
+                               // Stop here
+                               return false;
+                       }
+                       $thead.append( this );
+               } );
</pre>
Returning false from the each callback aborts the loop, which is likely not 
what you intend.  See also [http://api.jquery.com/each/ docs].

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to