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); } }); }