aboutsummaryrefslogtreecommitdiffstats
path: root/www/js/router.js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-04-18 11:50:52 +0100
committerStruan Donald <struan@exo.org.uk>2013-04-18 11:57:55 +0100
commita78194a0aa6fab68e82dc035f2f95281a653265f (patch)
tree6d6f57174b2919ac0031bf1f2363d921e8730cd1 /www/js/router.js
parent4927e38eb8f108d4e910e691f593bca4992fb28f (diff)
display a save for later page if between starting the report and
submitting it we have gone offline
Diffstat (limited to 'www/js/router.js')
-rw-r--r--www/js/router.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/www/js/router.js b/www/js/router.js
index fe43d69..269f2e7 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -16,6 +16,7 @@
'submit-email': 'submitEmail',
'submit-name': 'submitName',
'submit-password': 'submitPassword',
+ 'save_offline': 'saveOffline',
'sent': 'sent',
'reports': 'reports'
},
@@ -90,6 +91,11 @@
this.changeView(submitPasswordView);
},
+ saveOffline: function(){
+ var saveOfflineView = new FMS.saveOfflineView({ model: FMS.currentDraft });
+ this.changeView(saveOfflineView);
+ },
+
sent: function(){
var sentView = new FMS.SentView({ model: FMS.currentDraft });
this.changeView(sentView);