aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/router.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/router.js')
-rw-r--r--www/js/router.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/www/js/router.js b/www/js/router.js
index f220422..fe43d69 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -6,6 +6,7 @@
routes: {
'': 'home',
'home': 'home',
+ 'offline': 'offline',
'around': 'around',
'search': 'search',
'existing': 'existing',
@@ -15,7 +16,8 @@
'submit-email': 'submitEmail',
'submit-name': 'submitName',
'submit-password': 'submitPassword',
- 'sent': 'sent'
+ 'sent': 'sent',
+ 'reports': 'reports'
},
initialize: function() {
@@ -53,6 +55,11 @@
this.changeView(homeView);
},
+ offline: function() {
+ var offlineView = new FMS.OfflineView({ model: FMS.currentDraft });
+ this.changeView(offlineView);
+ },
+
photo: function(){
var photoView = new FMS.PhotoView({ model: FMS.currentDraft });
this.changeView(photoView);
@@ -88,6 +95,11 @@
this.changeView(sentView);
},
+ reports: function() {
+ var reportsView = new FMS.ReportsView({ model: FMS.currentDraft });
+ this.changeView(reportsView);
+ },
+
changeView: function(view) {
console.log( 'change View to ' + view.id );
$(view.el).attr('data-role', 'page');