mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Restore default success callback of ajaxForm() so that successful messages are printed
This commit is contained in:
parent
7e53bef104
commit
51983aad8f
1 changed files with 9 additions and 2 deletions
|
|
@ -514,7 +514,7 @@ Rhymix.ajaxSuccessHandler = function(xhr, textStatus, action, data, params, succ
|
|||
|
||||
// If the response contains a redirect URL, follow the redirect.
|
||||
if (data.redirect_url) {
|
||||
this.redirectToUrl(data.redirect_url.replace(/&/g, "&"));
|
||||
this.redirectToUrl(data.redirect_url.replace(/&/g, '&'));
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
|
@ -595,7 +595,14 @@ Rhymix.ajaxForm = function(form, success, error) {
|
|||
} else if (success && window[success] && $.isFunction(window[success])) {
|
||||
success = window[success];
|
||||
} else {
|
||||
success = null;
|
||||
success = function(data) {
|
||||
if (data.message && data.message !== 'success') {
|
||||
alert(data.message);
|
||||
}
|
||||
if (data.redirect_url) {
|
||||
Rhymix.redirectToUrl(data.redirect_url.replace(/&/g, '&'));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
if (typeof error === 'undefined') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue