aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/views/details.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-02 11:01:07 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-02 11:01:07 +0100
commit9f979f491570c6bbff8735bcfa391430543d0041 (patch)
treec6773e651e6cdcc163ea25a8724b1004308bb7cc /www/js/views/details.js
parenta6dd616d2e6d57e1a7d9ad629b2dfbfc77320bec (diff)
save and load current report on app pause and resume
Diffstat (limited to 'www/js/views/details.js')
-rw-r--r--www/js/views/details.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/www/js/views/details.js b/www/js/views/details.js
index 54edb77..79bd886 100644
--- a/www/js/views/details.js
+++ b/www/js/views/details.js
@@ -35,11 +35,15 @@
if ( valid ) {
this.clearValidationErrors();
- this.model.set('title', $('#form_title').val());
- this.model.set('details', $('#form_detail').val());
- this.model.set('category', $('#form_category').val());
+ this.updateCurrentReport();
this.navigate( this.next );
}
+ },
+
+ updateCurrentReport: function() {
+ this.model.set('category', $('#form_category').val());
+ this.model.set('title', $('#form_title').val());
+ this.model.set('details', $('#form_detail').val());
}
})
});