aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-08-11 17:20:34 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-14 09:52:45 -0600
commit00a86b44ba97fa2fcee94c5840dcc7e2164dd5a6 (patch)
tree8c256ac1535133073c7aa85ec4255437a047d678
parentecf0408aae4024f70a3c9689d1de394a2f47a0ff (diff)
downloadsubsurface-00a86b44ba97fa2fcee94c5840dcc7e2164dd5a6.tar.gz
HTML: Fix sorting water and air temperature values
Parse values by float instead of integer. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--theme/list_lib.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 348765bff..085d049c4 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -401,22 +401,22 @@ function cmpDateDes(j, iSmaller)
function cmpAtempAsc(j, iSmaller)
{
- return parseInt(items[j].temperature.air, 10) < parseInt(items[iSmaller].temperature.air, 10);
+ return parseFloat(items[j].temperature.air, 10) < parseFloat(items[iSmaller].temperature.air, 10);
}
function cmpAtempDes(j, iSmaller)
{
- return parseInt(items[j].temperature.air, 10) > parseInt(items[iSmaller].temperature.air, 10);
+ return parseFloat(items[j].temperature.air, 10) > parseFloat(items[iSmaller].temperature.air, 10);
}
function cmpWtempAsc(j, iSmaller)
{
- return parseInt(items[j].temperature.water, 10) < parseInt(items[iSmaller].temperature.water, 10);
+ return parseFloat(items[j].temperature.water, 10) < parseFloat(items[iSmaller].temperature.water, 10);
}
function cmpWtempDes(j, iSmaller)
{
- return parseInt(items[j].temperature.water, 10) > parseInt(items[iSmaller].temperature.water, 10);
+ return parseFloat(items[j].temperature.water, 10) > parseFloat(items[iSmaller].temperature.water, 10);
}
function sort_it(sortOn, function_)