diff options
author | Giovane <giovaneliberato@gmail.com> | 2016-03-02 17:32:08 -0300 |
---|---|---|
committer | Giovane <giovaneliberato@gmail.com> | 2016-03-02 17:32:08 -0300 |
commit | 59532a50c8b0233b2a596b996cbe799b745c4fac (patch) | |
tree | 01cca3755f488e7fbc8afc902e86238691cf38f4 /web-ui/app/js/mail_view/ui/reply_section.js | |
parent | 055e7f0f12f585f138063a562d4db5b02e6d6078 (diff) |
Hides reply box container until mail data is loaded #662 with @jeffhsta
Diffstat (limited to 'web-ui/app/js/mail_view/ui/reply_section.js')
-rw-r--r-- | web-ui/app/js/mail_view/ui/reply_section.js | 20 |
1 files changed, 15 insertions, 5 deletions
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 46dfe863..cbe64205 100644 --- a/web-ui/app/js/mail_view/ui/reply_section.js +++ b/web-ui/app/js/mail_view/ui/reply_section.js @@ -36,7 +36,8 @@ define( replyAllButton: '#reply-all-button', forwardButton: '#forward-button', replyBox: '#reply-box', - replyType: 'reply' + replyType: 'reply', + replyContainer: '.reply-container' }); this.showReply = function() { @@ -64,9 +65,7 @@ define( this.checkForDraftReply = function() { this.render(); - this.select('replyButton').hide(); - this.select('replyAllButton').hide(); - this.select('forwardButton').hide(); + this.hideContainer(); this.trigger(document, events.mail.draftReply.want, {ident: this.attr.ident}); }; @@ -76,11 +75,13 @@ define( }; this.showDraftReply = function(ev, data) { + this.showContainer(); this.hideButtons(); ReplyBox.attachTo(this.select('replyBox'), { mail: data.mail, draftReply: true }); }; this.showReplyComposeBox = function (ev, data) { + this.showContainer(); this.hideButtons(); if(this.attr.replyType === 'forward') { ForwardBox.attachTo(this.select('replyBox'), { mail: data.mail }); @@ -89,6 +90,14 @@ define( } }; + this.hideContainer = function() { + this.select('replyContainer').hide(); + }; + + this.showContainer = function() { + this.select('replyContainer').show(); + }; + this.hideButtons = function() { this.select('replyButton').hide(); this.select('replyAllButton').hide(); @@ -96,6 +105,7 @@ define( }; this.showButtons = function () { + this.showContainer(); this.select('replyBox').empty(); this.select('replyButton').show(); this.select('replyAllButton').show(); @@ -109,7 +119,7 @@ define( this.on(this, events.mail.here, this.showReplyComposeBox); this.on(document, events.dispatchers.rightPane.clear, this.teardown); - this.on(document, events.mail.draftReply.notFound, this.showButtons); + this.on(document, events.ui.replyBox.showReplyContainer, this.showContainer); this.on(document, events.mail.draftReply.here, this.showDraftReply); this.checkForDraftReply(); |