aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/around.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-06-07 15:18:44 +0100
committerStruan Donald <struan@exo.org.uk>2013-06-07 15:33:49 +0100
commita95deb9f34a79efbe1a682b11d2a2146b82c40b5 (patch)
tree9f00391683ff65d9268aae411091e9038eeabe30 /www/js/views/around.js
parentb2ce0c4a328de1919b948683170baac7565a4a9e (diff)
More explicable behaviour when you click cancel on the map screen
If the report only has location details then just throw them away, otherwise leave the report as a draft and then create a new draft
Diffstat (limited to 'www/js/views/around.js')
-rw-r--r--www/js/views/around.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js
index d1075f6..39d58e5 100644
--- a/www/js/views/around.js
+++ b/www/js/views/around.js
@@ -165,8 +165,12 @@
$('#view-my-reports').show();
$('#login-options').show();
$('#mark-here').show();
- this.model.set('lat', null);
- this.model.set('lon', null);
+ if ( this.model.isPartial() ) {
+ FMS.clearCurrentDraft();
+ } else {
+ this.model.set('lat', null);
+ this.model.set('lon', null);
+ }
fixmystreet.markers.setVisibility(true);
fixmystreet.select_feature.activate();
},