phpBB

Code Changes

File: adm/style/ajax.js

  Unmodified   Added   Modified   Removed
Line 173Line 173
	var permissionSubmitSize = 0,
permissionRequestCount = 0,
forumIds = [],

	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);


if ($submitAllButton !== $submitButton) {
fieldsetList = $form.find('fieldset#' + $submitButton.closest('fieldset.permissions').id);

Line 206Line 208
			forumIds.push(value.value);
}
});

			forumIds.push(value.value);
}
});

 

$loadingIndicator = phpbb.loadingIndicator();


/**
* Handler for submitted permissions form chunk


/**
* Handler for submitted permissions form chunk

Line 222Line 226
		} else if (!permissionSubmitFailed && res.S_USER_NOTICE) {
// Display success message at the end of submitting the form
if (permissionRequestCount >= permissionSubmitSize) {

		} 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');


				var $alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
var $alertBoxLink = $alert.find('p.alert_text > a');


Line 271Line 277
						$form.submit();
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
}

						$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);

			}
}
}

			}
}
}

Line 280Line 297
		$.ajax({
url: $form.action,
type: 'POST',

		$.ajax({
url: $form.action,
type: 'POST',

			data: formData + '&' + $submitAllButton.name + '=' + encodeURIComponent($submitAllButton.value) +

			data: formData + '&' + $submitButton.name + '=' + encodeURIComponent($submitButton.value) +

				'&creation_time=' + $form.find('input[type=hidden][name=creation_time]')[0].value +
'&form_token=' + $form.find('input[type=hidden][name=form_token]')[0].value +

				'&creation_time=' + $form.find('input[type=hidden][name=creation_time]')[0].value +
'&form_token=' + $form.find('input[type=hidden][name=form_token]')[0].value +

				'&' + $form.children('input[type=hidden]').serialize(),


				'&' + $form.children('input[type=hidden]').serialize() +
'&' + $form.find('input[type=checkbox][name^=inherit]').serialize(),

			success: handlePermissionReturn,
error: handlePermissionReturn
});

			success: handlePermissionReturn,
error: handlePermissionReturn
});