Hide reply button if reply box is open
authorAlexander Ebert <ebert@woltlab.com>
Fri, 23 May 2014 09:05:17 +0000 (11:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 23 May 2014 09:05:17 +0000 (11:05 +0200)
wcfsetup/install/files/js/WCF.Message.js

index 1fec88ef48d0355833b150867c31581691a31de6..2612c5d38026d0125ee93cc70344bb9d3431d3f7 100644 (file)
@@ -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();
        },
        
        /**