diff --git a/front/src/main/resources/static/ui/commonUtil.js b/front/src/main/resources/static/ui/commonUtil.js index 6506dcfe..a3051b5b 100644 --- a/front/src/main/resources/static/ui/commonUtil.js +++ b/front/src/main/resources/static/ui/commonUtil.js @@ -172,7 +172,7 @@ kri.form.errorInit = function (formElement) { if (formElement.length > 0) { $(formElement).find('.component-input').removeClass('input-invalid'); $(formElement).find('.input-flex-group').removeClass('invalid'); - $(formElement).find('.select-group').removeClass('select-invalid'); + $(formElement).find('.select-group').removeClass('input-invalid'); $(formElement).find('.input-info').each(function () { $(this).remove(); }); @@ -238,11 +238,12 @@ kri.form.error = function(errorList){ } }); - if(errorList && errorList.length > 0){ - const target = $('[name="' + errorList[0].field + '"]'); - if (target.length > 0) { - target.focus(); - } + // 포커스 이동 + if ($('.input-invalid').length != 0) { + $('.input-invalid').eq(0).find('input').focus(); + } + if ($('.select-invalid').length != 0) { + $('.select-invalid').eq(0).find('button').focus(); } } diff --git a/front/src/main/resources/templates/info/bank/input.html b/front/src/main/resources/templates/info/bank/input.html index 488a7b19..c4d59e8c 100644 --- a/front/src/main/resources/templates/info/bank/input.html +++ b/front/src/main/resources/templates/info/bank/input.html @@ -332,6 +332,7 @@ const next = document.getElementById('complateBtn'); const header = document.getElementById('listHeader'); const count = document.getElementById('listCount'); + const totalItems = document.getElementById('totalItems'); const total = ENV.data.bankList.length; @@ -339,6 +340,7 @@ status.style.display = total > 0 ? 'none' : ''; callPastInfoBtn.style.display = total > 0 ? 'none' : ''; count.textContent = total; + totalItems.textContent = total; btn.disabled = isChecked; @@ -474,9 +476,6 @@ ENV.data.bankList = []; document.getElementById('listBody').innerHTML = ''; formControl.updateLayout(); - - // TODO(ks): 선택 삭제 시 전체 count 미반영 중. 일단 전체 초기화에서만 count 갱신. - document.getElementById('totalItems').textContent = ENV.data.bankList.length; }, }); }, @@ -557,7 +556,9 @@ ${buttonGroupHtml}