aboutsummaryrefslogtreecommitdiff
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2020-01-30 21:16:46 +0100
committerMarc Alexander <admin@m-a-styles.de>2020-01-30 21:16:46 +0100
commitcd995ff45f7e8bf1ca85f2225d94d193b9f15858 (patch)
treef316b18c901e0587d4c6cf6009803b37f4028a5a /phpBB
parentMerge pull request #5825 from AlfredoRamos/ticket/16313 (diff)
parentMerge pull request #5834 from mrgoldy/ticket/15370 (diff)
downloadphpbb-cd995ff45f7e8bf1ca85f2225d94d193b9f15858.tar.gz
phpbb-cd995ff45f7e8bf1ca85f2225d94d193b9f15858.tar.bz2
phpbb-cd995ff45f7e8bf1ca85f2225d94d193b9f15858.zip
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/ajax.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/adm/style/ajax.js b/phpBB/adm/style/ajax.js
index 39b63e4696..3702c94ca8 100644
--- a/phpBB/adm/style/ajax.js
+++ b/phpBB/adm/style/ajax.js
@@ -201,7 +201,9 @@ function submitPermissions() {
var permissionSubmitSize = 0,
permissionRequestCount = 0,
forumIds = [],
- permissionSubmitFailed = false;
+ permissionSubmitFailed = false,
+ clearIndicator = true,
+ $loadingIndicator;
if ($submitAllButton !== $submitButton) {
fieldsetList = $form.find('fieldset#' + $submitButton.closest('fieldset.permissions').id);
@@ -235,6 +237,8 @@ function submitPermissions() {
}
});
+ $loadingIndicator = phpbb.loadingIndicator();
+
/**
* Handler for submitted permissions form chunk
*
@@ -250,6 +254,8 @@ function submitPermissions() {
} else if (!permissionSubmitFailed && res.S_USER_NOTICE) {
// Display success message at the end of submitting the form
if (permissionRequestCount >= permissionSubmitSize) {
+ clearIndicator = true;
+
var $alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
var $alertBoxLink = $alert.find('p.alert_text > a');
@@ -299,6 +305,17 @@ function submitPermissions() {
$form.submit();
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
}
+ } else {
+ // Still more forms to submit, so do not clear indicator
+ clearIndicator = false;
+ }
+ }
+
+ if (clearIndicator) {
+ phpbb.clearLoadingTimeout();
+
+ if ($loadingIndicator) {
+ $loadingIndicator.fadeOut(phpbb.alertTime);
}
}
}