From 8281a69ad947719379d27ed220ff85c2ae177bad Mon Sep 17 00:00:00 2001 From: jjh Date: Fri, 15 Sep 2023 09:09:39 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=A7=84=20=EC=A0=80=EC=9E=A5,=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=ED=9B=84=20=EC=BD=9C=EB=B0=B1=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=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/sprt/sprt02020-info.jsp | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp index 65e63477..2ab9e629 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp @@ -407,9 +407,8 @@ } }; - // 사진 저장 콜백 - saveFileCallback${pageName} = (resp) => { - let btnTitle = $("#btnAddFile--${pageName}").attr("title"); + // 사진 콜백 + callbackFile${pageName} = (btnTitle, resp) => { let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle); dialog.alert(showMessage); @@ -424,6 +423,7 @@ saveFile${pageName} = (info) => { if (!info) return; + let btnTitle = $("#btnAddFile--${pageName}").attr("title"); let formData = new FormData(document.getElementById("frmFile--${pageName}")); for (let key in info) { @@ -445,27 +445,15 @@ , data : formData , contentType : false , processData : false - , success : resp => { saveFileCallback${pageName}(resp); } + , success : resp => { callbackFile${pageName}(btnTitle, resp); } }); } - // 선택 사진 삭제 콜백 - removeFileCallback${pageName} = (resp) => { - let btnTitle = $("#btnDeleteFile--${pageName}").attr("title"); - let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle); - - dialog.alert(showMessage); - - // 이미지(사진) 재조회 - if (resp.saved) { - refreshImageInfo${pageName}(); - } - }; - // 선택 사진 삭제 removeFile${pageName} = (target) => { if (!target) return; + let btnTitle = $("#btnDeleteFile--${pageName}").attr("title"); let fileId = ""; let crdnId = $("#crdnId--${pageName}").val(); @@ -490,7 +478,7 @@ ajax.post({ url : wctx.url("/sprt/sprt02/020/removeFile.do") , data : params || {} - , success : resp => { removeFileCallback${pageName}(resp); } + , success : resp => { callbackFile${pageName}(btnTitle, resp); } }); }