Gets rid of the double negative.
"controlgroupLabel": ".ui-controlgroup-label"
},
direction: "horizontal",
- excludeInvisible: true,
+ onlyVisible: true,
classes: {},
// Callbacks
}
// Hide each element and check the corner classes
- function iterateHidden( excludeInvisible ) {
+ function iterateHidden( onlyVisible ) {
for ( i = 0; i < 4; i++ ) {
$( controls ).each( showElements );
controls[ i ][ widget ]( "widget" ).hide();
currentClasses = classes.slice( 0 );
- if ( excludeInvisible ) {
+ if ( onlyVisible ) {
if ( i === 0 ) {
currentClasses[ i + 1 ] = classes[ i ];
currentClasses[ i ] = false;
iterateHidden( true );
// Set the exclude option to false so we no longer care about hidden
- element.controlgroup( "option", "excludeInvisible", false );
+ element.controlgroup( "option", "onlyVisible", false );
// Iterate hiding the elements again and check their corner classes
iterateHidden();
"Custom widget called" );
} );
-test( "excludeInvisible", function( assert ) {
+test( "onlyVisible", function( assert ) {
expect( 4 );
var element = $( ".controlgroup" ).controlgroup( {
- excludeInvisible: false
+ onlyVisible: false
} ),
buttons = element.children( ".ui-button" );
assert.lacksClassStart( buttons.eq( 1 ), "ui-corner" );
assert.hasClasses( buttons.eq( 0 ), "ui-corner-left",
- "ExcludeInvisible: false: First button hidden second button doesn't get a corner class" );
+ "onlyVisible: false: First button hidden second button doesn't get a corner class" );
- element.controlgroup( "option", "excludeInvisible", true );
+ element.controlgroup( "option", "onlyVisible", true );
assert.lacksClassStart( buttons.eq( 0 ), "ui-corner" );
assert.hasClasses( buttons.eq( 1 ), "ui-corner-left",
- "ExcludeInvisible: true: First button is hidden second button get corner class" );
+ "onlyVisible: true: First button is hidden second button get corner class" );
} );
test( "direction", function( assert ) {
options: {
direction: "horizontal",
disabled: null,
- excludeInvisible: true,
+ onlyVisible: true,
items: {
"button": "input[type=button], input[type=submit], input[type=reset], button, a",
"controlgroupLabel": ".ui-controlgroup-label",
children = this.childWidgets;
// We filter here because we need to track all childWidgets not just the visible ones
- if ( this.options.excludeInvisible ) {
+ if ( this.options.onlyVisible ) {
children = children.filter( ":visible" );
}