summaryrefslogtreecommitdiffstats
path: root/theme/list_lib.js
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-06-06 19:48:40 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-06 10:17:46 -0700
commit9abfe221000b7416e04062c52717fff1b251a902 (patch)
treef1300b0d68070d1daef6f5129066ac99b06f817b /theme/list_lib.js
parent60e512c6f4f334b23ac582ce2fd33515ae8077ae (diff)
downloadsubsurface-9abfe221000b7416e04062c52717fff1b251a902.tar.gz
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>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r--theme/list_lib.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 9d02f0683..acbe95d77 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -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_){