Skip to content
Permalink
Browse files

Selectmenu: remove widthMenu option and rename widthButton option to …

…width
  • Loading branch information
fnagel committed Oct 23, 2013
1 parent 80d2c11 commit 2c7e3389bcc56812dbda36c74be7f42d817826a4
Showing with 4 additions and 5 deletions.
  1. +4 −5 ui/jquery.ui.selectmenu.js
@@ -29,8 +29,7 @@ $.widget( "ui.selectmenu", {
at: "left bottom",
collision: "none"
},
widthButton: null,
widthMenu: null,
width: null,

// callbacks
change: null,
@@ -94,7 +93,7 @@ $.widget( "ui.selectmenu", {
.appendTo( this.button );

this._setText( this.buttonText, this.element.find( "option:selected" ).text() );
this._setOption( "widthButton", this.options.widthButton );
this._setOption( "width", this.options.width );

this._on( this.button, this._buttonEvents );
this._hoverable( this.button );
@@ -442,7 +441,7 @@ $.widget( "ui.selectmenu", {
this.button.attr( "tabindex", 0 );
}
}
if ( key === "widthButton" ) {
if ( key === "width" ) {
if ( !value ) {
value = this.element.outerWidth();
}
@@ -480,7 +479,7 @@ $.widget( "ui.selectmenu", {
},

_resizeMenu: function() {
this.menu.outerWidth( this.options.widthMenu || Math.max(
this.menu.outerWidth( Math.max(
this.button.outerWidth(),
this.menu.width( "" ).outerWidth()
) );

2 comments on commit 2c7e338

@jzaefferer

This comment has been minimized.

Copy link
Member

@jzaefferer jzaefferer replied Oct 30, 2013

Can you get this new option into the spec on the wiki?

@fnagel

This comment has been minimized.

Copy link
Member Author

@fnagel fnagel replied Oct 30, 2013

Done.

Please sign in to comment.
You can’t perform that action at this time.