|
|
@ -407,9 +407,8 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 사진 저장 콜백
|
|
|
|
// 사진 콜백
|
|
|
|
saveFileCallback${pageName} = (resp) => {
|
|
|
|
callbackFile${pageName} = (btnTitle, resp) => {
|
|
|
|
let btnTitle = $("#btnAddFile--${pageName}").attr("title");
|
|
|
|
|
|
|
|
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
|
|
|
|
let showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
|
|
|
|
|
|
|
|
|
|
|
|
dialog.alert(showMessage);
|
|
|
|
dialog.alert(showMessage);
|
|
|
@ -424,6 +423,7 @@
|
|
|
|
saveFile${pageName} = (info) => {
|
|
|
|
saveFile${pageName} = (info) => {
|
|
|
|
if (!info) return;
|
|
|
|
if (!info) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let btnTitle = $("#btnAddFile--${pageName}").attr("title");
|
|
|
|
let formData = new FormData(document.getElementById("frmFile--${pageName}"));
|
|
|
|
let formData = new FormData(document.getElementById("frmFile--${pageName}"));
|
|
|
|
|
|
|
|
|
|
|
|
for (let key in info) {
|
|
|
|
for (let key in info) {
|
|
|
@ -445,27 +445,15 @@
|
|
|
|
, data : formData
|
|
|
|
, data : formData
|
|
|
|
, contentType : false
|
|
|
|
, contentType : false
|
|
|
|
, processData : 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) => {
|
|
|
|
removeFile${pageName} = (target) => {
|
|
|
|
if (!target) return;
|
|
|
|
if (!target) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let btnTitle = $("#btnDeleteFile--${pageName}").attr("title");
|
|
|
|
let fileId = "";
|
|
|
|
let fileId = "";
|
|
|
|
let crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
let crdnId = $("#crdnId--${pageName}").val();
|
|
|
|
|
|
|
|
|
|
|
@ -490,7 +478,7 @@
|
|
|
|
ajax.post({
|
|
|
|
ajax.post({
|
|
|
|
url : wctx.url("/sprt/sprt02/020/removeFile.do")
|
|
|
|
url : wctx.url("/sprt/sprt02/020/removeFile.do")
|
|
|
|
, data : params || {}
|
|
|
|
, data : params || {}
|
|
|
|
, success : resp => { removeFileCallback${pageName}(resp); }
|
|
|
|
, success : resp => { callbackFile${pageName}(btnTitle, resp); }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|