Browse files

BUG Enforce startClosed prop on ToggleCompositeField

  • Loading branch information...
1 parent aa76aca commit b4ecc308a12bd3cc095bcce39b8a234e87322ff2 @chillu chillu committed Jul 15, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 javascript/ToggleCompositeField.js
View
8 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();
},

0 comments on commit b4ecc30

Please sign in to comment.