mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Button is now a fixed dependency, so remove the check
This commit is contained in:
parent
0ae6fc1e02
commit
972f5c192c
10
ui/jquery.ui.dialog.js
vendored
10
ui/jquery.ui.dialog.js
vendored
@ -369,7 +369,7 @@ $.widget("ui.dialog", {
|
||||
|
||||
if ( !$.isEmptyObject( buttons ) ) {
|
||||
$.each( buttons, function( name, props ) {
|
||||
var button, click;
|
||||
var click;
|
||||
props = $.isFunction( props ) ?
|
||||
{ click: props, text: name } :
|
||||
props;
|
||||
@ -380,12 +380,10 @@ $.widget("ui.dialog", {
|
||||
props.click = function() {
|
||||
click.apply( that.element[0], arguments );
|
||||
};
|
||||
button = $( "<button></button>", props )
|
||||
.appendTo( that.uiButtonSet );
|
||||
if ( $.fn.button ) {
|
||||
$( "<button></button>", props )
|
||||
// TODO allow passing through button options
|
||||
button.button();
|
||||
}
|
||||
.button()
|
||||
.appendTo( that.uiButtonSet );
|
||||
});
|
||||
this.uiDialog.addClass( "ui-dialog-buttons" );
|
||||
this.uiDialogButtonPane.appendTo( this.uiDialog );
|
||||
|
Loading…
Reference in New Issue
Block a user