mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
rx_ajax 사용시 XE_VALIDATOR_MESSAGE 대신 rhymix_alert만 표시
일관성 유지
This commit is contained in:
parent
d7b48eb5ad
commit
085b74b7db
2 changed files with 37 additions and 20 deletions
|
|
@ -377,10 +377,9 @@
|
|||
callback_success = window[callback_success];
|
||||
} else {
|
||||
callback_success = function(data) {
|
||||
if (data.message === 'success') {
|
||||
return;
|
||||
if (data.message && data.message !== 'success') {
|
||||
rhymix_alert(data.message, data.redirect_url);
|
||||
}
|
||||
rhymix_alert(data.message, data.redirect_url);
|
||||
if (data.redirect_url) {
|
||||
redirect(data.redirect_url);
|
||||
}
|
||||
|
|
@ -392,6 +391,13 @@
|
|||
} else {
|
||||
callback_error = null;
|
||||
}
|
||||
// Set _rx_ajax_form flag
|
||||
if (!form.find('input[name=_rx_ajax_form]').size()) {
|
||||
form.append('<input type="hidden" name="_rx_ajax_form" value="true" />');
|
||||
setTimeout(function() {
|
||||
form.find('input[name=_rx_ajax_form]').remove();
|
||||
}, 1000);
|
||||
}
|
||||
// If the form has file uploads, use a hidden iframe to submit. Otherwise use exec_json.
|
||||
var has_files = form.find('input[type=file][name!=Filedata]').size();
|
||||
if (has_files) {
|
||||
|
|
@ -410,7 +416,7 @@
|
|||
}, 1000);
|
||||
form.submit();
|
||||
} else {
|
||||
window.exec_json('raw', form.serialize() + '&_rx_ajax_form=1', callback_success, callback_error);
|
||||
window.exec_json('raw', form.serialize(), callback_success, callback_error);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue