Allow defining sortable value for table cell with data-sort-value.
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 18 Sep 2010 08:28:19 +0000 (08:28 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 18 Sep 2010 08:28:19 +0000 (08:28 +0000)
This should remove the need to hack around with hidden text and the cell content.

skins/common/wikibits.js

index 79f7aba..6c7d450 100644 (file)
@@ -386,6 +386,10 @@ window.addPortletLink = function( portlet, href, text, id, tooltip, accesskey, n
 }
 
 window.getInnerText = function( el ) {
+       if ( el.getAttribute( 'data-sort-value' ) !== null ) {
+               return el.getAttribute( 'data-sort-value' );
+       }
+       
        if ( typeof el == 'string' ) {
                return el;
        }