소스정리(html엘리먼트 id제거 및 name추가)

main
이범준 3 months ago
parent 323096ac45
commit 15bb4a276c

@ -256,15 +256,15 @@
<div class="area-photoinspection h-px-200"> <div class="area-photoinspection h-px-200">
선택자료 선택자료
<strong id="curDataVhrno--${pageName}"></strong> <strong name="curDataVhrno"></strong>
<div id="curDataFiles--${pageName}" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray"> <div name="curDataFiles" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
</div> </div>
</div> </div>
<div class="area-photoinspection h-px-200"> <div class="area-photoinspection h-px-200">
비교자료(선택자료의 다음 자료가 보여집니다.) 비교자료(선택자료의 다음 자료가 보여집니다.)
<strong id="nextDataVhrno--${pageName}"></strong> <strong name="nextDataVhrno"></strong>
<div id="nextDataFiles--${pageName}" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray"> <div name="nextDataFiles" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
</div> </div>
</div> </div>
@ -833,15 +833,15 @@ $(document).ready(function(){
$P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => { $P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => {
if(dataKey == ""){ if(dataKey == ""){
$("#curDataVhrno--${pageName}").html(""); $P.$find("curDataVhrno").html("");
$("#nextDataVhrno--${pageName}").html(""); $P.$find("nextDataVhrno").html("");
$("#curDataFiles--${pageName}").html(""); $P.$find("curDataFiles").html("");
$("#nextDataFiles--${pageName}").html(""); $P.$find("nextDataFiles").html("");
return; return;
} }
$("#curDataVhrno--${pageName}").html(curDataVhrno); $P.$find("curDataVhrno").html(curDataVhrno);
$("#nextDataVhrno--${pageName}").html(nextDataVhrno); $P.$find("nextDataVhrno").html(nextDataVhrno);
ajax.get({ ajax.get({
url:"file/list.do", url:"file/list.do",
@ -857,16 +857,16 @@ $(document).ready(function(){
var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey); var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey);
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey); var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey);
$("#curDataFiles--${pageName}").html(""); $P.$find("curDataFiles").html("");
$("#nextDataFiles--${pageName}").html(""); $P.$find("nextDataFiles").html("");
currentDataFileList.forEach(function(item, index, array){ currentDataFileList.forEach(function(item, index, array){
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"cur"+item.FILE_ID+'${pageName}',item.MOSAIC); var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"cur"+item.FILE_ID+'${pageName}',item.MOSAIC);
$("#curDataFiles--${pageName}").append(output); $P.$find("curDataFiles").append(output);
}); });
nextDataFileList.forEach(function(item, index, array){ nextDataFileList.forEach(function(item, index, array){
var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"next"+item.FILE_ID+'${pageName}',item.MOSAIC); var output = fnMakeImgTagForInspection(item.URL, item.FILE_NM,"next"+item.FILE_ID+'${pageName}',item.MOSAIC);
$("#nextDataFiles--${pageName}").append(output); $P.$find("nextDataFiles").append(output);
}); });
} }

@ -146,7 +146,7 @@
</div> </div>
</form> </form>
</div> </div>
<div id="imageArea--${pageName}" class="card my-4 px-4 w-px-600 h-px-600 justify-content-center"> <div name="imageArea" class="card my-4 px-4 w-px-600 h-px-600 justify-content-center">
</div> </div>
<div class="card my-4 px-2 w-px-120 h-px-600"> <div class="card my-4 px-2 w-px-120 h-px-600">
@ -199,7 +199,7 @@ $(document).ready(function(){
}; };
$P.ctrl.dataset.onCurrentChange = (dataItem) => { $P.ctrl.dataset.onCurrentChange = (dataItem) => {
$("#imageArea--${pageName}").html(""); $P.$find("imageArea").html("");
if(dataItem && dataItem.data){ if(dataItem && dataItem.data){
var dataKey = dataItem.data.FILE_NAME; var dataKey = dataItem.data.FILE_NAME;
@ -352,13 +352,13 @@ $(document).ready(function(){
span.appendChild(img); span.appendChild(img);
div.appendChild(span); div.appendChild(span);
} }
$("#imageArea--${pageName}").append(div); $P.$find("imageArea").append(div);
} else { } else {
var img = document.createElement("img"); var img = document.createElement("img");
img.style["object-fit"] = "contain"; img.style["object-fit"] = "contain";
img.src = src; img.src = src;
$("#imageArea--${pageName}").append(img); $P.$find("imageArea").append(img);
} }
} }

@ -354,7 +354,7 @@
<button type="button" name="btnOpenVideoCapture" class="btn btn-primary">동영상 캡쳐</button> <button type="button" name="btnOpenVideoCapture" class="btn btn-primary">동영상 캡쳐</button>
<button type="button" name="btnCancelAddFile" class="btn btn-primary">선택 사진 삭제</button> <button type="button" name="btnCancelAddFile" class="btn btn-primary">선택 사진 삭제</button>
</div> </div>
<div id="display--${pageName}" class="oy-scroll h-px-600 border-default"> <div name="display" class="oy-scroll h-px-600 border-default">
</div> </div>
</div> </div>
@ -428,7 +428,7 @@ $(document).ready(function(){
} }
$P.fnDisplay = () => { $P.fnDisplay = () => {
var displayArea = document.querySelector("#display--${pageName}"); var displayArea = $P.find("display");
var concatArr = $P.localUploadArr.concat($P.captureFileArr); var concatArr = $P.localUploadArr.concat($P.captureFileArr);
var tagsText = $P.fnMakeImgForNewFile(concatArr); var tagsText = $P.fnMakeImgForNewFile(concatArr);
@ -554,7 +554,7 @@ $(document).ready(function(){
}); });
$P.$find("btnCancelAddFile").on('click', () => { $P.$find("btnCancelAddFile").on('click', () => {
var checked = $("#display--${pageName}").find("[name='newPhoto']:checked"); var checked = $P.$find("display").find("[name='newPhoto']:checked");
if(checked.length < 1){ if(checked.length < 1){
alert("선택된 사진이 없습니다."); alert("선택된 사진이 없습니다.");
return; return;

@ -109,7 +109,7 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div slot="search" id="searchForNxrp--${pageName}" class="col-6 if-empty-col0"> <div slot="search" name="searchForNxrp" class="col-6 if-empty-col0">
<template class="pvs bpv"> <template class="pvs bpv">
<slot> <slot>
<label class="form-label fw-bold form-search-title w-px-120 text-end" <label class="form-label fw-bold form-search-title w-px-120 text-end"
@ -155,7 +155,7 @@
</form> </form>
<div> <div>
<div id="gridbuttonArea--${pageName}" class="container-page-btn"> <div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></span> <span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary"> <ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
@ -371,7 +371,7 @@ $(document).ready(function(){
//업무별 조회조건 //업무별 조회조건
renderForTask($P.find("frmSearch"), clsForTask); renderForTask($P.find("frmSearch"), clsForTask);
//업무별 버튼 //업무별 버튼
renderForTask("gridbuttonArea--${pageName}", clsForTask); renderForTask($P.find("gridbuttonArea"), clsForTask);
//버튼 이벤트 재매핑 //버튼 이벤트 재매핑
$P.$find("btnSendCrdn").off("click"); $P.$find("btnSendCrdn").off("click");
$P.$find("btnSendCrdn").on("click", () => $P.fnSendCrdn()); $P.$find("btnSendCrdn").on("click", () => $P.fnSendCrdn());
@ -387,7 +387,7 @@ $(document).ready(function(){
if(SYS_LINK_INFO = null || SYS_LINK_INFO.NXRP_LINK_YN != 'Y'){ if(SYS_LINK_INFO = null || SYS_LINK_INFO.NXRP_LINK_YN != 'Y'){
$P.$find("btnSendCrdn").attr("hidden","hidden"); $P.$find("btnSendCrdn").attr("hidden","hidden");
$("#searchForNxrp--${pageName}").attr("hidden","hidden"); $P.$find("searchForNxrp").attr("hidden","hidden");
} else { } else {
$P.$find("btnSendCrdn").prop("disabled", true); $P.$find("btnSendCrdn").prop("disabled", true);
} }

@ -204,7 +204,7 @@
</button> </button>
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white"> <div class="toast-body bg-black text-white">
삭제 되었습니다. 삭제 되었습니다.
</div> </div>
@ -234,7 +234,7 @@ $(document).ready(function(){
$P.holdList = []; $P.holdList = [];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000

@ -56,7 +56,6 @@
<button type="button" class="btn btn-blue" name="btnMakeHwp" title="한글파일 다운"> <button type="button" class="btn btn-blue" name="btnMakeHwp" title="한글파일 다운">
한글파일 다운 한글파일 다운
</button> </button>
<div id="tempArea--${pageName}"></div>
</span> </span>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
@ -80,7 +79,7 @@
</c:forEach> </c:forEach>
</select> </select>
</div> </div>
<div class="col-md-6" id="pageNavArea--${pageName}"> <div class="col-md-6" name="pageNavArea">
<input type="text" id="countStauts--${pageName}" <input type="text" id="countStauts--${pageName}"
class="form-control w-px-150 text-center fw-bold" readonly /> class="form-control w-px-150 text-center fw-bold" readonly />
<button type="button" iname="btnPrev" class="w-px-50 btn-PageUp">◀</button> <button type="button" iname="btnPrev" class="w-px-50 btn-PageUp">◀</button>
@ -111,7 +110,7 @@ $(document).ready(function() {
$P.provided = pageObject.parentRes.pop(); $P.provided = pageObject.parentRes.pop();
} else { } else {
$P.provided = pageObject.childReq.pop(); $P.provided = pageObject.childReq.pop();
$("#pageNavArea--${pageName}").hide(); $P.$find("pageNavArea").hide();
} }
/************************************************************************** /**************************************************************************

@ -198,7 +198,7 @@
</div> </div>
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white"> <div class="toast-body bg-black text-white">
삭제 되었습니다. 삭제 되었습니다.
</div> </div>
@ -230,7 +230,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000

@ -112,8 +112,8 @@
</div> </div>
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div id="toastText--${pageName}" class="toast-body bg-black text-white"> <div name="toastText" class="toast-body bg-black text-white">
</div> </div>
</div> </div>
</div> </div>
@ -168,7 +168,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000
@ -351,7 +351,7 @@ $(document).ready(function(){
$P.removeCallback = (selected, resp) => { $P.removeCallback = (selected, resp) => {
if (resp.saved){ if (resp.saved){
$("#toastText--${pageName}").html("삭제 되었습니다."); $P.$find("toastText").html("삭제 되었습니다.");
$P.toast.show(); $P.toast.show();
sleep(1000).then(() => $P.refreshDmndList()); sleep(1000).then(() => $P.refreshDmndList());
} }
@ -424,7 +424,7 @@ $(document).ready(function(){
if(resp.saved){ if(resp.saved){
dialog.close("seallDmndDialog--${pageName}"); dialog.close("seallDmndDialog--${pageName}");
$("#toastText--${pageName}").html("등록 되었습니다."); $P.$find("toastText").html("등록 되었습니다.");
$P.toast.show(); $P.toast.show();
if(!$P.ctrl.dataset.empty){ if(!$P.ctrl.dataset.empty){

@ -268,7 +268,7 @@
</div> </div>
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white"> <div class="toast-body bg-black text-white">
저장 되었습니다. 저장 되었습니다.
</div> </div>
@ -307,7 +307,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000

@ -105,7 +105,7 @@
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white"> <div class="toast-body bg-black text-white">
저장 되었습니다. 저장 되었습니다.
</div> </div>
@ -127,7 +127,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000

Loading…
Cancel
Save