diff options
author | Struan Donald <struan@exo.org.uk> | 2013-08-23 12:28:22 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-08-23 12:28:22 +0100 |
commit | 05a58fa513a0a20834eface604217bf80513582b (patch) | |
tree | 74a90498e71dc2b6256da5bca320c63b5af726a5 /src/js/router.js | |
parent | 3f0eaa675e1dd90cf32fae78806da5b87203b0f5 (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/router.js')
-rw-r--r-- | src/js/router.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/router.js b/src/js/router.js index 6745835..c42a742 100644 --- a/src/js/router.js +++ b/src/js/router.js @@ -37,8 +37,8 @@ }, back: function(e) { - if (this.currentView && this.currentView.prev) { - this.currentView.onClickButtonPrev(e); + if (this.currentView && this.currentView.back) { + this.currentView.back(e); } }, |