From a19459b65a8dbbc3ee12fbf7852956a1b322e3e6 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 8 Apr 2013 17:11:57 +0100 Subject: 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 --- www/js/router.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'www/js/router.js') 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); }, -- cgit v1.2.3