aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-18 11:56:54 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-18 11:57:55 +0100
commit11417c023c512a88a602e8cd74ccfea0d87ac4c7 (patch)
treeecfba854f6c5621bf4c9eff53bdd2084e0e92993 /www/js
parenta78194a0aa6fab68e82dc035f2f95281a653265f (diff)
if we have gone offline while on the map page and we click report then
display the create an offline report page
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/around.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js
index cc4bf4f..3664d64 100644
--- a/www/js/views/around.js
+++ b/www/js/views/around.js
@@ -149,9 +149,13 @@
onClickReport: function() {
var position = this.getCrossHairPosition();
- this.listenTo(FMS.locator, 'gps_located', this.goPhoto);
- this.listenTo(FMS.locator, 'gps_failed', this.noMap );
- FMS.locator.check_location( { latitude: position.lat, longitude: position.lon } );
+ if ( FMS.isOffline ) {
+ this.navigate( 'offline' );
+ } else {
+ this.listenTo(FMS.locator, 'gps_located', this.goPhoto);
+ this.listenTo(FMS.locator, 'gps_failed', this.noMap );
+ FMS.locator.check_location( { latitude: position.lat, longitude: position.lon } );
+ }
},
goPhoto: function(info) {