mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/ajax] Use the error handler
PHPBB3-10270
This commit is contained in:
parent
27199bb509
commit
ea4362fc4c
1 changed files with 9 additions and 5 deletions
|
@ -328,7 +328,8 @@ phpbb.ajaxify = function(options) {
|
||||||
url: res.S_CONFIRM_ACTION,
|
url: res.S_CONFIRM_ACTION,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: data + '&confirm=' + res.YES_VALUE,
|
data: data + '&confirm=' + res.YES_VALUE,
|
||||||
success: return_handler
|
success: return_handler,
|
||||||
|
error: error_handler
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
@ -341,9 +342,11 @@ phpbb.ajaxify = function(options) {
|
||||||
|
|
||||||
alert = phpbb.alert(dark.attr('data-ajax-error-title'), dark.attr('data-ajax-error-text'));
|
alert = phpbb.alert(dark.attr('data-ajax-error-title'), dark.attr('data-ajax-error-text'));
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
dark.fadeOut(phpbb.alert_time, function() {
|
dark.fadeOut(phpbb.alert_time, function() {
|
||||||
alert.hide();
|
alert.hide();
|
||||||
});
|
});
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the element is a form, POST must be used and some extra data must
|
// If the element is a form, POST must be used and some extra data must
|
||||||
|
@ -376,7 +379,8 @@ phpbb.ajaxify = function(options) {
|
||||||
url: action,
|
url: action,
|
||||||
type: method,
|
type: method,
|
||||||
data: data,
|
data: data,
|
||||||
success: return_handler
|
success: return_handler,
|
||||||
|
error: error_handler
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue