Skip to content

Commit 6f97faf

Browse files
committed
removed: this.namespace
1 parent fc576ea commit 6f97faf

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ui/jquery.ui.selectmenu.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ $.widget("ui.selectmenu", {
297297
for ( var i = 0; i < selectOptionData.length; i++ ) {
298298
var thisLiAttr = { role : 'presentation' };
299299
if ( selectOptionData[ i ].disabled ) {
300-
thisLiAttr[ 'class' ] = this.namespace + '-state-disabled';
300+
thisLiAttr[ 'class' ] = 'ui-state-disabled';
301301
}
302302
var thisAAttr = {
303303
html: selectOptionData[i].text || '&nbsp;',
@@ -360,7 +360,7 @@ $.widget("ui.selectmenu", {
360360
if ( this.list.find( 'li.' + optGroupName ).length ) {
361361
this.list.find( 'li.' + optGroupName + ':last ul' ).append( thisLi );
362362
} else {
363-
$( '<li role="presentation" class="ui-selectmenu-group ' + optGroupName + (selectOptionData[ i ].parentOptGroup.attr( "disabled" ) ? ' ' + this.namespace + '-state-disabled" aria-disabled="true"' : '"' ) + '><span class="ui-selectmenu-group-label">' + selectOptionData[ i ].parentOptGroup.attr( 'label' ) + '</span><ul></ul></li> ')
363+
$( '<li role="presentation" class="ui-selectmenu-group ' + optGroupName + (selectOptionData[ i ].parentOptGroup.attr( "disabled" ) ? ' ' + 'ui-state-disabled" aria-disabled="true"' : '"' ) + '><span class="ui-selectmenu-group-label">' + selectOptionData[ i ].parentOptGroup.attr( 'label' ) + '</span><ul></ul></li> ')
364364
.appendTo( this.list )
365365
.find( 'ul' )
366366
.append( thisLi );
@@ -447,7 +447,7 @@ $.widget("ui.selectmenu", {
447447

448448
destroy: function() {
449449
this.element.removeData( this.widgetName )
450-
.removeClass( 'ui-selectmenu-disabled' + ' ' + this.namespace + '-state-disabled' )
450+
.removeClass( 'ui-selectmenu-disabled' + ' ' + 'ui-state-disabled' )
451451
.removeAttr( 'aria-disabled' )
452452
.unbind( ".selectmenu" );
453453

@@ -652,7 +652,7 @@ $.widget("ui.selectmenu", {
652652
return false;
653653
}
654654

655-
if ( this._optionLis.eq( newIndex ).hasClass( this.namespace + '-state-disabled' ) ) {
655+
if ( this._optionLis.eq( newIndex ).hasClass( 'ui-state-disabled' ) ) {
656656
// if option at newIndex is disabled, call _moveFocus, incrementing amt by one
657657
( amt > 0 ) ? ++amt : --amt;
658658
this._moveSelection( amt, newIndex );
@@ -686,7 +686,7 @@ $.widget("ui.selectmenu", {
686686

687687
this._focusedOptionLi().find( 'a:eq(0)' ).attr( 'id', '' );
688688

689-
if ( this._optionLis.eq( newIndex ).hasClass( this.namespace + '-state-disabled' ) ) {
689+
if ( this._optionLis.eq( newIndex ).hasClass( 'ui-state-disabled' ) ) {
690690
// if option at newIndex is disabled, call _moveFocus, incrementing amt by one
691691
( amt > 0 ) ? ++amt : --amt;
692692
this._moveFocus( amt, newIndex );
@@ -710,7 +710,7 @@ $.widget("ui.selectmenu", {
710710
if ( value ) this.close();
711711
this.element
712712
.add( this.newelement )
713-
.add( this.list )[ value ? 'addClass' : 'removeClass' ]( 'ui-selectmenu-disabled ' + this.namespace + '-state-disabled' )
713+
.add( this.list )[ value ? 'addClass' : 'removeClass' ]( 'ui-selectmenu-disabled ' + 'ui-state-disabled' )
714714
.attr( "aria-disabled" , value );
715715
}
716716
},
@@ -742,14 +742,14 @@ $.widget("ui.selectmenu", {
742742
},
743743

744744
_disabled: function( elem ) {
745-
return $( elem ).hasClass( this.namespace + '-state-disabled' );
745+
return $( elem ).hasClass( 'ui-state-disabled' );
746746
},
747747

748748
_toggleOption: function( index, flag ) {
749749
var optionElem = this._optionLis.eq( index );
750750
if ( optionElem ) {
751751
optionElem
752-
.toggleClass( this.namespace + '-state-disabled', flag )
752+
.toggleClass( 'ui-state-disabled', flag )
753753
.find( "a" ).attr( "aria-disabled", !flag );
754754
if ( flag ) {
755755
this.element.find( "option" ).eq( index ).attr( "disabled", "disabled" );
@@ -764,7 +764,7 @@ $.widget("ui.selectmenu", {
764764
var optGroupElem = this.list.find( 'li.ui-selectmenu-group-' + index );
765765
if ( optGroupElem ) {
766766
optGroupElem
767-
.toggleClass( this.namespace + '-state-disabled', flag )
767+
.toggleClass( 'ui-state-disabled', flag )
768768
.attr( "aria-disabled", !flag );
769769
if ( flag ) {
770770
this.element.find( "optgroup" ).eq( index ).attr( "disabled", "disabled" );

0 commit comments

Comments
 (0)