Виджет диалога не обеспечивает такое поведение из коробки. Вы можете взломать поведение самостоятельно, но оно может сломаться при обновлении до новых выпусков jquery-ui. Вот как бы я это сделал:
$('#my-dialog').dialog({
buttons: {
'hello world': function() { alert('hello world'); },
'good bye': function() { alert('goodbye'); }
},
open: function(event, ui) {
// for whatever reason, the dialog isn't passed into us as a paramter, discover it.
var dialog = $(this).closest('.ui-dialog');
// create a copy of all the buttons and mark it as a clone (for later)
var originalButtons = $('.ui-dialog-buttonpane', dialog)
var clonedButtons = originalButtons.clone().addClass('clone');
$('.ui-dialog-titlebar', dialog).after(clonedButtons);
// cloning doesn't copy over event handlers, so we need to wire up
// the click events manually.
$('button', clonedButtons).click(function() {
var button = $(this);
var buttonIndex = $('button', clonedButtons).index(button);
$('button:eq(' + buttonIndex + ')', originalButtons).click();
});
}
});