From 29bfdd509d88aef16873207683302bec22bfe5a9 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Tue, 5 Jan 2016 10:54:37 -0200 Subject: Revert "Issue #25 - Implemented shortcuts on UI" This reverts commit aa66beb0c74ebaa950a083ed991f6e5f50f9c9ac. This commit broke the functional tests, so we are reverting it for now, while we fix it --- web-ui/app/js/mail_view/ui/mail_actions.js | 15 ++++++++------- web-ui/app/js/mail_view/ui/reply_section.js | 4 ---- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'web-ui/app/js/mail_view/ui') 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(); }); } -- cgit v1.2.3