mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: small fixes for lint tests
This commit is contained in:
parent
c3f6bd912e
commit
ec6d88fae4
9
ui/jquery.ui.selectmenu.js
vendored
9
ui/jquery.ui.selectmenu.js
vendored
@ -166,7 +166,8 @@ $.widget( "ui.selectmenu", {
|
||||
refresh: function() {
|
||||
this.menu.empty();
|
||||
|
||||
var options = this.element.find( 'option' );
|
||||
var item,
|
||||
options = this.element.find( 'option' );
|
||||
if ( options.length ) {
|
||||
this._readOptions( options );
|
||||
this._renderMenu( this.menu, this.items );
|
||||
@ -178,7 +179,7 @@ $.widget( "ui.selectmenu", {
|
||||
this.menuItems.find( 'a' ).attr( 'role', 'option' );
|
||||
|
||||
// select current item
|
||||
var item = this._getSelectedItem();
|
||||
item = this._getSelectedItem();
|
||||
this.menu.menu( "focus", null, item );
|
||||
this._setSelected( item.data( "item.selectmenu" ) );
|
||||
|
||||
@ -244,7 +245,7 @@ $.widget( "ui.selectmenu", {
|
||||
currentOptgroup = "";
|
||||
|
||||
$.each( items, function( index, item ) {
|
||||
if ( item.optgroup != currentOptgroup ) {
|
||||
if ( item.optgroup !== currentOptgroup ) {
|
||||
$( '<li />', {
|
||||
'class': 'ui-selectmenu-optgroup' + ( item.element.parent( "optgroup" ).attr( "disabled" ) ? ' ui-state-disabled' : '' ),
|
||||
html: item.optgroup
|
||||
@ -416,7 +417,7 @@ $.widget( "ui.selectmenu", {
|
||||
index: index,
|
||||
value: option.attr( 'value' ),
|
||||
label: option.text() || ' ',
|
||||
optgroup: optgroup.attr( "label" ) || false,
|
||||
optgroup: optgroup.attr( "label" ) || "",
|
||||
disabled: optgroup.attr( "disabled" ) || option.attr( "disabled" )
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user