diff options
Diffstat (limited to 'install/ui/dialog.js')
-rw-r--r-- | install/ui/dialog.js | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js index e3d3395f..172c4478 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -569,13 +569,17 @@ IPA.adder_dialog = function(spec) { IPA.deleter_dialog = function (spec) { spec = spec || {}; - spec.name = spec.name || 'deleter_dialog'; - - var that = IPA.dialog(spec); - that.title = spec.title || IPA.messages.buttons.remove; + spec.title = spec.title || IPA.messages.buttons.remove; + spec.name = spec.name || 'deleter_dialog'; + spec.message = spec.message || IPA.messages.search.delete_confirm; + spec.ok_label = spec.ok_label || IPA.messages.buttons.remove; + var that = IPA.confirm_dialog(spec); that.values = spec.values || []; + that.on_ok = spec.on_ok || function() { + that.execute(); + }; that.add_value = function(value) { that.values.push(value); @@ -588,7 +592,7 @@ IPA.deleter_dialog = function (spec) { that.create = function() { $('<p/>', { - 'text': IPA.messages.search.delete_confirm + 'text': that.message }).appendTo(that.container); var div = $('<div/>', { @@ -621,30 +625,6 @@ IPA.deleter_dialog = function (spec) { } }; - that.open = function(container) { - - that.create_button({ - name: 'remove', - label: IPA.messages.buttons.remove, - click: function() { - that.execute(); - } - }); - - that.create_button({ - name: 'cancel', - label: IPA.messages.buttons.cancel, - click: function() { - that.close(); - } - }); - - that.dialog_open(container); - }; - - that.execute = function() { - }; - that.deleter_dialog_create = that.create; return that; |