mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 18:01:23 -06:00
Fixed error dialog box.
The IPA.cmd() has been modified to set the error dialog box's title properly.
This commit is contained in:
parent
744eb8ea74
commit
397da3f781
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user