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.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/www/js/router.js b/www/js/router.js
index 9d7e751..748ef1a 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -19,7 +19,8 @@
'submit-password': 'submitPassword',
'save_offline': 'saveOffline',
'sent': 'sent',
- 'reports': 'reports'
+ 'reports': 'reports',
+ 'login': 'login'
},
initialize: function() {
@@ -117,6 +118,11 @@
this.changeView(reportsView);
},
+ login: function() {
+ var loginView = new FMS.LoginView({ model: FMS.currentUser });
+ this.changeView(loginView);
+ },
+
changeView: function(view) {
console.log( 'change View to ' + view.id );
$(view.el).attr('data-role', 'page');