mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 16:22:22 +02:00
[ticket/13905] Don't load loading.gif until needed.
PHPBB3-13905
This commit is contained in:
parent
049f584111
commit
d978564600
@ -15,7 +15,7 @@ var keymap = {
|
||||
};
|
||||
|
||||
var $dark = $('#darkenwrapper');
|
||||
var $loadingIndicator = $('#loading_indicator');
|
||||
var $loadingIndicator;
|
||||
var phpbbAlertTimer = null;
|
||||
|
||||
phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
@ -26,6 +26,11 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
* @returns {object} Returns loadingIndicator.
|
||||
*/
|
||||
phpbb.loadingIndicator = function() {
|
||||
if (!$loadingIndicator) {
|
||||
$loadingIndicator = $('<div />', { id: 'loading_indicator' });
|
||||
$loadingIndicator.appendTo('#page-footer');
|
||||
}
|
||||
|
||||
if (!$loadingIndicator.is(':visible')) {
|
||||
$loadingIndicator.fadeIn(phpbb.alertTime);
|
||||
// Wait fifteen seconds and display an error if nothing has been returned by then.
|
||||
|
@ -18,7 +18,6 @@
|
||||
<div id="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
|
||||
<div id="darken"> </div>
|
||||
</div>
|
||||
<div id="loading_indicator"></div>
|
||||
|
||||
<div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
|
||||
<a href="#" class="alert_close"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user