From b4ecc308a12bd3cc095bcce39b8a234e87322ff2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 15 Jul 2012 20:53:33 +0200 Subject: [PATCH] BUG Enforce startClosed prop on ToggleCompositeField --- javascript/ToggleCompositeField.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/ToggleCompositeField.js b/javascript/ToggleCompositeField.js index a7ddbbaa1..d853bfbee 100644 --- a/javascript/ToggleCompositeField.js +++ b/javascript/ToggleCompositeField.js @@ -2,10 +2,10 @@ $.entwine('ss', function($){ $('.ss-toggle').entwine({ onadd: function() { - opts = {collapsible: true}; - if (this.hasClass("ss-toggle-start-closed")) opts.active = false; - - this.accordion({ collapsible: true }); + this.accordion({ + collapsible: true, + active: !this.hasClass("ss-toggle-start-closed") + }); this._super(); },