Fix numeric sorting
authorJamie Cameron <jcameron@webmin.com>
Sat, 21 Mar 2009 20:48:03 +0000 (20:48 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 21 Mar 2009 20:48:03 +0000 (20:48 +0000)
blue-theme/unauthenticated/sorttable.js

index 8794c49..9a6476b 100644 (file)
@@ -76,10 +76,10 @@ function ts_resortTable(lnk,clid) {
     if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date;
     if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date;
     if (itm.match(/^[£$]/)) sortfn = ts_sort_currency;
-    //if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric;
     if (itm.match(/^[\d\.]+\s*(bytes|b|kb|tb|gb|mb)$/i)) sortfn = ts_sort_filesize;
     // Special cases for our mailbox lists
     if (itm.match(/^(Empty|Unlimited)$/)) sortfn = ts_sort_filesize;
+    if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric;
     SORT_COLUMN_INDEX = column;
     var firstRow = new Array();
     var newRows = new Array();