From: Alexander Ebert Date: Fri, 23 May 2014 09:05:17 +0000 (+0200) Subject: Hide reply button if reply box is open X-Git-Tag: 2.1.0_Alpha_1~806^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62373e04dc9bf224a3bdb48feb4cca86802f8605;p=GitHub%2FWoltLab%2FWCF.git Hide reply button if reply box is open --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 1fec88ef48..2612c5d380 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -579,6 +579,12 @@ WCF.Message.QuickReply = Class.extend({ */ _proxy: null, + /** + * collection of quick reply buttons + * @var jQuery + */ + _quickReplyButtons: null, + /** * quote manager object * @var WCF.Message.Quote.Manager @@ -620,7 +626,7 @@ WCF.Message.QuickReply = Class.extend({ if (quoteManager) this._quoteManager = quoteManager; - $('.jsQuickReply').data('__api', this).click($.proxy(this.click, this)); + this._quickReplyButtons = $('.jsQuickReply').data('__api', this).click($.proxy(this.click, this)); this._proxy = new WCF.Action.Proxy({ failure: $.proxy(this._failure, this), @@ -641,6 +647,8 @@ WCF.Message.QuickReply = Class.extend({ this._container.toggle(); if (this._container.is(':visible')) { + this._quickReplyButtons.hide(); + // TODO: Scrolling is anything but smooth, better use the init callback this._scroll.scrollTo(this._container, true); @@ -817,6 +825,8 @@ WCF.Message.QuickReply = Class.extend({ // display form submit $messageBody.next().show(); + + this._quickReplyButtons.show(); }, /**