Hide containers on init
authorAlexander Ebert <ebert@woltlab.com>
Thu, 8 Mar 2012 17:21:34 +0000 (18:21 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 8 Mar 2012 17:21:34 +0000 (18:21 +0100)
wcfsetup/install/files/js/WCF.js

index c2d3b85642c5bc3ff5d558ef3a268afbe5ca77f2..ee3a0bb2b96e2e565880d971242c685d7ff152b5 100644 (file)
@@ -2803,6 +2803,19 @@ WCF.Collapsible.SimpleRemote = WCF.Collapsible.Remote.extend({
                });
        },
        
+       /**
+        * @see WCF.Collapsible.Remote._initContainer()
+        */
+       _initContainer: function(containerID) {
+               this._super(containerID);
+               
+               // hide container on init if applicable
+               if (!this._containerData[containerID].isOpen) {
+                       this._containerData[containerID].target.hide();
+                       this._exchangeIcon(this._containerData[containerID].button, WCF.Icon.get('wcf.icon.closed'));
+               }
+       },
+       
        /**
         * Toggles container visibility.
         *