aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-06-27 12:16:46 +0100
committerStruan Donald <struan@exo.org.uk>2013-06-28 09:44:02 +0100
commitaaada04f334c23a0b91ec3feab1825a23f7224c7 (patch)
tree7e28cdfb2031141877b51bc300206cc9d86f2ed8
parent5d62b493baf8579c3351cb84e3f2dbff1c979763 (diff)
if cancel locating then make sure map buttons are in correct state and also display help message
-rw-r--r--www/js/strings.js1
-rw-r--r--www/js/views/around.js7
2 files changed, 8 insertions, 0 deletions
diff --git a/www/js/strings.js b/www/js/strings.js
index 9f2b3c5..40b3835 100644
--- a/www/js/strings.js
+++ b/www/js/strings.js
@@ -31,6 +31,7 @@
report_send_error: 'There was a problem submitting your report. Please try again',
missing_location: 'Please enter a location',
location_check_failed: 'Could not check your location',
+ locate_dismissed: 'Please search for a street name and area, or postcode.',
geolocation_failed: 'Could not determine your location, please search for a street name and area, or postcode instead.',
geolocation_denied: 'Could not access location services. Please check permissions.',
select_category: '-- Pick a categoy --',
diff --git a/www/js/views/around.js b/www/js/views/around.js
index 34f93db..fc9a7e6 100644
--- a/www/js/views/around.js
+++ b/www/js/views/around.js
@@ -257,6 +257,7 @@
fixmystreet.map.panTo(this.projectCoords( coords ));
} else {
this.setMapPosition(info);
+ this.displayButtons(false);
}
},
@@ -314,6 +315,12 @@
goSearch: function(e) {
e.preventDefault();
+ if ( !fixmystreet.map ) {
+ this.$('#mark-here').hide();
+ this.$('#relocate').hide();
+ $('#front-howto').html('<p>' + FMS.strings.locate_dismissed + '</msg>');
+ $('#front-howto').show();
+ }
this.finishedLocating();
},