Skip to content

Commit b6aee87

Browse files
committed
Menubar: Whitespace.
1 parent 6a5b21f commit b6aee87

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

ui/jquery.ui.menubar.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
// there has to be just one item that has tabindex
2020
$.widget( "ui.menubar", {
2121
version: "@VERSION",
22-
options: {
23-
buttons: false,
24-
menuIcon: false
25-
},
22+
options: {
23+
buttons: false,
24+
menuIcon: false
25+
},
2626
_create: function() {
2727
var that = this;
2828
var items = this.items = this.element.children( "li" )
@@ -69,13 +69,13 @@ $.widget( "ui.menubar", {
6969
var input = $(this),
7070
// TODO menu var is only used on two places, doesn't quite justify the .each
7171
menu = input.next( "ul" );
72-
72+
7373
input.bind( "click.menubar focus.menubar mouseenter.menubar", function( event ) {
7474
// ignore triggered focus event
7575
if ( event.type == "focus" && !event.originalEvent ) {
7676
return;
7777
}
78-
event.preventDefault();
78+
event.preventDefault();
7979
// TODO can we simplify or extractthis check? especially the last two expressions
8080
// there's a similar active[0] == menu[0] check in _open
8181
if ( event.type == "click" && menu.is( ":visible" ) && that.active && that.active[0] == menu[0] ) {
@@ -85,7 +85,7 @@ $.widget( "ui.menubar", {
8585
if ( ( that.open && event.type == "mouseenter" ) || event.type == "click" ) {
8686
that._open( event, menu );
8787
}
88-
})
88+
})
8989
.bind( "keydown", function( event ) {
9090
switch ( event.keyCode ) {
9191
case $.ui.keyCode.SPACE:
@@ -114,11 +114,11 @@ $.widget( "ui.menubar", {
114114
input.addClass( "ui-state-default" ).append( "<span class='ui-button-icon-secondary ui-icon ui-icon-triangle-1-s'></span>" );
115115
input.removeClass( "ui-button-text-only" ).addClass( "ui-button-text-icon-secondary" );
116116
}
117-
117+
118118
if ( !that.options.buttons ) {
119119
// TODO ui-menubar-link is added above, not needed here?
120120
input.addClass( "ui-menubar-link" ).removeClass( "ui-state-default" );
121-
};
121+
};
122122

123123
});
124124
that._bind( {
@@ -140,18 +140,18 @@ $.widget( "ui.menubar", {
140140
}
141141
});
142142
},
143-
143+
144144
_destroy : function() {
145145
var items = this.element.children( "li" )
146146
.removeClass( "ui-menubar-item" )
147147
.removeAttr( "role", "presentation" )
148148
.children( "button, a" );
149-
149+
150150
this.element
151151
.removeClass( "ui-menubar ui-widget-header ui-helper-clearfix" )
152152
.removeAttr( "role", "menubar" )
153153
.unbind( ".menubar" );
154-
154+
155155
items
156156
.unbind( ".menubar" )
157157
.removeClass( "ui-button ui-widget ui-button-text-only ui-menubar-link ui-state-default" )
@@ -173,7 +173,7 @@ $.widget( "ui.menubar", {
173173
.removeAttr( "tabindex" )
174174
.unbind( ".menubar" );
175175
},
176-
176+
177177
_close: function() {
178178
if ( !this.active || !this.active.length )
179179
return;
@@ -189,7 +189,7 @@ $.widget( "ui.menubar", {
189189
this.active = null;
190190
this.open = false;
191191
},
192-
192+
193193
_open: function( event, menu ) {
194194
// on a single-button menubar, ignore reopening the same menu
195195
if ( this.active && this.active[0] == menu[0] ) {
@@ -223,7 +223,7 @@ $.widget( "ui.menubar", {
223223
.focusin();
224224
this.open = true;
225225
},
226-
226+
227227
// TODO refactor this and the next three methods
228228
_prev: function( event, button ) {
229229
button.attr( "tabIndex", -1 );
@@ -235,7 +235,7 @@ $.widget( "ui.menubar", {
235235
lastItem.removeAttr( "tabIndex" )[0].focus();
236236
}
237237
},
238-
238+
239239
_next: function( event, button ) {
240240
button.attr( "tabIndex", -1 );
241241
var next = button.parent().nextAll( "li" ).children( ".ui-button" ).eq( 0 );
@@ -257,7 +257,7 @@ $.widget( "ui.menubar", {
257257
this._open( event, lastItem );
258258
}
259259
},
260-
260+
261261
// TODO rename to child (or something like that)
262262
_right: function( event ) {
263263
var next = this.active.parent().nextAll( "li:eq(0)" ).children( ".ui-menu" ).eq( 0 );

0 commit comments

Comments
 (0)