Added missing icons and fixed WCF.Collapsible.SimpleRemote
authorAlexander Ebert <ebert@woltlab.com>
Thu, 8 Mar 2012 16:17:32 +0000 (17:17 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 8 Mar 2012 16:17:32 +0000 (17:17 +0100)
wcfsetup/install/files/acp/templates/header.tpl
wcfsetup/install/files/js/WCF.js

index de9895a3c7bf6f8f1d76cd82655b8af57fc25bfd..5b8ce534c1dcb88cf992a38ad438815e923f2538 100644 (file)
@@ -79,7 +79,9 @@
                                'wcf.global.form.edit.success': '{lang}wcf.global.form.edit.success{/lang}'
                        });
                        WCF.Icon.addObject({
-                               'wcf.icon.loading': '{@$__wcf->getPath()}icon/spinner1.svg'
+                               'wcf.icon.closed': '{@$__wcf->getPath()}icon/closed.svg',
+                               'wcf.icon.loading': '{@$__wcf->getPath()}icon/spinner1.svg',
+                               'wcf.icon.opened': '{@$__wcf->getPath()}icon/opened.svg'
                        });
                        new WCF.Date.Time();
                        new WCF.Effect.SmoothScroll();
index 7e56b288d148777b8dd6b7aa797efbcc470e2b73..c2d3b85642c5bc3ff5d558ef3a268afbe5ca77f2 100644 (file)
@@ -2829,6 +2829,17 @@ WCF.Collapsible.SimpleRemote = WCF.Collapsible.Remote.extend({
                
                // exchange icon
                this._exchangeIcon(this._containerData[$containerID].button, WCF.Icon.get('wcf.icon.' + ($newState === 'open' ? 'opened' : 'closed')));
+               
+               // toggle container
+               if ($newState === 'open') {
+                       this._containerData[$containerID].target.show();
+               }
+               else {
+                       this._containerData[$containerID].target.hide();
+               }
+               
+               // update container data
+               this._containerData[$containerID].isOpen = ($newState === 'open' ? true : false);
        }
 });