diff options
Diffstat (limited to 'phpBB/assets/javascript/core.js')
-rw-r--r-- | phpBB/assets/javascript/core.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 88ef5733fe..8426743c5e 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -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. |