aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/assets
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-02-15 21:04:19 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-03-31 02:09:26 +0200
commitea4362fc4cc89c4371d3eaadb1326676c6d2793e (patch)
treed0596967513d7096294117e5cbbc91725d7f7091 /phpBB/assets
parent27199bb50954e22416e64154032e08801d0fbb6d (diff)
downloadforums-ea4362fc4cc89c4371d3eaadb1326676c6d2793e.tar
forums-ea4362fc4cc89c4371d3eaadb1326676c6d2793e.tar.gz
forums-ea4362fc4cc89c4371d3eaadb1326676c6d2793e.tar.bz2
forums-ea4362fc4cc89c4371d3eaadb1326676c6d2793e.tar.xz
forums-ea4362fc4cc89c4371d3eaadb1326676c6d2793e.zip
[feature/ajax] Use the error handler
PHPBB3-10270
Diffstat (limited to 'phpBB/assets')
-rw-r--r--phpBB/assets/javascript/core.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index 1faec27316..764bc74bce 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -328,7 +328,8 @@ phpbb.ajaxify = function(options) {
url: res.S_CONFIRM_ACTION,
type: 'POST',
data: data + '&confirm=' + res.YES_VALUE,
- success: return_handler
+ success: return_handler,
+ error: error_handler
});
}
}, false);
@@ -341,9 +342,11 @@ phpbb.ajaxify = function(options) {
alert = phpbb.alert(dark.attr('data-ajax-error-title'), dark.attr('data-ajax-error-text'));
- dark.fadeOut(phpbb.alert_time, function() {
- alert.hide();
- });
+ setTimeout(function () {
+ dark.fadeOut(phpbb.alert_time, function() {
+ alert.hide();
+ });
+ }, 5000);
}
// 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,
type: method,
data: data,
- success: return_handler
+ success: return_handler,
+ error: error_handler
});
return false;