diff options
author | Felix Nagel <info@felixnagel.com> | 2013-10-24 00:11:10 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-10-24 00:11:10 +0200 |
commit | 2c7e3389bcc56812dbda36c74be7f42d817826a4 (patch) | |
tree | 0373ad13ef28e4642fc767948c5048cd43b56c65 /ui | |
parent | 80d2c1180a7993b50102f5cd42e4728d5e95c2a0 (diff) | |
download | jquery-ui-2c7e3389bcc56812dbda36c74be7f42d817826a4.tar.gz jquery-ui-2c7e3389bcc56812dbda36c74be7f42d817826a4.zip |
Selectmenu: remove widthMenu option and rename widthButton option to width
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.selectmenu.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 342baf8dc..800503c08 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/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() ) ); |