diff --git a/js/wizardhelper.js b/js/wizardhelper.js index 5877e7562..a3eac2478 100644 --- a/js/wizardhelper.js +++ b/js/wizardhelper.js @@ -176,7 +176,7 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) { var sString = "$('#"+aRefreshed[i]+"').trigger('change').trigger('update');"; window.setTimeout(sString, 1); // Synchronous 'trigger' does nothing, call it asynchronously } - if($('.blockUI').length == 0) { + if($('[data-field-status="blocked"]').length === 0) { $('.disabledDuringFieldLoading').prop("disabled", false).removeClass('disabledDuringFieldLoading'); } }; @@ -203,9 +203,11 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) { {operation: 'wizard_helper', json_obj: this.ToJSON()}, function (html) { $('#ajax_content').html(html); - $('.blockUI').parent().unblock(); + $('[data-field-status="blocked"]') + .attr('data-field-status', 'ready') + .unblock(); - if($('.blockUI').length == 0) { + if($('[data-field-status="blocked"]').length === 0) { $('.disabledDuringFieldLoading').prop("disabled", false).removeClass('disabledDuringFieldLoading'); } } @@ -247,21 +249,22 @@ function WizardHelper(sClass, sFormPrefix, sState, sInitialState, sStimulus) { { sAttCode = aFieldNames[index]; sFieldId = this.GetFieldId(sAttCode); - if (sFieldId !== undefined) - { + if (sFieldId !== undefined) { nbOfFieldsToUpdate++; - $('#fstatus_'+sFieldId).html(''); - $('#field_'+sFieldId).find('div').block({ - message: '', - overlayCSS: {backgroundColor: '#f1f1f1', opacity: 0.3} + $('#fstatus_' + sFieldId).html(''); + $('#field_' + sFieldId).find('div') + .attr('data-field-status', 'blocked') + .block({ + message: '', + overlayCSS: {backgroundColor: '#f1f1f1', opacity: 0.3} }); fieldForm = $('#field_' + sFieldId).closest('form'); this.RequestAllowedValues(sAttCode); } index++; } - - if ((fieldForm !== null) && ($('.blockUI').length > 0)) { + + if ((fieldForm !== null) && ($('[data-field-status="blocked"]').length > 0)) { fieldForm.find('button[type=submit]:not(:disabled)').prop("disabled", true).addClass('disabledDuringFieldLoading'); }