aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/views/sent.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/views/sent.js')
-rw-r--r--src/js/views/sent.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/js/views/sent.js b/src/js/views/sent.js
new file mode 100644
index 0000000..d146db6
--- /dev/null
+++ b/src/js/views/sent.js
@@ -0,0 +1,36 @@
+(function (FMS, Backbone, _, $) {
+ _.extend( FMS, {
+ SentView: FMS.FMSView.extend({
+ template: 'sent',
+ id: 'sent-page',
+ prev: 'around',
+
+ events: {
+ 'pagehide': 'destroy',
+ 'pagebeforeshow': 'beforeDisplay',
+ 'pageshow': 'afterDisplay',
+ 'vclick .ui-btn-left': 'onClickButtonPrev',
+ 'vclick #rate_app': 'onClickRateApp'
+ },
+
+ render: function(){
+ if ( !this.template ) {
+ console.log('no template to render');
+ return;
+ }
+ template = _.template( tpl.get( this.template ) );
+ this.$el.html(template(FMS.createdReport.toJSON()));
+ this.afterRender();
+ return this;
+ },
+
+ onClickRateApp: function(e) {
+ e.preventDefault();
+ var el = $('#rate_app');
+ var href = el.attr('href');
+ window.open(href, '_system');
+ return false;
+ }
+ })
+ });
+})(FMS, Backbone, _, $);