aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/views/fms.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-23 12:28:22 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-23 12:28:22 +0100
commit05a58fa513a0a20834eface604217bf80513582b (patch)
tree74a90498e71dc2b6256da5bca320c63b5af726a5 /src/js/views/fms.js
parent3f0eaa675e1dd90cf32fae78806da5b87203b0f5 (diff)
Correctly handle back button on start screens
On the inital screens the android back button should quit the app, or if on the map screen and you've started a report it should cancel it. Add in a default back method to FMSView and an override method for the map, exising report and offline screens Fixes #117
Diffstat (limited to 'src/js/views/fms.js')
-rw-r--r--src/js/views/fms.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/js/views/fms.js b/src/js/views/fms.js
index f60bf77..214dc2c 100644
--- a/src/js/views/fms.js
+++ b/src/js/views/fms.js
@@ -13,6 +13,14 @@
'vclick .ui-btn-right': 'onClickButtonNext'
},
+ back: function(e) {
+ if ( this._back ) {
+ this._back(e);
+ } else if ( this.prev ) {
+ this.onClickButtonPrev(e);
+ }
+ },
+
render: function(){
if ( !this.template ) {
console.log('no template to render');