From 972f5c192c7c516659497c95452b159aae5f52df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 15 Nov 2012 23:56:54 +0100 Subject: [PATCH] Dialog: Button is now a fixed dependency, so remove the check --- ui/jquery.ui.dialog.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 4a4c79630..314db95ff 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -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 = $( "", props ) - .appendTo( that.uiButtonSet ); - if ( $.fn.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 );