mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +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(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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue