diff --git a/phpBB/adm/images/loading.gif b/phpBB/adm/images/loading.gif new file mode 100644 index 0000000000..e1ed0883e0 Binary files /dev/null and b/phpBB/adm/images/loading.gif differ diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 0cbdc2e9f8..fee2efb001 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -1593,6 +1593,20 @@ input.button1:focus, input.button2:focus, input.button3:focus { } } +#loading_indicator { + background: #000000 url("../images/loading.gif") center center no-repeat; + border-radius: 5px; + display: none; + opacity: 0.8; + margin-top: -50px; + margin-left: -50px; + height: 50px; + width: 50px; + position: fixed; + left: 50%; + top: 50%; +} + /* Pagination ---------------------------------------- */ .pagination { diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 3c291842dc..72af9d3388 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -17,8 +17,8 @@
 
-

{L_LOADING}

{L_PLEASE_WAIT}

+
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index efb945a117..dfbbd12929 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -12,7 +12,7 @@ var keymap = { }; var dark = $('#darkenwrapper'); -var loadingAlert = $('#loadingalert'); +var loadingAlert = $('#loading_indicator'); var phpbbAlertTimer = null; @@ -22,18 +22,14 @@ var phpbbAlertTimer = null; * @returns object Returns loadingAlert. */ phpbb.loadingAlert = function() { - if (dark.is(':visible')) { + if (!loadingAlert.is(':visible')) { loadingAlert.fadeIn(phpbb.alertTime); - } else { - loadingAlert.show(); - dark.fadeIn(phpbb.alertTime, function() { - // Wait fifteen seconds and display an error if nothing has been returned by then. - phpbbAlertTimer = setTimeout(function() { - if (loadingAlert.is(':visible')) { - phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req')); - } - }, 15000); - }); + // Wait fifteen seconds and display an error if nothing has been returned by then. + phpbbAlertTimer = setTimeout(function() { + if (loadingAlert.is(':visible')) { + phpbb.alert($('#phpbb_alert').attr('data-l-err'), $('#phpbb_alert').attr('data-l-timeout-processing-req')); + } + }, 15000); } return loadingAlert; @@ -66,6 +62,10 @@ phpbb.alert = function(title, msg, fadedark) { div.find('.alert_title').html(title); div.find('.alert_text').html(msg); + if (!dark.is(':visible')) { + dark.fadeIn(phpbb.alertTime); + } + div.bind('click', function(e) { e.stopPropagation(); }); @@ -131,6 +131,10 @@ phpbb.confirm = function(msg, callback, fadedark) { var div = $('#phpbb_confirm'); div.find('.alert_text').html(msg); + if (!dark.is(':visible')) { + dark.fadeIn(phpbb.alertTime); + } + div.bind('click', function(e) { e.stopPropagation(); }); @@ -372,13 +376,16 @@ phpbb.ajaxify = function(options) { phpbb.loadingAlert(); } - $.ajax({ + var request = $.ajax({ url: action, type: method, data: data, success: returnHandler, error: errorHandler }); + request.always(function() { + loadingAlert.fadeOut(phpbb.alertTime); + }); event.preventDefault(); }); diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 86e55c54f6..a831ab6cb4 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -34,8 +34,8 @@
 
-

{L_LOADING}

{L_PLEASE_WAIT}

+
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 960415afbf..d4e63bf3ec 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -1104,6 +1104,11 @@ input.disabled { background-color: #000000; } +#loading_indicator { + background-color: #000000; + background-image: url("./images/loading.gif"); +} + #notification_list ul li { border-bottom-color: #B9B9B9; } diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 84aea8212c..1e5c9e4e6a 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -821,6 +821,20 @@ li.pagination ul { opacity: 0.5; } +#loading_indicator { + background: center center no-repeat; + border-radius: 5px; + display: none; + opacity: 0.8; + margin-top: -50px; + margin-left: -50px; + height: 50px; + width: 50px; + position: fixed; + left: 50%; + top: 50%; +} + /* Miscellaneous styles ---------------------------------------- */ #forum-permissions { diff --git a/phpBB/styles/prosilver/theme/images/loading.gif b/phpBB/styles/prosilver/theme/images/loading.gif new file mode 100644 index 0000000000..e1ed0883e0 Binary files /dev/null and b/phpBB/styles/prosilver/theme/images/loading.gif differ