diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/app.js | 2 | ||||
-rw-r--r-- | www/js/router.js | 8 | ||||
-rw-r--r-- | www/js/views/sent.js | 15 |
3 files changed, 23 insertions, 2 deletions
diff --git a/www/js/app.js b/www/js/app.js index cba1707..035c0ae 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -38,7 +38,7 @@ var tpl = { ;(function (FMS, Backbone, _, $) { _.extend(FMS, { templates: [ - 'home', 'around', 'photo', 'details', 'submit' + 'home', 'around', 'photo', 'details', 'submit', 'sent' ], initialized: 0, diff --git a/www/js/router.js b/www/js/router.js index 60901bf..f241184 100644 --- a/www/js/router.js +++ b/www/js/router.js @@ -9,7 +9,8 @@ 'around': 'around', 'photo': 'photo', 'details': 'details', - 'submit': 'submit' + 'submit': 'submit', + 'sent': 'sent' }, initialize: function() { @@ -46,6 +47,11 @@ this.changeView(submitView); }, + sent: function(){ + var sentView = new FMS.SentView({ model: FMS.currentReport }); + this.changeView(sentView); + }, + changeView: function(view) { console.log( 'change View to ' + view.id ); $(view.el).attr('data-role', 'page'); diff --git a/www/js/views/sent.js b/www/js/views/sent.js new file mode 100644 index 0000000..cc683e1 --- /dev/null +++ b/www/js/views/sent.js @@ -0,0 +1,15 @@ +;(function (FMS, Backbone, _, $) { + _.extend( FMS, { + SentView: FMS.FMSView.extend({ + template: 'sent', + id: 'sent-page', + prev: 'around', + + events: { + 'pagehide': 'destroy', + 'pageshow': 'afterDisplay', + 'vclick .ui-btn-left': 'onClickButtonPrev' + } + }) + }); +})(FMS, Backbone, _, $); |