mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
[ticket/15174] Split timeout message to extra method and set timeout to 60s
PHPBB3-15174
This commit is contained in:
parent
8a624c4dcc
commit
f645865333
1 changed files with 14 additions and 7 deletions
|
@ -33,18 +33,25 @@ phpbb.loadingIndicator = function() {
|
||||||
|
|
||||||
if (!$loadingIndicator.is(':visible')) {
|
if (!$loadingIndicator.is(':visible')) {
|
||||||
$loadingIndicator.fadeIn(phpbb.alertTime);
|
$loadingIndicator.fadeIn(phpbb.alertTime);
|
||||||
// Wait fifteen seconds and display an error if nothing has been returned by then.
|
// Wait 60 seconds and display an error if nothing has been returned by then.
|
||||||
phpbb.clearLoadingTimeout();
|
phpbb.clearLoadingTimeout();
|
||||||
phpbbAlertTimer = setTimeout(function() {
|
phpbbAlertTimer = setTimeout(function() {
|
||||||
|
phpbb.showTimeoutMessage();
|
||||||
|
}, 60000);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $loadingIndicator;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show timeout message
|
||||||
|
*/
|
||||||
|
phpbb.showTimeoutMessage = function () {
|
||||||
var $alert = $('#phpbb_alert');
|
var $alert = $('#phpbb_alert');
|
||||||
|
|
||||||
if ($loadingIndicator.is(':visible')) {
|
if ($loadingIndicator.is(':visible')) {
|
||||||
phpbb.alert($alert.attr('data-l-err'), $alert.attr('data-l-timeout-processing-req'));
|
phpbb.alert($alert.attr('data-l-err'), $alert.attr('data-l-timeout-processing-req'));
|
||||||
}
|
}
|
||||||
}, 25000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $loadingIndicator;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue