diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/associate.js | 27 | ||||
-rw-r--r-- | install/ui/ipa.js | 26 |
2 files changed, 26 insertions, 27 deletions
diff --git a/install/ui/associate.js b/install/ui/associate.js index db3a9cd55..e8cb4d0b5 100644 --- a/install/ui/associate.js +++ b/install/ui/associate.js @@ -351,24 +351,21 @@ IPA.association_table_widget = function (spec) { that.table_setup(container); - var dialog = $('<div/>', { - html: IPA.messages.dialogs.dirty_message - }).appendTo(container); - - var buttons = {}; + var dialog = IPA.dialog({ + title: IPA.messages.dialogs.dirty_title, + width: '20em' + }); - buttons[IPA.messages.buttons.ok] = function() { - dialog.dialog('close'); + dialog.create = function() { + dialog.container.append(IPA.messages.dialogs.dirty_message); }; - dialog.dialog({ - autoOpen: false, - title: IPA.messages.dialogs.dirty_title, - modal: true, - width: '20em', - buttons: buttons + dialog.add_button(IPA.messages.buttons.ok, function() { + dialog.close(); }); + dialog.init(); + var entity = IPA.get_entity(that.entity_name); var facet_name = IPA.current_facet(entity); var facet = entity.get_facet(facet_name); @@ -383,7 +380,7 @@ IPA.association_table_widget = function (spec) { } if (facet.is_dirty()) { - dialog.dialog('open'); + dialog.open(that.container); } else { that.show_remove_dialog(); } @@ -402,7 +399,7 @@ IPA.association_table_widget = function (spec) { } if (facet.is_dirty()) { - dialog.dialog('open'); + dialog.open(that.container); } else { that.show_add_dialog(); } diff --git a/install/ui/ipa.js b/install/ui/ipa.js index ec15332f4..cbe009b9d 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -135,24 +135,26 @@ var IPA = ( function () { if (IPA.current_entity){ var facet_name = IPA.current_facet(IPA.current_entity); var facet = IPA.current_entity.facets_by_name[facet_name]; + if (facet.is_dirty()){ - var message_box = $("<div/>",{ - html: IPA.messages.dialogs.dirty_message - }). - appendTo($("#navigation")); - var buttons = {}; + var dialog = IPA.dialog({ + title: IPA.messages.dialogs.dirty_title, + width: '20em' + }); - buttons[IPA.messages.buttons.ok] = function() { - $(this).dialog("close"); + dialog.create = function() { + dialog.container.append(IPA.messages.dialogs.dirty_message); }; - message_box.dialog({ - title: IPA.messages.dialogs.dirty_title, - modal:true, - width: '20em', - buttons: buttons + dialog.add_button(IPA.messages.buttons.ok, function() { + dialog.close(); }); + + dialog.init(); + + dialog.open($('#navigation')); + return false; } } |