http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73270

Revision: 73270
Author:   nikerabbit
Date:     2010-09-18 08:28:19 +0000 (Sat, 18 Sep 2010)

Log Message:
-----------
Allow defining sortable value for table cell with data-sort-value.
This should remove the need to hack around with hidden text and the cell 
content.

Modified Paths:
--------------
    trunk/phase3/skins/common/wikibits.js

Modified: trunk/phase3/skins/common/wikibits.js
===================================================================
--- trunk/phase3/skins/common/wikibits.js       2010-09-18 08:00:17 UTC (rev 
73269)
+++ trunk/phase3/skins/common/wikibits.js       2010-09-18 08:28:19 UTC (rev 
73270)
@@ -386,6 +386,10 @@
 }
 
 window.getInnerText = function( el ) {
+       if ( el.getAttribute( 'data-sort-value' ) !== null ) {
+               return el.getAttribute( 'data-sort-value' );
+       }
+       
        if ( typeof el == 'string' ) {
                return el;
        }



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

Reply via email to