aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js')
-rw-r--r--www/js/views/existing.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/www/js/views/existing.js b/www/js/views/existing.js
index 4abf857..95beee5 100644
--- a/www/js/views/existing.js
+++ b/www/js/views/existing.js
@@ -8,6 +8,7 @@
'pagehide': 'destroy',
'pageshow': 'afterDisplay',
'click #use_report': 'useReport',
+ 'click #save_report': 'saveReport',
'click #discard': 'discardReport'
},
@@ -16,6 +17,12 @@
this.navigate('around');
},
+ saveReport: function() {
+ localStorage.currentDraftID = null;
+ FMS.currentDraft = new FMS.Draft();
+ this.navigate('around');
+ },
+
discardReport: function() {
var reset = FMS.removeDraft(FMS.currentDraft.id, true);
var that = this;