Skip to content

Commit 641c5ed

Browse files
committed
Checkboxradio: Style updates
1 parent 6169099 commit 641c5ed

File tree

5 files changed

+44
-44
lines changed

5 files changed

+44
-44
lines changed

tests/unit/checkboxradio/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ common.testWidget( "checkboxradio", {
1717
// Callbacks
1818
create: null
1919
}
20-
});
20+
} );
2121

2222
} );

tests/unit/checkboxradio/core.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ define( [
66
module( "Checkboxradio: core" );
77
test( "Checkbox - Initial class structure", function( assert ) {
88
expect( 2 );
9-
var input = $("#check"),
10-
label = $("label[for=check]");
9+
var input = $( "#check" ),
10+
label = $( "label[for=check]" );
1111

1212
input.checkboxradio();
1313
assert.hasClasses( input, "ui-helper-hidden-accessible ui-checkboxradio" );
1414
assert.hasClasses( label, "ui-button ui-widget ui-checkboxradio-label ui-corner-all" );
15-
});
15+
} );
1616

1717
test( "Radios - Initial class structure", function( assert ) {
1818
expect( 6 );
@@ -22,11 +22,11 @@ test( "Radios - Initial class structure", function( assert ) {
2222
inputs.checkboxradio();
2323
inputs.each( function() {
2424
assert.hasClasses( this, "ui-helper-hidden-accessible" );
25-
});
25+
} );
2626
labels.each( function() {
2727
assert.hasClasses( this, "ui-button" );
28-
});
29-
});
28+
} );
29+
} );
3030

3131
asyncTest( "Ensure checked after single click on checkbox label button", function( assert ) {
3232
expect( 2 );
@@ -36,17 +36,17 @@ asyncTest( "Ensure checked after single click on checkbox label button", functio
3636
ok( this.checked, "checked ok" );
3737

3838
assert.hasClasses( label, "ui-state-active" );
39-
});
39+
} );
4040

4141
// Support: Opera
4242
// Opera doesn't trigger a change event when this is done synchronously.
4343
// This seems to be a side effect of another test, but until that can be
4444
// tracked down, this delay will have to do.
45-
setTimeout(function() {
45+
setTimeout( function() {
4646
$( "#check2" ).checkboxradio( "widget" ).simulate( "click" );
4747
start();
48-
});
49-
});
48+
} );
49+
} );
5050

5151
test( "Checkbox creation requires a label, and finds it in all cases", function( assert ) {
5252
expect( 7 );
@@ -66,7 +66,7 @@ test( "Checkbox creation requires a label, and finds it in all cases", function(
6666
group.find( "input[type=checkbox]" ).checkboxradio();
6767
assert.hasClasses( group.find( "label" ), "ui-button" );
6868
} );
69-
});
69+
} );
7070

7171
test( "Calling checkboxradio on an unsupported element throws an error", function( assert ) {
7272
expect( 2 );
@@ -86,7 +86,7 @@ test( "Calling checkboxradio on an unsupported element throws an error", functio
8686
error,
8787
"Proper error thrown"
8888
);
89-
});
89+
} );
9090
test( "Calling checkboxradio on an input with no label throws an error", function( assert ) {
9191
expect( 1 );
9292
var error = new Error( "No label found for checkboxradio widget" );
@@ -97,6 +97,6 @@ test( "Calling checkboxradio on an input with no label throws an error", functio
9797
error,
9898
"Proper error thrown"
9999
);
100-
});
100+
} );
101101

102102
} );

tests/unit/checkboxradio/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ asyncTest(
2020

2121
form.get( 0 ).reset();
2222

23-
setTimeout(function() {
23+
setTimeout( function() {
2424
assert.hasClasses( widget, "ui-state-active" );
2525
start();
2626
}, 1 );
@@ -33,7 +33,7 @@ asyncTest( "Checkbox shows focus when using keyboard navigation", function( asse
3333
label = $( "label[for='check']" );
3434
assert.lacksClasses( label, "ui-state-focus" );
3535
check.focus();
36-
setTimeout(function() {
36+
setTimeout( function() {
3737
assert.hasClasses( label, "ui-state-focus" );
3838
start();
3939
} );

tests/unit/checkboxradio/methods.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
4646
assert.lacksClasses( icon, "ui-icon-check" );
4747
}
4848
assert.lacksClasses( widget, "ui-checkboxradio-checked" );
49-
});
49+
} );
5050

51-
test( value + ": destroy", function( assert ){
51+
test( value + ": destroy", function( assert ) {
5252
expect( 1 );
5353
assert.domEqual( "#" + value + "-method-destroy", function() {
5454
$( "#" + value + "-method-destroy" ).checkboxradio().checkboxradio( "destroy" );
55-
});
56-
});
55+
} );
56+
} );
5757

5858
test( value + ": disable / enable", function( assert ) {
5959
expect( 4 );
@@ -69,9 +69,9 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
6969
assert.lacksClasses( widget, "ui-state-disabled" );
7070
strictEqual( input.is( ":disabled" ), false,
7171
value + " has disabled prop removed when enable is called" );
72-
});
72+
} );
7373

74-
test( value + ": widget returns the label", function(){
74+
test( value + ": widget returns the label", function() {
7575
var input = $( "#" + value + "-method-refresh" ),
7676
label = $( "#" + value + "-method-refresh-label" );
7777

@@ -80,7 +80,7 @@ $.each( [ "checkbox", "radio" ], function( index, value ) {
8080
input.checkboxradio();
8181
strictEqual( input.checkboxradio( "widget" )[ 0 ], label[ 0 ],
8282
"widget method returns label" );
83-
});
83+
} );
8484

8585
} );
8686

@@ -92,6 +92,6 @@ test( "Input wrapped in a label preserved on refresh", function() {
9292

9393
input.checkboxradio( "refresh" );
9494
strictEqual( input.parent()[ 0 ], element[ 0 ], "Input preserved" );
95-
});
95+
} );
9696

9797
} );

tests/unit/checkboxradio/options.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function assertEnabled( checkbox, assert ) {
2222
test( "disabled", function( assert ) {
2323
var checkbox = $( "#checkbox-option-disabled" );
2424
expect( 6 );
25-
checkbox.checkboxradio({
25+
checkbox.checkboxradio( {
2626
disabled: true
27-
});
27+
} );
2828

2929
assertDisabled( checkbox, assert );
3030

@@ -33,7 +33,7 @@ test( "disabled", function( assert ) {
3333

3434
checkbox.checkboxradio( "option", "disabled", true );
3535
assertDisabled( checkbox, assert );
36-
});
36+
} );
3737
test( "disabled - prop true on init", function( assert ) {
3838
expect( 2 );
3939
var checkbox = $( "#checkbox-option-disabled" );
@@ -42,17 +42,17 @@ test( "disabled - prop true on init", function( assert ) {
4242
checkbox.checkboxradio();
4343

4444
assertDisabled( checkbox, assert );
45-
});
45+
} );
4646
test( "disabled - explicit null value, checks the DOM", function( assert ) {
4747
expect( 2 );
4848
var checkbox = $( "#checkbox-option-disabled" );
4949

5050
checkbox.prop( "disabled", true );
51-
checkbox.checkboxradio({
51+
checkbox.checkboxradio( {
5252
disabled: null
53-
});
53+
} );
5454
assertDisabled( checkbox, assert );
55-
});
55+
} );
5656

5757
function assertNoIcon( checkbox ) {
5858
strictEqual( checkbox.checkboxradio( "widget" ).find( "span.ui-icon" ).length, 0,
@@ -73,9 +73,9 @@ test( "icon - false on init", function() {
7373

7474
expect( 1 );
7575

76-
checkbox.checkboxradio({ icon: false });
76+
checkbox.checkboxradio( { icon: false } );
7777
assertNoIcon( checkbox );
78-
});
78+
} );
7979

8080
test( "icon - default unchecked", function( assert ) {
8181
var checkbox = $( "#checkbox-option-icon" );
@@ -84,8 +84,8 @@ test( "icon - default unchecked", function( assert ) {
8484

8585
checkbox.checkboxradio();
8686
assertIcon( checkbox, false, assert );
87-
});
88-
test( "icon", function( assert ){
87+
} );
88+
test( "icon", function( assert ) {
8989
var checkbox = $( "#checkbox-option-icon" );
9090

9191
expect( 8 );
@@ -108,7 +108,7 @@ test( "icon", function( assert ){
108108
checkbox.checkboxradio( "option", "icon", true );
109109
assertIcon( checkbox, false, assert );
110110

111-
});
111+
} );
112112

113113
test( "label - default", function() {
114114
var checkbox = $( "#checkbox-option-label" ),
@@ -122,12 +122,12 @@ test( "label - default", function() {
122122
"checkbox label", "When no value passed on create text from dom is used for option" );
123123
strictEqual( widget.text(),
124124
" checkbox label", "When no value passed on create text from dom is used in dom" );
125-
});
125+
} );
126126
test( "label - explicit value", function() {
127127
expect( 5 );
128-
var checkbox = $( "#checkbox-option-label" ).checkboxradio({
128+
var checkbox = $( "#checkbox-option-label" ).checkboxradio( {
129129
label: "foo"
130-
}),
130+
} ),
131131
widget = checkbox.checkboxradio( "widget" ),
132132
icon = widget.find( ".ui-icon" ),
133133
iconSpace = widget.find( ".ui-checkboxradio-icon-space" );
@@ -142,7 +142,7 @@ test( "label - explicit value", function() {
142142
"Icon space is preserved when label is set on init when wrapped in label" );
143143
strictEqual( $( "#checkbox-option-label" ).length, 1,
144144
"Element is preserved when label is set on init when wrapped in label" );
145-
});
145+
} );
146146

147147
test( "label - explicit null value", function() {
148148
var checkbox = $( "#checkbox-option-label" ),
@@ -153,16 +153,16 @@ test( "label - explicit null value", function() {
153153
// We are testing the default here because the default null is a special value which means to check
154154
// the DOM, so we need to make sure this happens correctly checking the options should never return
155155
// null. It should always be true or false
156-
checkbox.checkboxradio({
156+
checkbox.checkboxradio( {
157157
label: null
158-
});
158+
} );
159159
widget = checkbox.checkboxradio( "widget" );
160160
strictEqual( checkbox.checkboxradio( "option", "label" ),
161161
"checkbox label", "When null is passed on create text from dom is used for option" );
162162
strictEqual( widget.text(),
163163
" checkbox label", "When null is passed on create text from dom is used in dom" );
164164

165-
});
165+
} );
166166

167167
test( "label", function() {
168168
var checkbox = $( "#checkbox-option-label" ),
@@ -184,6 +184,6 @@ test( "label", function() {
184184
strictEqual( widget.text(),
185185
" bar", "When null is passed text from dom is used in dom" );
186186

187-
});
187+
} );
188188

189189
} );

0 commit comments

Comments
 (0)