From d6ca3d70cf5500a1821603d52d8a97796fc108b8 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 15 Feb 2021 20:07:49 +0100 Subject: [PATCH] Listview/Percent * use same logic for display and sorting --- static/js/global.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/static/js/global.js b/static/js/global.js index fd3f5b4e..4eaf0503 100644 --- a/static/js/global.js +++ b/static/js/global.js @@ -1,3 +1,4 @@ + // Needed for IE because it's dumb 'abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video'.replace(/\w+/g,function(n){document.createElement(n)}) @@ -7725,21 +7726,23 @@ Listview.extraCols = { } if (a.percent >= 1.95) { - var acmp = a.percent.toFixed(0); - } - else if (a.percent >= 0.195) { - acmp = parseFloat(a.percent.toFixed(1)); + var acmp = a.percent.toFixed(1); + // var acmp = a.percent.toFixed(0); } + // else if (a.percent >= 0.195) { + // acmp = parseFloat(a.percent.toFixed(1)); + // } else { acmp = parseFloat(a.percent.toFixed(2)); } if (b.percent >= 1.95) { - var bcmp = b.percent.toFixed(0); - } - else if (b.percent >= 0.195) { - bcmp = parseFloat(b.percent.toFixed(1)); + var bcmp = b.percent.toFixed(1); + // var bcmp = b.percent.toFixed(0); } + // else if (b.percent >= 0.195) { + // bcmp = parseFloat(b.percent.toFixed(1)); + // } else { bcmp = parseFloat(b.percent.toFixed(2)); }