mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
HTML: define decimal explicitly for parseInt()
Older browser assume octal radix on parseInt() when number starts with 0, thus declaring decimal notation explicitly. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
60e512c6f4
commit
9abfe22100
1 changed files with 5 additions and 5 deletions
|
@ -136,7 +136,7 @@ function collapseAll(){
|
|||
|
||||
function setNumberOfDives(e){
|
||||
var value = e.options[e.selectedIndex].value;
|
||||
sizeofpage=parseInt(value);
|
||||
sizeofpage=parseInt(value,10);
|
||||
var end = start + sizeofpage -1;
|
||||
view_in_range(start,end);
|
||||
}
|
||||
|
@ -325,16 +325,16 @@ function cmpDateDes(j,iSmaller){
|
|||
return items[j].date > items[iSmaller].date ;
|
||||
}
|
||||
function cmpAtempAsc(j,iSmaller){
|
||||
return parseInt(items[j].temperature.air) < parseInt(items[iSmaller].temperature.air) ;
|
||||
return parseInt(items[j].temperature.air,10) < parseInt(items[iSmaller].temperature.air,10) ;
|
||||
}
|
||||
function cmpAtempDes(j,iSmaller){
|
||||
return parseInt(items[j].temperature.air) > parseInt(items[iSmaller].temperature.air) ;
|
||||
return parseInt(items[j].temperature.air,10) > parseInt(items[iSmaller].temperature.air,10) ;
|
||||
}
|
||||
function cmpWtempAsc(j,iSmaller){
|
||||
return parseInt(items[j].temperature.water) < parseInt(items[iSmaller].temperature.water) ;
|
||||
return parseInt(items[j].temperature.water,10) < parseInt(items[iSmaller].temperature.water,10) ;
|
||||
}
|
||||
function cmpWtempDes(j,iSmaller){
|
||||
return parseInt(items[j].temperature.water) > parseInt(items[iSmaller].temperature.water) ;
|
||||
return parseInt(items[j].temperature.water,10) > parseInt(items[iSmaller].temperature.water,10) ;
|
||||
}
|
||||
|
||||
function sort_it(sortOn,function_){
|
||||
|
|
Loading…
Add table
Reference in a new issue