From 7830e2f8f45bf29ad74d7c514e7ea3c2aab1f665 Mon Sep 17 00:00:00 2001 From: Webstack Date: Thu, 11 Jun 2020 17:02:04 +0900 Subject: [PATCH] =?UTF-8?q?#1311=20exec=5Fjson=20=EC=97=90=EC=84=9C=20call?= =?UTF-8?q?back=5Ferror=20=EC=9D=98=20=EB=B0=98=ED=99=98=EA=B0=92=EC=97=90?= =?UTF-8?q?=20=EB=94=B0=EB=9D=BC=20alert=20=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/xml_handler.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index 24207788a..7495dbd93 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -241,11 +241,12 @@ // If the response contains an error, display the error message. if(data.error != "0" && data.error > -1000) { + // Should not display the error message when the callback function returns false. + if ($.isFunction(callback_error) && callback_error(data) === false) { + return; + } if(data.error == -1 && data.message == "admin.msg_is_not_administrator") { alert("You are not logged in as an administrator."); - if ($.isFunction(callback_error)) { - callback_error(data); - } return; } else { if (data.message) { @@ -253,9 +254,6 @@ } else { alert("AJAX communication error while requesting " + request_info); } - if ($.isFunction(callback_error)) { - callback_error(data); - } return; } }