mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Merge pull request #1312 from nemo9l/improve/exec_json
#1311 exec_json 에서 callback_error 의 반환값에 따라 alert 하지 않도록 수정
This commit is contained in:
commit
369858012e
1 changed files with 4 additions and 6 deletions
|
|
@ -241,11 +241,12 @@
|
||||||
|
|
||||||
// If the response contains an error, display the error message.
|
// If the response contains an error, display the error message.
|
||||||
if(data.error != "0" && data.error > -1000) {
|
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") {
|
if(data.error == -1 && data.message == "admin.msg_is_not_administrator") {
|
||||||
alert("You are not logged in as an administrator.");
|
alert("You are not logged in as an administrator.");
|
||||||
if ($.isFunction(callback_error)) {
|
|
||||||
callback_error(data);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (data.message) {
|
if (data.message) {
|
||||||
|
|
@ -253,9 +254,6 @@
|
||||||
} else {
|
} else {
|
||||||
alert("AJAX communication error while requesting " + request_info);
|
alert("AJAX communication error while requesting " + request_info);
|
||||||
}
|
}
|
||||||
if ($.isFunction(callback_error)) {
|
|
||||||
callback_error(data);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue