From bb2ceaeea32b981fd2e6e80cb3fd4f7161f3925a Mon Sep 17 00:00:00 2001 From: tworrall Date: Tue, 7 May 2013 11:00:01 -0400 Subject: [PATCH] display a time indicator while the delete is being processed --- .../web/js/individual/manageLabelsForIndividual.js | 13 +++++++++++++ .../body/individual/manageLabelsForIndividual.ftl | 3 +++ 2 files changed, 16 insertions(+) diff --git a/webapp/web/js/individual/manageLabelsForIndividual.js b/webapp/web/js/individual/manageLabelsForIndividual.js index c51597d91..73a63cad8 100644 --- a/webapp/web/js/individual/manageLabelsForIndividual.js +++ b/webapp/web/js/individual/manageLabelsForIndividual.js @@ -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', ''); } } }); diff --git a/webapp/web/templates/freemarker/body/individual/manageLabelsForIndividual.ftl b/webapp/web/templates/freemarker/body/individual/manageLabelsForIndividual.ftl index ded17a0e1..fcdcb34f8 100644 --- a/webapp/web/templates/freemarker/body/individual/manageLabelsForIndividual.ftl +++ b/webapp/web/templates/freemarker/body/individual/manageLabelsForIndividual.ftl @@ -46,6 +46,9 @@ Multiple labels exist for this profile but there should only be one. Select the or Cancel +