diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-08 17:11:57 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-08 18:55:37 +0100 |
commit | a19459b65a8dbbc3ee12fbf7852956a1b322e3e6 (patch) | |
tree | 51f3a9cf8365e9d74fab63a8acc09fe078598048 /www/js/router.js | |
parent | bd3a482f3c268c6f4e31c4be0e9b2b8d6045b680 (diff) |
Trying to use the same model for both remote and localStorage was
involving all sorts of hackery so it's easier and cleaner to move to
separate models for reports and drafts
Diffstat (limited to 'www/js/router.js')
-rw-r--r-- | www/js/router.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/www/js/router.js b/www/js/router.js index f3153ba..c259c05 100644 --- a/www/js/router.js +++ b/www/js/router.js @@ -21,8 +21,8 @@ }, pause: function() { - if (this.currentView && this.currentView.updateCurrentReport) { - this.currentView.updateCurrentReport(); + if (this.currentView && this.currentView.updateCurrentDraft) { + this.currentView.updateCurrentDraft(); } }, @@ -33,52 +33,52 @@ }, around: function(){ - var aroundView = new FMS.AroundView({ model: FMS.currentReport }); + var aroundView = new FMS.AroundView({ model: FMS.currentDraft }); this.changeView(aroundView); }, search: function(){ - var searchView = new FMS.SearchView({ model: FMS.currentReport, msg: FMS.searchMessage }); + var searchView = new FMS.SearchView({ model: FMS.currentDraft, msg: FMS.searchMessage }); this.changeView(searchView); }, home: function(){ - var homeView = new FMS.HomeView({ model: FMS.currentReport }); + var homeView = new FMS.HomeView({ model: FMS.currentDraft }); this.changeView(homeView); }, photo: function(){ - var photoView = new FMS.PhotoView({ model: FMS.currentReport }); + var photoView = new FMS.PhotoView({ model: FMS.currentDraft }); this.changeView(photoView); }, details: function(){ - var detailsView = new FMS.DetailsView({ model: FMS.currentReport }); + var detailsView = new FMS.DetailsView({ model: FMS.currentDraft }); this.changeView(detailsView); }, submit: function(){ - var submitView = new FMS.SubmitView({ model: FMS.currentReport }); + var submitView = new FMS.SubmitView({ model: FMS.currentDraft }); this.changeView(submitView); }, submitEmail: function(){ - var submitEmailView = new FMS.SubmitEmailView({ model: FMS.currentReport }); + var submitEmailView = new FMS.SubmitEmailView({ model: FMS.currentDraft }); this.changeView(submitEmailView); }, submitName: function(){ - var submitNameView = new FMS.SubmitNameView({ model: FMS.currentReport }); + var submitNameView = new FMS.SubmitNameView({ model: FMS.currentDraft }); this.changeView(submitNameView); }, submitPassword: function(){ - var submitPasswordView = new FMS.SubmitPasswordView({ model: FMS.currentReport }); + var submitPasswordView = new FMS.SubmitPasswordView({ model: FMS.currentDraft }); this.changeView(submitPasswordView); }, sent: function(){ - var sentView = new FMS.SentView({ model: FMS.currentReport }); + var sentView = new FMS.SentView({ model: FMS.currentDraft }); this.changeView(sentView); }, |