Merge branch 'develop-ascraeus' into develop

# By Cesar G
# Via Cesar G (1) and Nathaniel Guse (1)
* develop-ascraeus:
  [ticket/11339] Always clear timeout functions on subsequent AJAX calls
This commit is contained in:
Nathaniel Guse 2014-05-01 21:36:25 -05:00
commit 730b73dab7
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@ phpbb.loadingIndicator = function() {
if (!loadingIndicator.is(':visible')) {
loadingIndicator.fadeIn(phpbb.alertTime);
// Wait fifteen seconds and display an error if nothing has been returned by then.
phpbb.clearLoadingTimeout();
phpbbAlertTimer = setTimeout(function() {
if (loadingIndicator.is(':visible')) {
phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req'));
@ -315,7 +316,7 @@ phpbb.ajaxify = function(options) {
refresh = false;
}
setTimeout(function() {
phpbbAlertTimer = setTimeout(function() {
if (refresh) {
window.location = res.REFRESH_DATA.url;
}

View file

@ -8,7 +8,7 @@
* @param int Delay in ms until darkenwrapper's click event is triggered
*/
phpbb.closeDarkenWrapper = function(delay) {
setTimeout(function() {
phpbbAlertTimer = setTimeout(function() {
$('#darkenwrapper').trigger('click');
}, delay);
};