Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/prototech/ticket/11339' into de…
Browse files Browse the repository at this point in the history
…velop-ascraeus

# By Cesar G
# Via Cesar G
* remotes/prototech/ticket/11339:
  [ticket/11339] Always clear timeout functions on subsequent AJAX calls
  • Loading branch information
EXreaction committed May 2, 2014
2 parents 83cdad7 + 5cc0f50 commit 621023e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion phpBB/assets/javascript/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down Expand Up @@ -315,7 +316,7 @@ phpbb.ajaxify = function(options) {
refresh = false;
}

setTimeout(function() {
phpbbAlertTimer = setTimeout(function() {
if (refresh) {
window.location = res.REFRESH_DATA.url;
}
Expand Down
2 changes: 1 addition & 1 deletion phpBB/styles/prosilver/template/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit 621023e

Please sign in to comment.