display a time indicator while the delete is being processed

This commit is contained in:
tworrall 2013-05-07 11:00:01 -04:00
parent a314892277
commit bb2ceaeea3
2 changed files with 16 additions and 0 deletions

View file

@ -37,6 +37,11 @@ var manageLabels = {
$('input#submit').click( function() {
manageLabels.processLabel(manageLabels.selectedRadio);
$('span.or').hide();
$('a.cancel').hide();
$('span#indicator').removeClass('hidden');
$('input.submit').addClass('disabledSubmit');
$('input.submit').attr('disabled', 'disabled');
});
},
@ -70,11 +75,19 @@ var manageLabels = {
complete: function(request, status) {
if (status == 'success') {
$('span.or').show();
$('a.cancel').show();
$('span#indicator').addClass('hidden');
window.location = $('a.cancel').attr('href');
}
else {
alert('Error processing request: the unchecked labels could not be deleted.');
selectedRadio.removeAttr('checked');
$('span.or').show();
$('a.cancel').show();
$('span#indicator').addClass('hidden');
$('input.submit').removeClass('disabledSubmit');
$('input.submit').attr('disabled', '');
}
}
});

View file

@ -46,6 +46,9 @@ Multiple labels exist for this profile but there should only be one. Select the
<input type="button" class="submit" id="submit" value="Save" role="button" role="input" />
<span class="or"> or </span>
<a href="${urls.referringPage}" class="cancel" title="cancel" >Cancel</a>
<span id="indicator" class="indicator hidden">
<img class="indicator" src="${urls.base}/images/indicatorWhite.gif" />&nbsp;Your selection is being processed.
</span>
</p>
</section>