From 62373e04dc9bf224a3bdb48feb4cca86802f8605 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 23 May 2014 11:05:17 +0200 Subject: [PATCH] Hide reply button if reply box is open --- wcfsetup/install/files/js/WCF.Message.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(); }, /** -- 2.20.1