From: Aryeh Gregor Date: Wed, 3 Sep 2008 00:16:43 +0000 (+0000) Subject: (bug 15422) Sort more types of numbers in sortable tables X-Git-Tag: 1.31.0-rc.0~45520 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=da74d0ddfafe505e12b03ca987bf0f1dcc9c482d;p=lhc%2Fweb%2Fwiklou.git (bug 15422) Sort more types of numbers in sortable tables Patch based on one by Mike Horvath. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 75fafd977c..bff525111a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -116,6 +116,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN treated as regular expression fragments to match for when possibly displaying an external image inline. * (bugs 15405, 15436) Sort more currency types correctly in sortable tables +* (bug 15422) Sort more different types of numbers in sortable tables === Bug fixes in 1.14 === diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 717553c3e3..4dbf5ba756 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -616,7 +616,7 @@ function ts_resortTable(lnk) { // pound dollar euro yen currency cents if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/)) sortfn = ts_sort_currency; - if (itm.match(/^[\d.,]+\%?$/)) + if (itm.match(/^[\d.,eE+-]+\%?$/)) sortfn = ts_sort_numeric; var reverse = (span.getAttribute("sortdir") == 'down');