From 08905eb9a9039b38c032275a87b4f5602e5a63dd Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 5 Aug 2011 17:12:21 +0200 Subject: Fixed adding host without DNS reverse zone https://fedorahosted.org/freeipa/ticket/1481 Shows status dialog instead of error dialog (error 4304 is treated like success). Refactored error dialog. Added generic message dialog (IPA.message_dialog) Modified core tests to work with dialog. --- install/ui/dialog.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'install/ui/dialog.js') diff --git a/install/ui/dialog.js b/install/ui/dialog.js index 0a1d5428..0ec84a78 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -32,6 +32,7 @@ IPA.dialog = function(spec) { that.entity = spec.entity; that.name = spec.name; + that.id = spec.id; that.title = spec.title; that.width = spec.width || 400; that.height = spec.height; @@ -194,7 +195,7 @@ IPA.dialog = function(spec) { */ that.open = function(container) { - that.container = $('
'); + that.container = $('
', { id : that.id }); if (container) { container.append(that.container); } @@ -257,6 +258,7 @@ IPA.dialog = function(spec) { that.dialog_create = that.create; that.dialog_open = that.open; + that.dialog_close = that.close; var fields = spec.fields || []; for (var i=0; i', { + 'text': that.message + }).appendTo(that.container); + }; + + that.add_button(IPA.messages.buttons.ok, function() { + that.close(); + if(that.on_ok) { + that.on_ok(); + } + }); + + init(); + + return that; +}; -- cgit