다이얼로그 관련 소스정리

main
이범준 3 months ago
parent a61d7d05d4
commit dada3444b3

@ -915,12 +915,18 @@ $(document).ready(function(){
return;
}
let dialogName = "levyExclDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : "levyExclDialog--${pageName}",
id : dialogId,
title : "부과제외 정보",
content : resp,
size : "md",
init : () => {},
init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
},
onClose : () => {}
});
@ -961,12 +967,18 @@ $(document).ready(function(){
return;
}
let dialogName = "overTimeProcessDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : "overTimeProcessDialog--${pageName}",
id : dialogId,
title : "2시간 초과 처리",
content : resp,
size : "lg",
init : () => {},
init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
},
onClose : () => {}
});
}
@ -974,8 +986,8 @@ $(document).ready(function(){
}
$P.popupSavedCallback = (saved) => {
if($("#levyExclDialog--${pageName}").length > 0){
dialog.close("levyExclDialog--${pageName}");
if($P.refDlgId("levyExclDialog") != ""){
dialog.close($P.refDlgId("levyExclDialog"));
}
if(saved){
@ -1005,7 +1017,9 @@ $(document).ready(function(){
, title: "사용자 검색"
, content: resp
, size: "lg"
, init: () => { setDialogZindex(); }
, init: () => {
setDialogZindex();
}
});
}
});

@ -61,7 +61,7 @@
</div>
<div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive ox-scroll oy-scroll h-px-600">
<div name="table-responsive" class="table-responsive ox-scroll oy-scroll h-px-600">
<table class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr name="exmptnVhclTheadTr">
@ -347,18 +347,23 @@ $(document).ready(function(){
fetch(wctx.url("/resources/html/inputRsnDialog.html"))
.then(function(resp) { return resp.text(); })
.then(function(template) {
dialog.open({
id: "inputDelRsnDialog--${pageName}"
let dialogName = "inputDelRsnDialog";
let dialogId = dialogName + "-" + uuid();
dialog.open({
id: dialogId
, title: "삭제 사유 입력"
, size: "lg"
, content: template
, init: () => { setDialogZindex(); }
, init: () => {
setDialogZindex();
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
}
, onOK: () => {
$P.fnRemove($("#reason").val());
}
});
});
});
}

@ -132,7 +132,7 @@
// 저장 callback
$P.control.onSave = (resp) => {
let dialogTitle = $("#" + $P.control.prefix + "Dialog--${openerPageName}").find("h5.modal-title").html();
let dialogTitle = $($("#frmEdit--${pageName}").parents(".modal")[0]).find("h5.modal-title").html();
let showMessage = resp.rtnMsg.replace(/[S]|[F]/g, dialogTitle);
// 메시지 출력
@ -143,7 +143,7 @@
});
if (resp.saved) {
dialog.close($P.control.prefix + "Dialog--${openerPageName}");
dialog.close($("#frmEdit--${pageName}").parents(".modal")[0].id);
if ("${savedCallbackFuncName}" != "") {
${savedCallbackFuncName}(resp.saved);

@ -18,7 +18,18 @@ class DoctxFinder extends EventTarget {
return document.querySelector("[data-doctx='"+this.doctx+"']");
}
selfDlgId(){
return $(this.selfElement()).parents(".modal")[0].id;
if($(this.selfElement()).parents(".modal").length > 0){
return $(this.selfElement()).parents(".modal")[0].id;
} else {
return "";
}
}
refDlgId(dlgName){
if($(".modal[data-ref-doctx='"+this.doctx+"'][name='"+dlgName+"']").length > 0){
return $(".modal[data-ref-doctx='"+this.doctx+"'][name='"+dlgName+"']")[0].id;
} else {
return "";
}
}
$find(name){
return $(document.querySelector("[data-doctx='"+this.doctx+"']")).find("[name='"+name+"']");

Loading…
Cancel
Save