summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-02-21 15:42:53 -0600
committerAdam Young <ayoung@redhat.com>2011-02-22 13:25:06 -0500
commit397da3f78192cc8eafdf6d36d0ac1f3303bfaaa4 (patch)
treeef2d834bfe57d2572ed969be16cc5da1c4c0ebda
parent744eb8ea740d9f63a1757cb4d83f63ee4096dea0 (diff)
downloadfreeipa-397da3f78192cc8eafdf6d36d0ac1f3303bfaaa4.zip
freeipa-397da3f78192cc8eafdf6d36d0ac1f3303bfaaa4.tar.gz
freeipa-397da3f78192cc8eafdf6d36d0ac1f3303bfaaa4.tar.xz
Fixed error dialog box.
The IPA.cmd() has been modified to set the error dialog box's title properly.
-rw-r--r--install/ui/ipa.js22
1 files changed, 4 insertions, 18 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index 386ce37..34244b0 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -353,6 +353,7 @@ IPA.cmd = function (name, args, options, win_callback, fail_callback, objname, c
IPA.error_dialog.dialog({
modal: true,
+ title: error_thrown.title,
width: 400,
buttons: {
'Retry': function () {
@@ -373,8 +374,6 @@ IPA.cmd = function (name, args, options, win_callback, fail_callback, objname, c
function ajax_error_handler(xhr, text_status, error_thrown) {
IPA.error_dialog.empty();
- IPA.error_dialog.attr('title', error_thrown.title);
-
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
dialog_open.call(this, xhr, text_status, error_thrown);
@@ -403,33 +402,20 @@ IPA.cmd = function (name, args, options, win_callback, fail_callback, objname, c
}
}
- error_thrown.title = 'AJAX Error: '+error_thrown.name;
+ if (!error_thrown.title) {
+ error_thrown.title = 'AJAX Error: '+error_thrown.name;
+ }
ajax_error_handler.call(this, xhr, text_status, error_thrown);
}
-
function http_error_handler(xhr, text_status, error_thrown) {
IPA.error_dialog.empty();
- IPA.error_dialog.attr('title', error_thrown.title);
-
IPA.error_dialog.append('<p>URL: '+this.url+'</p>');
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
dialog_open.call(this, xhr, text_status, error_thrown);
}
- //Think this should be removed
- function alt_error_handler(xhr, text_status, error_thrown) {
- hide_activity_icon();
- IPA.error_dialog.empty();
- IPA.error_dialog.attr('title', error_thrown.title);
-
- IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
-
- dialog_open.call(this, xhr, text_status, error_thrown);
- }
-
-
function success_handler(data, text_status, xhr) {
hide_activity_icon();
if (!data) {