diff options
Diffstat (limited to 'web-ui/app/js/mail_view/ui')
-rw-r--r-- | web-ui/app/js/mail_view/ui/mail_actions.js | 15 | ||||
-rw-r--r-- | web-ui/app/js/mail_view/ui/reply_section.js | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_actions.js b/web-ui/app/js/mail_view/ui/mail_actions.js index aa90169f..65cd0aaa 100644 --- a/web-ui/app/js/mail_view/ui/mail_actions.js +++ b/web-ui/app/js/mail_view/ui/mail_actions.js @@ -37,13 +37,11 @@ define( moreActions: '#more-actions' }); - this.deleteMail = function () { - this.trigger(document, events.ui.mail.delete, {mail: this.attr.mail}); - this.select('moreActions').hide(); - }; this.displayMailActions = function () { + this.$node.html(templates.mails.mailActions()); + this.select('moreActions').hide(); this.on(this.select('replyButtonTop'), 'click', function () { @@ -55,6 +53,11 @@ define( this.select('moreActions').hide(); }.bind(this)); + this.on(this.select('deleteButtonTop'), 'click', function () { + this.trigger(document, events.ui.mail.delete, {mail: this.attr.mail}); + this.select('moreActions').hide(); + }.bind(this)); + this.on(this.select('viewMoreActions'), 'click', function () { this.select('moreActions').toggle(); }.bind(this)); @@ -69,14 +72,12 @@ define( this.select('moreActions').hide(); } }.bind(this)); + }; this.after('initialize', function () { this.on(document, events.dispatchers.rightPane.clear, this.teardown); - this.on(document, events.shortcuts.deleteMail, this.deleteMail); - this.displayMailActions(); - this.on(this.select('deleteButtonTop'), 'click', this.deleteMail); }); } } diff --git a/web-ui/app/js/mail_view/ui/reply_section.js b/web-ui/app/js/mail_view/ui/reply_section.js index 71e27b1e..46dfe863 100644 --- a/web-ui/app/js/mail_view/ui/reply_section.js +++ b/web-ui/app/js/mail_view/ui/reply_section.js @@ -112,10 +112,6 @@ define( this.on(document, events.mail.draftReply.notFound, this.showButtons); this.on(document, events.mail.draftReply.here, this.showDraftReply); - this.on(document, events.shortcuts.replyMail, this.showReply); - this.on(document, events.shortcuts.replyAllMail, this.showReplyAll); - this.on(document, events.shortcuts.forwardMail, this.showForward); - this.checkForDraftReply(); }); } |