aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/views/existing.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/existing.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/existing.js')
-rw-r--r--src/js/views/existing.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/js/views/existing.js b/src/js/views/existing.js
index 0d16760..a34fd0b 100644
--- a/src/js/views/existing.js
+++ b/src/js/views/existing.js
@@ -13,6 +13,10 @@
'vclick #discard': 'discardReport'
},
+ _back: function() {
+ navigator.app.exitApp();
+ },
+
setHeight: function(content, height) {
content.css( 'min-height', content + 'px');
},