Skip to content

Commit 552f799

Browse files
committed
Dialog: Button is now a fixed dependency, so remove the check
1 parent c7ded8c commit 552f799

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ui/jquery.ui.dialog.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ $.widget("ui.dialog", {
369369

370370
if ( !$.isEmptyObject( buttons ) ) {
371371
$.each( buttons, function( name, props ) {
372-
var button, click;
372+
var click;
373373
props = $.isFunction( props ) ?
374374
{ click: props, text: name } :
375375
props;
@@ -380,12 +380,10 @@ $.widget("ui.dialog", {
380380
props.click = function() {
381381
click.apply( that.element[0], arguments );
382382
};
383-
button = $( "<button></button>", props )
384-
.appendTo( that.uiButtonSet );
385-
if ( $.fn.button ) {
383+
$( "<button></button>", props )
386384
// TODO allow passing through button options
387-
button.button();
388-
}
385+
.button()
386+
.appendTo( that.uiButtonSet );
389387
});
390388
this.uiDialog.addClass( "ui-dialog-buttons" );
391389
this.uiDialogButtonPane.appendTo( this.uiDialog );

0 commit comments

Comments
 (0)