From: Niklas Laxström Date: Sat, 18 Sep 2010 08:28:19 +0000 (+0000) Subject: Allow defining sortable value for table cell with data-sort-value. X-Git-Tag: 1.31.0-rc.0~34882 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=000d483d8cfd08bc18c0c5b82429c73889cf265c;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 79f7aba4f0..6c7d450ef5 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -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; }