mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: remove widthMenu option and rename widthButton option to width
This commit is contained in:
parent
80d2c1180a
commit
2c7e3389bc
9
ui/jquery.ui.selectmenu.js
vendored
9
ui/jquery.ui.selectmenu.js
vendored
@ -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()
|
||||
) );
|
||||
|
Loading…
Reference in New Issue
Block a user