Skip to content
Snippets Groups Projects
Verified Commit d2b6ad6e authored by Šimon Berka's avatar Šimon Berka
Browse files

fix sorttable.js to consider Unlimited as high number

parent 18c40642
No related branches found
No related tags found
No related merge requests found
......@@ -260,12 +260,14 @@ sorttable = {
you are comparing a[0] and b[0] */
sort_numeric: function(a,b) {
aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
if (isNaN(aa)) aa = 0;
if (isNaN(aa)) aa = 1000000;
bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));
if (isNaN(bb)) bb = 0;
if (isNaN(bb)) bb = 1000000;
return aa-bb;
},
sort_alpha: function(a,b) {
if (a[0] == "Unlimited") { a[0] = 1000000}
if (b[0] == "Unlimited") { b[0] = 1000000}
if (a[0]==b[0]) return 0;
if (a[0]<b[0]) return -1;
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment