From 6d14331a0561e98e4ce8a51bb418c1f6d25b5e88 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 19 Jul 2011 13:46:09 -0500 Subject: Added checkbox to remove hosts from DNS. A custom deleter dialog for hosts has been added to provide an option whether to remove the hosts from DNS. Ticket #1470 --- install/ui/search.js | 127 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 53 deletions(-) (limited to 'install/ui/search.js') diff --git a/install/ui/search.js b/install/ui/search.js index 1b07908b..fec394de 100644 --- a/install/ui/search.js +++ b/install/ui/search.js @@ -182,16 +182,13 @@ IPA.search_facet = function(spec) { dialog.open(that.container); }; - that.remove = function() { that.remove_instances(that.managed_entity); }; - that.remove_instances = function(entity) { var values = that.get_values(); - var label = entity.metadata.label; var title; if (!values.length) { @@ -200,60 +197,21 @@ IPA.search_facet = function(spec) { return; } - title = IPA.messages.dialogs.remove_title; - title = title.replace('${entity}', label); - - var dialog = IPA.deleter_dialog({ - 'title': title, - 'parent': that.container, - 'values': values, - entity_name: entity.name - }); - - dialog.execute = function() { + var dialog = that.managed_entity.get_dialog('remove'); - var batch = IPA.batch_command({ - 'on_success': function() { - that.refresh(); - dialog.close(); - }, - 'on_error': function() { - that.refresh(); - dialog.close(); - } - }); - - var pkeys = - entity.get_primary_key_prefix(); + if (!dialog) { + dialog = IPA.search_deleter_dialog(); + } - for (var i=0; i