From: Matthias Schmidt Date: Sat, 12 Jan 2013 12:16:40 +0000 (+0100) Subject: Adds CSS class which indicates if container is collased X-Git-Tag: 2.0.0_Beta_1~572 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2851eadd9f860c278a2b5df122074b7c4b9ed297;p=GitHub%2FWoltLab%2FWCF.git Adds CSS class which indicates if container is collased --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index a8cf99063a..b80df169b3 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3489,6 +3489,11 @@ WCF.Collapsible.Remote = Class.extend({ isOpen: this._containers[containerID].data('isOpen'), target: $target }; + + // add 'jsCollapsed' CSS class + if (!this._containers[containerID].data('isOpen')) { + $('#' + containerID).addClass('jsCollapsed'); + } }, /** @@ -3554,6 +3559,9 @@ WCF.Collapsible.Remote = Class.extend({ }); this._proxy.sendRequest(); + // toogle 'jsCollapsed' CSS class + $('#' + $containerID).toggleClass('jsCollapsed'); + // set spinner for current button this._exchangeIcon($button); }, @@ -3696,6 +3704,9 @@ WCF.Collapsible.SimpleRemote = WCF.Collapsible.Remote.extend({ this._containerData[$containerID].target.hide(); } + // toogle 'jsCollapsed' CSS class + $('#' + $containerID).toggleClass('jsCollapsed'); + // update container data this._containerData[$containerID].isOpen = ($newState === 'open' ? true : false); }