aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-11-26 18:04:28 +0000
committerStruan Donald <struan@exo.org.uk>2012-11-27 11:23:05 +0000
commit2d220d0bb8baf69dd57780b7788dd6c390fac975 (patch)
tree0ee519717d6ce269a4209164ef66c27b0900bf5a /www/js
parent553f2e6be71e7732038a6847b00104246f7f58d5 (diff)
reset accuracy string once we leave this page
Diffstat (limited to 'www/js')
-rw-r--r--www/js/mobile.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js
index 4c3193d..ce1a23e 100644
--- a/www/js/mobile.js
+++ b/www/js/mobile.js
@@ -140,7 +140,7 @@ var watch_id = null;
function foundLocation(myLocation) {
var lat = myLocation.coords.latitude;
var long = myLocation.coords.longitude;
- $('#accuracy').text('have position within ' + parseInt(myLocation.coords.accuracy) + ' meters');
+ $('#accuracy').text('have position within ' + parseInt(myLocation.coords.accuracy, 10) + ' meters');
if ( myLocation.coords.accuracy < 100 ) {
navigator.geolocation.clearWatch(watch_id);
show_around( lat, long );
@@ -695,6 +695,10 @@ function submit_problem_show() {
var geocheck_count = 0;
+function prep_front_page() {
+ $('#accuracy').text('');
+}
+
function decide_front_page() {
$.mobile.loading( 'show' );
if ( !can_geolocate && ( !navigator.network || !navigator.network.connection ) ) {
@@ -741,6 +745,7 @@ $(document).on('pageshow', '#report-created', function() {
});
+$(document).on('pagebeforeshow', '#front-page', prep_front_page);
$(document).on('pageshow', '#front-page', decide_front_page);
$(document).on('pageshow', '#account-page', display_account_page);
$(document).on('pageshow', '#my-reports-page', display_saved_reports);