r40348 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40347‎ | r40348 | r40349 >
Date:00:16, 3 September 2008
Author:simetrical
Status:old
Tags:
Comment:
(bug 15422) Sort more types of numbers in sortable tables

Patch based on one by Mike Horvath.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -616,7 +616,7 @@
617617 // pound dollar euro yen currency cents
618618 if (itm.match(/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/))
619619 sortfn = ts_sort_currency;
620 - if (itm.match(/^[\d.,]+\%?$/))
 620+ if (itm.match(/^[\d.,eE+-]+\%?$/))
621621 sortfn = ts_sort_numeric;
622622
623623 var reverse = (span.getAttribute("sortdir") == 'down');
Index: trunk/phase3/RELEASE-NOTES
@@ -116,6 +116,7 @@
117117 treated as regular expression fragments to match for when possibly
118118 displaying an external image inline.
119119 * (bugs 15405, 15436) Sort more currency types correctly in sortable tables
 120+* (bug 15422) Sort more different types of numbers in sortable tables
120121
121122 === Bug fixes in 1.14 ===
122123

Follow-up revisions

RevisionCommit summaryAuthorDate
r40379Use ECMAScript standard, section 9.3, to decide what's a number...simetrical13:45, 3 September 2008