mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ecf0408aae
commit
00a86b44ba
1 changed files with 4 additions and 4 deletions
|
@ -401,22 +401,22 @@ function cmpDateDes(j, iSmaller)
|
||||||
|
|
||||||
function cmpAtempAsc(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)
|
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)
|
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)
|
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_)
|
function sort_it(sortOn, function_)
|
||||||
|
|
Loading…
Add table
Reference in a new issue