Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Buttonset: Added items option and removed visible filter for adding r…
…ounded corners. Fixes #6262 - buttonset not applying ui-corner to invisible elements.
- Loading branch information
1 parent
fce1f97
commit 5dad57e
Showing
2 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
/* | ||
* button_tickets.js | ||
*/ | ||
(function($) { | ||
(function( $ ) { | ||
|
||
module("button: tickets"); | ||
module( "button: tickets" ); | ||
|
||
test("#5946 - buttonset should ignore buttons that are not :visible", function() { | ||
$( "#radio01" ).next().wrap( "<div></div>" ).parent().hide(); | ||
var set = $( "#radio0" ).buttonset(); | ||
ok( set.find( "label:eq(0)" ).is( ".ui-button:not(.ui-corner-left)" ) ); | ||
test( "#5946 - buttonset should ignore buttons that are not :visible", function() { | ||
$( "#radio01" ).next().andSelf().hide(); | ||
var set = $( "#radio0" ).buttonset({ items: ":radio:visible" }); | ||
ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) ); | ||
ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) ); | ||
}); | ||
|
||
})(jQuery); | ||
test( "#6262 - buttonset not applying ui-corner to invisible elements", function() { | ||
$( "#radio0" ).hide(); | ||
var set = $( "#radio0" ).buttonset(); | ||
ok( set.find( "label:eq(0)" ).is( ".ui-button.ui-corner-left" ) ); | ||
ok( set.find( "label:eq(1)" ).is( ".ui-button" ) ); | ||
ok( set.find( "label:eq(2)" ).is( ".ui-button.ui-corner-right" ) ); | ||
}); | ||
|
||
})( jQuery ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters