mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-16 08:18:53 +00:00
Merge pull request #4796 from marc1706/ticket/15174
[ticket/15174] Increase timeout for loading indicator * github.com:phpbb/phpbb: [ticket/15174] Split timeout message to extra method and set timeout to 60s [ticket/15174] Increase timeout for loading indicator
This commit is contained in:
commit
67995e1e09
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'));
|
||||||
}
|
}
|
||||||
}, 15000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $loadingIndicator;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue