diff options
author | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2015-01-12 16:49:07 -0200 |
---|---|---|
committer | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2015-01-12 20:08:15 -0200 |
commit | cd741c3cb6a9c64ad30257240565be884e9084ae (patch) | |
tree | 7c8a2ef6b4696af192ac0d4f4a3472de68170c92 /web-ui/app/js/mail_list/ui/mail_items/sent_item.js | |
parent | eedb11f19463b10699fef0061bba12a8300f9187 (diff) |
#153 Move duplicated funcion render to just mail_item.js
Diffstat (limited to 'web-ui/app/js/mail_list/ui/mail_items/sent_item.js')
-rw-r--r-- | web-ui/app/js/mail_list/ui/mail_items/sent_item.js | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js index 3682188b..7406b3f3 100644 --- a/web-ui/app/js/mail_list/ui/mail_items/sent_item.js +++ b/web-ui/app/js/mail_list/ui/mail_items/sent_item.js @@ -19,12 +19,11 @@ define( [ 'flight/lib/component', - 'views/templates', 'mail_list/ui/mail_items/mail_item', 'page/events' ], - function (defineComponent, templates, mailItem, events) { + function (defineComponent, mailItem, events) { 'use strict'; return defineComponent(sentItem, mailItem); @@ -50,17 +49,9 @@ define( this.trigger(document, events.ui.mail.updateSelected, { ident: this.attr.ident }); }; - this.render = function () { - this.attr.tagsForListView = _.without(this.attr.tags, this.attr.tag); - var mailItemHtml = templates.mails.sent(this.attr); - this.$node.html(mailItemHtml); - this.$node.addClass(this.attr.statuses); - if(this.attr.selected) { this.doSelect(); } - this.on(this.$node.find('a'), 'click', this.triggerOpenMail); - }; - this.after('initialize', function () { this.initializeAttributes(); + this.attr.tagsForListView = _.without(this.attr.tags, this.attr.tag); this.render(); this.attachListeners(); |