diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index d6a7fb220..120a855e3 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -77,7 +77,11 @@ $.widget("ui.dialog", { }) .mousedown(function() { self.moveToTop(); - }); + }), + + uiDialogButtonPane = (this.uiDialogButtonPane = $('
')) + .addClass('ui-dialog-buttonpane') + .appendTo(uiDialog); this.uiDialogTitlebarClose = $('.ui-dialog-titlebar-close', uiDialogTitlebar) .hover( @@ -96,19 +100,6 @@ $.widget("ui.dialog", { return false; }); - var hasButtons = false; - $.each(options.buttons, function() { return !(hasButtons = true); }); - if (hasButtons) { - var uiDialogButtonPane = $('
') - .appendTo(uiDialog); - $.each(options.buttons, function(name, fn) { - $('