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

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

@ -256,15 +256,15 @@
<div class="area-photoinspection h-px-200">
선택자료
<strong id="curDataVhrno--${pageName}"></strong>
<div id="curDataFiles--${pageName}" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
<strong name="curDataVhrno"></strong>
<div name="curDataFiles" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
</div>
</div>
<div class="area-photoinspection h-px-200">
비교자료(선택자료의 다음 자료가 보여집니다.)
<strong id="nextDataVhrno--${pageName}"></strong>
<div id="nextDataFiles--${pageName}" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
<strong name="nextDataVhrno"></strong>
<div name="nextDataFiles" class="ox-scroll d-flex w-100 h-px-175 bg-bordergray">
</div>
</div>
@ -833,15 +833,15 @@ $(document).ready(function(){
$P.showPhoto = (dataKey, nextDataKey, curDataVhrno, nextDataVhrno) => {
if(dataKey == ""){
$("#curDataVhrno--${pageName}").html("");
$("#nextDataVhrno--${pageName}").html("");
$("#curDataFiles--${pageName}").html("");
$("#nextDataFiles--${pageName}").html("");
$P.$find("curDataVhrno").html("");
$P.$find("nextDataVhrno").html("");
$P.$find("curDataFiles").html("");
$P.$find("nextDataFiles").html("");
return;
}
$("#curDataVhrno--${pageName}").html(curDataVhrno);
$("#nextDataVhrno--${pageName}").html(nextDataVhrno);
$P.$find("curDataVhrno").html(curDataVhrno);
$P.$find("nextDataVhrno").html(nextDataVhrno);
ajax.get({
url:"file/list.do",
@ -857,16 +857,16 @@ $(document).ready(function(){
var currentDataFileList = fileList.filter(x => x.INF_KEY == dataKey);
var nextDataFileList = fileList.filter(x => x.INF_KEY == nextDataKey);
$("#curDataFiles--${pageName}").html("");
$("#nextDataFiles--${pageName}").html("");
$P.$find("curDataFiles").html("");
$P.$find("nextDataFiles").html("");
currentDataFileList.forEach(function(item, index, array){
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){
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>
</form>
</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 class="card my-4 px-2 w-px-120 h-px-600">
@ -199,7 +199,7 @@ $(document).ready(function(){
};
$P.ctrl.dataset.onCurrentChange = (dataItem) => {
$("#imageArea--${pageName}").html("");
$P.$find("imageArea").html("");
if(dataItem && dataItem.data){
var dataKey = dataItem.data.FILE_NAME;
@ -352,13 +352,13 @@ $(document).ready(function(){
span.appendChild(img);
div.appendChild(span);
}
$("#imageArea--${pageName}").append(div);
$P.$find("imageArea").append(div);
} else {
var img = document.createElement("img");
img.style["object-fit"] = "contain";
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="btnCancelAddFile" class="btn btn-primary">선택 사진 삭제</button>
</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>
@ -428,7 +428,7 @@ $(document).ready(function(){
}
$P.fnDisplay = () => {
var displayArea = document.querySelector("#display--${pageName}");
var displayArea = $P.find("display");
var concatArr = $P.localUploadArr.concat($P.captureFileArr);
var tagsText = $P.fnMakeImgForNewFile(concatArr);
@ -554,7 +554,7 @@ $(document).ready(function(){
});
$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){
alert("선택된 사진이 없습니다.");
return;

@ -109,7 +109,7 @@
</c:forEach>
</select>
</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">
<slot>
<label class="form-label fw-bold form-search-title w-px-120 text-end"
@ -155,7 +155,7 @@
</form>
<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">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
@ -371,7 +371,7 @@ $(document).ready(function(){
//업무별 조회조건
renderForTask($P.find("frmSearch"), clsForTask);
//업무별 버튼
renderForTask("gridbuttonArea--${pageName}", clsForTask);
renderForTask($P.find("gridbuttonArea"), clsForTask);
//버튼 이벤트 재매핑
$P.$find("btnSendCrdn").off("click");
$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'){
$P.$find("btnSendCrdn").attr("hidden","hidden");
$("#searchForNxrp--${pageName}").attr("hidden","hidden");
$P.$find("searchForNxrp").attr("hidden","hidden");
} else {
$P.$find("btnSendCrdn").prop("disabled", true);
}

@ -204,7 +204,7 @@
</button>
</div>
<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>
@ -234,7 +234,7 @@ $(document).ready(function(){
$P.holdList = [];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
$P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true,
autohide: true,
delay: 2000

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

@ -198,7 +198,7 @@
</div>
</div>
<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>
@ -230,7 +230,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
$P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true,
autohide: true,
delay: 2000

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

@ -268,7 +268,7 @@
</div>
</div>
<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>
@ -307,7 +307,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
$P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true,
autohide: true,
delay: 2000

@ -105,7 +105,7 @@
</div>
<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>
@ -127,7 +127,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
$P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true,
autohide: true,
delay: 2000

Loading…
Cancel
Save