mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-16 11:21:56 -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({
|
IPA.error_dialog.dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
|
title: error_thrown.title,
|
||||||
width: 400,
|
width: 400,
|
||||||
buttons: {
|
buttons: {
|
||||||
'Retry': function () {
|
'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) {
|
function ajax_error_handler(xhr, text_status, error_thrown) {
|
||||||
IPA.error_dialog.empty();
|
IPA.error_dialog.empty();
|
||||||
IPA.error_dialog.attr('title', error_thrown.title);
|
|
||||||
|
|
||||||
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
|
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
|
||||||
|
|
||||||
dialog_open.call(this, xhr, text_status, error_thrown);
|
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);
|
ajax_error_handler.call(this, xhr, text_status, error_thrown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function http_error_handler(xhr, text_status, error_thrown) {
|
function http_error_handler(xhr, text_status, error_thrown) {
|
||||||
IPA.error_dialog.empty();
|
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>URL: '+this.url+'</p>');
|
||||||
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
|
IPA.error_dialog.append('<p>'+error_thrown.message+'</p>');
|
||||||
|
|
||||||
dialog_open.call(this, xhr, text_status, error_thrown);
|
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) {
|
function success_handler(data, text_status, xhr) {
|
||||||
hide_activity_icon();
|
hide_activity_icon();
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user