Permalink
Browse files

[controlgroup] Need to ignore value of excludeInvisible during _creat…

…e(), because all children will be invisible, since the page itself is invisible during enhance
  • Loading branch information...
1 parent bb945fc commit 37eb9884bd4d5d928b469f987a84ff394595662c @gabrielschulhof gabrielschulhof committed Nov 2, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 js/widgets/controlgroup.js
@@ -45,7 +45,7 @@ define( [ "jquery",
self._setOption( key, value, true );
});
- this.refresh();
+ this._refresh( true );
},
_flipClasses: function( els, flCorners ) {
@@ -83,9 +83,9 @@ define( [ "jquery",
this.element.toggleClass( "ui-mini", value );
},
- refresh: function() {
+ _refresh: function( create ) {
var els = this.element
- .find( ".ui-btn" + ( this.options.excludeInvisible ? ":visible" : "" ) )
+ .find( ".ui-btn" + ( ( !create && this.options.excludeInvisible ) ? ":visible" : "" ) )
.not( '.ui-slider-handle' ),
corners = [ true, true ];
@@ -94,6 +94,10 @@ define( [ "jquery",
}
this._flipClasses( els, corners );
+ },
+
+ refresh: function() {
+ this._refresh( false );
}
});

0 comments on commit 37eb988

Please sign in to comment.