diff options
-rw-r--r-- | www/js/views/existing.js | 7 | ||||
-rw-r--r-- | www/templates/en/existing.html | 1 |
2 files changed, 8 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; diff --git a/www/templates/en/existing.html b/www/templates/en/existing.html index 7518cbb..b9cae75 100644 --- a/www/templates/en/existing.html +++ b/www/templates/en/existing.html @@ -25,6 +25,7 @@ <div class="right"> <input id="use_report" type="button" value="use" class="green-btn" /> + <input id="save_report" type="button" value="save" class="green-btn" /> <input id="discard" type="button" value="discard" class="green-btn" /> </div> </div> |