aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2020-01-30 21:16:53 +0100
committerMarc Alexander <admin@m-a-styles.de>2020-01-30 21:16:53 +0100
commit0922605da84a9b3e7935c1aa245163959fcfa240 (patch)
treeec799fb5b5c99b517b9648a75dea0d2c5a848a1c
parentMerge branch '3.3.x' (diff)
parentMerge branch '3.2.x' into 3.3.x (diff)
downloadphpbb-0922605da84a9b3e7935c1aa245163959fcfa240.tar.gz
phpbb-0922605da84a9b3e7935c1aa245163959fcfa240.tar.bz2
phpbb-0922605da84a9b3e7935c1aa245163959fcfa240.zip
Merge branch '3.3.x'
-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);
}
}
}