From 000d483d8cfd08bc18c0c5b82429c73889cf265c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 18 Sep 2010 08:28:19 +0000 Subject: [PATCH] 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. --- skins/common/wikibits.js | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.20.1