]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Button is now a fixed dependency, so remove the check
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Thu, 15 Nov 2012 22:56:54 +0000 (23:56 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 26 Nov 2012 09:28:23 +0000 (10:28 +0100)
ui/jquery.ui.dialog.js

index 4a4c796306a16b2df64a43145e27e69f58faef6a..314db95ffb090d61a0f6d255a9b667c1a0f79109 100644 (file)
@@ -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 );