From 5a8ce54d8ef69f749d4eaa992c2a807d3f550753 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 18 Dec 2023 15:28:29 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=B0=BD=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/fims/crdn/crdn02010-main.jsp | 10 ++++-- .../WEB-INF/jsp/fims/crdn/crdn02050-info.jsp | 21 ++++++++++--- .../WEB-INF/jsp/fims/crdn/crdn03010-main.jsp | 14 ++++++--- .../WEB-INF/jsp/fims/crdn/crdn05020-info.jsp | 21 ++++++++++--- .../WEB-INF/jsp/fims/crdn/crdn05030-info.jsp | 22 +++++++++---- .../WEB-INF/jsp/fims/crdn/crdn06020-info.jsp | 19 ++++++++---- .../WEB-INF/jsp/fims/crdn/crdn06030-info.jsp | 12 ++++--- .../WEB-INF/jsp/fims/crdn/crdn08010-main.jsp | 5 ++- .../WEB-INF/jsp/fims/crdn/crdn08020-info.jsp | 5 ++- .../WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp | 9 ++++-- .../WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp | 31 ++++++++++++++++--- .../WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp | 28 ++++++++++++----- .../WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp | 5 ++- .../WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp | 7 ++++- .../WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp | 2 ++ .../WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp | 1 + .../webapp/resources/js/base/base-fims.js | 20 ++++++++++++ 17 files changed, 180 insertions(+), 52 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp index 85f8b775..bae05a4c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp @@ -801,7 +801,10 @@ $(document).ready(function(){ success : resp => { if((typeof resp) != "string"){ - dialog.alert(resp.message); + dialog.alert({ + content : resp.message, + init : function(){ focusClose(); } + }); return; } @@ -842,7 +845,10 @@ $(document).ready(function(){ success : resp => { if((typeof resp) != "string"){ - dialog.alert(resp.message); + dialog.alert({ + content : resp.message, + init : function(){ focusClose(); } + }); return; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp index 96d37481..a840b3ac 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp @@ -73,8 +73,10 @@ $(document).ready(function(){ $P.crdnControl.onSave = (resp) => { if (resp.saved) { - - dialog.alert("저장됐습니다."); + dialog.alert({ + content : "저장됐습니다.", + init : function(){ focusClose(); } + }); dialog.close("overTimeProcessDialog--${openerPageName}"); if ("${savedCallbackFuncName}" != "") { @@ -90,14 +92,20 @@ $(document).ready(function(){ var alertMessage = ""; if($("#chgAmtSe--${pageName}").val() == "1"){ if(crdnInfo.OVTIME_YN == "Y"){ - dialog.alert({ content: "이미 가산 처리된 자료입니다." }); + dialog.alert({ + content : "이미 가산 처리된 자료입니다.", + init : function(){ focusClose(); } + }); return; } alertMessage = "가산 처리하시겠습니까?"; } else if($("#chgAmtSe--${pageName}").val() == "2"){ if(crdnInfo.OVTIME_PRTTN_YN == "Y"){ - dialog.alert({ content: "이미 감액 처리된 자료입니다." }); + dialog.alert({ + content : "이미 감액 처리된 자료입니다.", + init : function(){ focusClose(); } + }); return; } alertMessage = "감액 처리하시겠습니까?"; @@ -111,7 +119,10 @@ $(document).ready(function(){ $P.fnRestore = () => { if(crdnInfo.OVTIME_YN != "Y" && crdnInfo.OVTIME_PRTTN_YN != "Y"){ - dialog.alert({ content: "2시간 초과 처리되지 않은 자료입니다." }); + dialog.alert({ + content: "2시간 초과 처리되지 않은 자료입니다.", + init : function() { focusClose(); } + }); return; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp index d6db8c18..eb3b91f3 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp @@ -318,16 +318,20 @@ $(document).ready(function(){ $('#btnUpdateToConfirmData--${pageName}').on('click', () => { if(!$P.crdnControl.getCurrent()) { - dialog.alert({content:"선택된 자료가 없습니다.",timeout: 0, onOK:()=>{}}); + dialog.alert({ + content : "선택된 자료가 없습니다.", + init : function(){ focusClose(); } + }); return; }; - dialog.alert({ - content:"현 자료를 장애차량 확인된 자료로 변경하시겠습니까?", - onOK:() => { + dialog.alert({ + content : "현 자료를 장애차량 확인된 자료로 변경하시겠습니까?", + init : function(){ focusOK(); }, + onOK:() => { $P.crdnControl.save({ 'crdnId' : $P.crdnControl.getCurrent()["CRDN_ID"] }); } - }); + }); }); /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp index 2dbb9d09..e5a4a129 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp @@ -247,7 +247,10 @@ $(document).ready(function(){ if(resp.saved){ $P.searchFileList(); } else { - dialog.alert("파일 조회에 실패하였습니다."); + dialog.alert({ + content : "파일 조회에 실패하였습니다.", + init : function(){ focusClose(); } + }); } } }); @@ -258,7 +261,10 @@ $(document).ready(function(){ $P.uploadLocalFile = () => { if($("#uploadFiles--${pageName}").val() == ""){ - dialog.alert("파일이 없습니다."); + dialog.alert({ + content : "파일이 없습니다.", + init : function(){ focusClose(); } + }); return; } @@ -274,7 +280,11 @@ $(document).ready(function(){ $("#uploadFiles--${pageName}").val(""); $P.searchFileList(); } else { - dialog.alert("파일 업로드에 실패하였습니다."); + dialog.alert({ + content : "파일 업로드에 실패하였습니다.", + init : function(){ focusClose(); } + }); + return; } } }); @@ -359,7 +369,10 @@ $(document).ready(function(){ $P.createCrdn = () => { if($.isEmptyObject($P.tempGroup)){ - dialog.alert("모든 자료가 처리 완료되었습니다."); + dialog.alert({ + content : "모든 자료가 처리 완료되었습니다.", + init : function(){ focusClose(); } + }); return; } diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp index 17dd03d8..d18b880e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp @@ -432,7 +432,10 @@ $(document).ready(function(){ $P.crdnControl.onSave = (resp) => { if (resp.saved) { - dialog.alert("저장됐습니다."); + dialog.alert({ + content : "저장됐습니다.", + init : function(){ focusClose(); } + }); dialog.close("manualdialog"); } }; @@ -477,11 +480,11 @@ $(document).ready(function(){ if(rtpyrNm.value == ""){ dialog.alert({ content:"계고 처리를 하기 위해선 소유주정보가 입력되어야 합니다.", + init : function(){ focusClose(); }, onClose:function(){rtpyrNm.focus();} }); return; } - } if(confirm("현재 단속 정보를 저장하시겠습니까?")){ @@ -547,20 +550,24 @@ $(document).ready(function(){ }); $("#vhrno--${pageName}").on("keyup",function(e){ + var alertDialogId = "alertDialog"; if(e.key == "Enter"){ var crdnYmd = $("#crdnYmd--${pageName}").val().replaceAll("-", ""); var vhrno = this.value; if(crdnYmd == ""){ dialog.alert({ - content:"단속일자를 입력하세요.", - onClose:function(){ $("#crdnYmd--${pageName}").focus(); } + content : "단속일자를 입력하세요.", + init : function(){ focusClose(); }, + onClose : function(){ $("#crdnYmd--${pageName}").focus(); } }); + return; } if(vhrno == ""){ dialog.alert({ content:"차량번호를 입력하세요.", - onClose:function(){ $(this).focus(); } + init : function(){ focusClose(); }, + onClose:function(){ $("#vhrno--${pageName}").focus(); } }); return; } @@ -574,7 +581,10 @@ $(document).ready(function(){ }, success:resp => { if(!resp.found){ - dialog.alert("차량 정보가 없습니다."); + dialog.alert({ + content : "차량정보가 없습니다.", + init : function(){ focusClose(); } + }); $("#rtpyrId--${pageName}").val(""); $("#rtpyrNm--${pageName}").val(""); $("#rtpyrSeCd--${pageName}").val(""); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp index 238a6b0f..b4328cf5 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp @@ -332,7 +332,10 @@ let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html(); let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle); - dialog.alert(showMessage); + dialog.alert({ + content : showMessage, + init : function(){ focusClose(); } + }); if (resp.saved) { dialog.close(${pageName}Control.prefix + "Dialog"); @@ -380,8 +383,10 @@ $("#ffnlgCarmdlCd--${pageName}").val(""); if (!resp.found) { - dialog.alert("차량 정보가 없습니다."); - + dialog.alert({ + content : "차량 정보가 없습니다.", + init : function(){ focusClose(); } + }); return; } @@ -459,14 +464,15 @@ if (crdnYmd == "") { dialog.alert({ content : "단속일자를 입력하세요.", + init : function(){ focusClose(); }, onClose : function() { $("#crdnYmd--${pageName}").focus(); } }); - return; } if (vhrno == "") { dialog.alert({ content : "차량번호를 입력하세요.", + init : function(){ focusClose(); }, onClose : function() { $("#vhrno--${pageName}").focus(); } }); @@ -495,8 +501,9 @@ } dialog.alert({ - content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?" - , onOK : () => { + content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?", + init : function(){ focusOK(); }, + onOK : () => { ${pageName}Control.save(${pageName}Fields.get()); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp index ec899cfe..c0b9b244 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06030-info.jsp @@ -95,8 +95,11 @@ let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html(); let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle); - dialog.alert(showMessage); - + dialog.alert({ + content : showMessage, + init : function(){ focusClose(); } + }); + if (resp.saved) { dialog.close(${pageName}Control.prefix + "Dialog"); } @@ -135,8 +138,9 @@ if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return; dialog.alert({ - content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?" - , onOK : () => { + content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?", + init : function() { focusOK(); }, + onOK : () => { ${pageName}Control.save(${pageName}Fields.get()); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp index 18a643d4..88a99f05 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp @@ -331,7 +331,10 @@ $(document).ready(function(){ } var data = $P.exmptnVhclControl.dataset.getData(dataKey); if(data.DEL_YN == "Y"){ - dialog.alert("삭제된 자료입니다."); + dialog.alert({ + content : "삭제된 자료입니다.", + init : function() { focusClose(); } + }); return; } $P.exmptnVhclControl.getInfo({"exmptnVhclId" : dataKey}); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp index 29410158..3eb70489 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp @@ -132,7 +132,10 @@ $(document).ready(function(){ $P.exmptnVhclControl.onSave = (resp) => { if (resp.saved) { - dialog.alert("저장됐습니다."); + dialog.alert({ + content : "저장됐습니다.", + init : function() { focusClose(); } + }); dialog.close("exmptnvhcldialog"); $P.provided.refreshList(); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 8a3a2ea8..032178e9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -491,6 +491,7 @@ $(document).ready(function(){ } $P.fnRemove = (rcptYmd) => { + if(rcptYmd != null){ var ds = $P.crdnControl.dataset.getDataset(); @@ -499,7 +500,7 @@ $(document).ready(function(){ return item["CRDN_ID"]; } }); - + $P.crdnControl.select(crdnIds,true); } else { var cur = $P.crdnControl.getCurrent(); @@ -510,6 +511,7 @@ $(document).ready(function(){ var curKey = cur["CRDN_ID"]; $P.crdnControl.select(curKey,true); } + $P.crdnControl.remove(); } @@ -521,8 +523,9 @@ $(document).ready(function(){ var curRcptYmd = cur["CVLCPT_RCPT_YMD"]; dialog.alert({ - content : "접수일 : "+dateFormat.format(curRcptYmd)+"
모든 자료를 제거하시겠습니까?" - , onOK : () => { + content : "접수일 : "+dateFormat.format(curRcptYmd)+"
모든 자료를 제거하시겠습니까?", + init : function() { focusOK(); }, + onOK : () => { $P.fnRemove(curRcptYmd); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp index dd92b654..568af410 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp @@ -563,8 +563,11 @@ $(document).ready(function(){ $P.crdnControl.onSave = (resp) => { if (resp.saved) { - - dialog.alert("저장됐습니다."); + + dialog.alert({ + content : "저장됐습니다.", + init : function() { focusClose(); } + }); if($("#levyExcldialog--${pageName}").length > 0){ dialog.close("levyExcldialog--${pageName}"); @@ -684,6 +687,7 @@ $(document).ready(function(){ if(vhrno.value == ""){ dialog.alert({ content:"수용 처리를 하기 위해선 차량번호가 입력되어야 합니다.", + init : function() { focusClose(); }, onClose:function(){vhrno.focus();} }); return; @@ -692,6 +696,7 @@ $(document).ready(function(){ if(rtpyrNm.value == ""){ dialog.alert({ content:"수용 처리를 하기 위해선 소유주정보가 입력되어야 합니다.", + init : function() { focusClose(); }, onClose:function(){rtpyrNm.focus();} }); return; @@ -718,7 +723,12 @@ $(document).ready(function(){ if(resp.saved){ var message = "민원회수 요청이 등록되었습니다.\n" +"30~60분 사이에 서버에서 민원시스템으로 전송이 진행되니 이후에 민원시스템에서 확인하시기 바랍니다."; - dialog.alert(message); + + dialog.alert({ + content : message, + init : function() { focusClose(); } + }); + var crdnId = $("#crdnId--${pageName}").val(); @@ -790,6 +800,7 @@ $(document).ready(function(){ if(rtpyrNm.value == ""){ dialog.alert({ content:"계고 처리를 하기 위해선 소유주정보가 입력되어야 합니다.", + init : function() { focusClose(); }, onClose:function(){rtpyrNm.focus();} }); return; @@ -897,7 +908,11 @@ $(document).ready(function(){ data : { crdnId : crdnId }, success : resp => { if (resp.saved) { - dialog.alert("복사 자료가 생성되었습니다."); + dialog.alert({ + content : "복사 자료가 생성되었습니다.", + init : function() { focusClose(); } + }); + $("#refreshEnd--${pageName}").attr("data-cursor-key", crdnId); $P.provided.refreshList(); } @@ -1132,6 +1147,7 @@ $(document).ready(function(){ if(crdnYmd == ""){ dialog.alert({ content:"단속일자를 입력하세요.", + init : function() { focusClose(); }, onClose:function(){ $("#crdnYmd--${pageName}").focus(); } }); return; @@ -1139,6 +1155,7 @@ $(document).ready(function(){ if(vhrno == ""){ dialog.alert({ content:"차량번호를 입력하세요.", + init : function() { focusClose(); }, onClose:function(){ $(this).focus(); } }); return; @@ -1154,7 +1171,11 @@ $(document).ready(function(){ success:resp => { if(!resp.found){ - dialog.alert("차량 정보가 없습니다."); + dialog.alert({ + content : "차량 정보가 없습니다.", + init : function() { focusClose(); } + }); + $("#rtpyrId--${pageName}").val(""); $("#rtpyrNm--${pageName}").val(""); $("#rtpyrSeCd--${pageName}").val(""); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index b1fb8df5..a7c4c5e8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -261,7 +261,10 @@ $(document).ready(function(){ }, success : resp => { if(resp.saved){ - dialog.alert({ content : "저장됐습니다." }); + dialog.alert({ + content : "차량 정보가 없습니다.", + init : function() { focusClose(); } + }); $P.refreshCrdnList(); } } @@ -551,8 +554,9 @@ $(document).ready(function(){ var count = $P.crdnControl.dataset.getKeys("selected").length; dialog.alert({ - content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?" - , onOK : () => { + content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", + init : function() { focusOK(); }, + onOK : () => { $P.crdnControl.save('answerExecute'); } }); @@ -563,8 +567,9 @@ $(document).ready(function(){ var count = $P.crdnControl.dataset.getKeys("selected").length; dialog.alert({ - content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?" - , onOK : () => { + content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?", + init : function() { focusOK(); }, + onOK : () => { $P.crdnControl.save('answerComplete'); } }); @@ -584,7 +589,10 @@ $(document).ready(function(){ } if(keys.length == 0){ - dialog.alert("표지조회는 부과대상자료만 가능합니다.
선택된 자료 중에 부과대상자료가 없습니다."); + dialog.alert({ + content : "표지조회는 부과대상자료만 가능합니다.
선택된 자료 중에 부과대상자료가 없습니다.", + init : function() { focusClose(); } + }); return; } @@ -595,6 +603,7 @@ $(document).ready(function(){ dialog.alert({ content : message, + init : function() { focusOK(); }, onOK : () => { ajax.get({ url : wctx.url("/DPV/cvlc/cvlc02/040/update.do"), @@ -602,8 +611,11 @@ $(document).ready(function(){ "crdnIDs" : keys.join(",") }, success : resp => { - - dialog.alert("표지정보조회가 실행되었습니다."); + dialog.alert({ + content : "표지정보조회가 실행되었습니다.", + init : function() { focusClose(); } + }); + $P.refreshCrdnList(); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp index fa20915f..2df591c9 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp @@ -120,7 +120,10 @@ $(document).ready(function() { $P.cvlcptControl.onSave = (resp) => { if (resp.saved) { - dialog.alert("저장됐습니다."); + dialog.alert({ + content : "표지정보조회가 실행되었습니다.", + init : function() { focusClose(); } + }); } } diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 76ddc766..9626c5ad 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -380,16 +380,21 @@ $(document).ready(function(){ }); if(indivIds.length == 0){ - dialog.alert("요청 완료자료가 없습니다."); + dialog.alert({ + content : "요청 완료자료가 없습니다.", + init : function() { focusClose(); } + }); return; } dialog.alert({ content : "완료된 자료를 모두 삭제하시겠습니까?", + init : function() { focusOK(); }, onOK : () => { $P.fnRemove(indivIds); } }); + } //요청 등록 팝업 호출 diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp index a43b1514..32eff956 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc05010-main.jsp @@ -626,6 +626,7 @@ $(document).ready(function(){ dialog.alert({ content : confirmMessage, + init : function() { focusOK(); }, onOK: () => { ajax.get({ @@ -650,6 +651,7 @@ $(document).ready(function(){ dialog.alert({ content : "해당 미부과사유를 답변대상에서 제외하시겠습니까?", + init : function() { focusOK(); }, onOK: () => { ajax.get({ url : $P.ansBodyControl.urls.remove, diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp index ed278307..111aeb3b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp @@ -283,6 +283,7 @@ $(document).ready(function(){ dialog.alert({ content : "저장하시겠습니까?", + init : function() { focusOK(); }, onOK: () => { ajax.get({ diff --git a/src/main/webapp/resources/js/base/base-fims.js b/src/main/webapp/resources/js/base/base-fims.js index e23ba5d3..7d3d01d6 100644 --- a/src/main/webapp/resources/js/base/base-fims.js +++ b/src/main/webapp/resources/js/base/base-fims.js @@ -1,4 +1,24 @@ +/************************************************************************** +* 모달창 닫기 버튼 포커스 +**************************************************************************/ +function focusClose() { + $(document).find("div.modal").last().on('shown.bs.modal', function () { + $(this).find(".btn-close").trigger('focus'); + }); +} +/************************************************************************** +* 모달창 확인 버튼 포커스 +**************************************************************************/ +function focusOK() { + $(document).find("div.modal").last().on('shown.bs.modal', function () { + $(this).find(".modal-footer").find("button").each(function(){ + if($(this).text() == "확인"){ + $(this).trigger('focus'); + } + }); + }); +} /************************************************************************** * UI요소 값 세팅 **************************************************************************/