File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 56
56
< option > Slow</ option >
57
57
</ select >
58
58
</ div >
59
+ < div class ="controlgroup-custom-selector ">
60
+ < button style ="display:none "> Button with icon only</ button >
61
+ < select >
62
+ < option > Fast</ option >
63
+ < option > Medium</ option >
64
+ < option > Slow</ option >
65
+ </ select >
66
+ < label for ="checkbox "> Checkbox</ label >
67
+ < input type ="checkbox " value ="checkbox " id ="checkbox " />
68
+ < select >
69
+ < option > Fast</ option >
70
+ < option > Medium</ option >
71
+ < option > Slow</ option >
72
+ </ select >
73
+ < a href ="# " class ="button "> Button with icon on the bottom</ a >
74
+ < select >
75
+ < option > Fast</ option >
76
+ < option > Medium</ option >
77
+ < option > Slow</ option >
78
+ </ select >
79
+ </ div >
59
80
</ div >
60
81
</ body >
61
82
</ html >
Original file line number Diff line number Diff line change @@ -52,6 +52,35 @@ test( "items", function() {
52
52
expect ( 2 ) ;
53
53
} ) ;
54
54
55
+ test ( "items: custom selector" , function ( ) {
56
+ var element = $ ( ".controlgroup-custom-selector" ) . controlgroup ( {
57
+ items : {
58
+ "button" : ".button"
59
+ }
60
+ } ) ;
61
+
62
+ strictEqual ( element . children ( ".ui-button" ) . length , 5 ,
63
+ "Correct child widgets are called when custom selector used" ) ;
64
+ expect ( 2 ) ;
65
+ } ) ;
66
+
67
+ $ . widget ( "ui.test" , {
68
+ _create : function ( ) {
69
+ this . element . addClass ( "ui-test" ) ;
70
+ }
71
+ } ) ;
72
+ test ( "items: custom widget" , function ( ) {
73
+ var element = $ ( ".controlgroup-custom-widget" ) . controlgroup ( {
74
+ items : {
75
+ "test" : ".test"
76
+ }
77
+ } ) ;
78
+
79
+ strictEqual ( element . children ( ".ui-button" ) . length , 5 ,
80
+ "Correct child widgets are called when custom selector used" ) ;
81
+ expect ( 2 ) ;
82
+ } ) ;
83
+
55
84
test ( "excludeInvisible" , function ( ) {
56
85
var element = $ ( ".controlgroup" ) . controlgroup ( ) ,
57
86
buttons = element . children ( ".ui-button" ) ;
You can’t perform that action at this time.
0 commit comments