다이얼로그 아이디 찾는 함수 추가

main
이범준 3 months ago
parent e79e83c9d2
commit ef8ca6877e

@ -156,7 +156,7 @@ $(document).ready(function(){
focusClose(); focusClose();
} }
}); });
dialog.close("overTimeProcessDialog--${openerPageName}"); dialog.close($P.selfDlgId());
if ("${savedCallbackFuncName}" != "") { if ("${savedCallbackFuncName}" != "") {
${savedCallbackFuncName}(resp.saved); ${savedCallbackFuncName}(resp.saved);

@ -484,6 +484,7 @@ $(document).ready(function(){
content : resp, content : resp,
size : "xxl", size : "xxl",
init : () => { init : () => {
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();

@ -436,7 +436,7 @@ $(document).ready(function() {
, size : "xl" , size : "xl"
, content : resp , content : resp
, init : () => { , init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("table template")[0].innerHTML; var found = $("#"+dialogId).find("table template")[0].innerHTML;
var trs = cur.inStrings(found, null); var trs = cur.inStrings(found, null);
$("#"+dialogId).find("tbody").html(trs.join()); $("#"+dialogId).find("tbody").html(trs.join());
@ -480,7 +480,7 @@ $(document).ready(function() {
, content : resp , content : resp
, init : () => { , init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("table template")[0].innerHTML; var found = $("#"+dialogId).find("table template")[0].innerHTML;
var trs1 = upDataset.inStrings(found, null); var trs1 = upDataset.inStrings(found, null);
var trs2 = downDataset.inStrings(found, null); var trs2 = downDataset.inStrings(found, null);
@ -522,7 +522,6 @@ $(document).ready(function() {
, content : resp , content : resp
, init : () => { , init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("table template")[0].innerHTML; var found = $("#"+dialogId).find("table template")[0].innerHTML;
var trs = upDataset.inStrings(found, null); var trs = upDataset.inStrings(found, null);
$("#"+dialogId).find("tbody").html(trs.join()); $("#"+dialogId).find("tbody").html(trs.join());
@ -599,7 +598,7 @@ $(document).ready(function() {
content : resp, content : resp,
init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("table template")[0].innerHTML; var found = $("#"+dialogId).find("table template")[0].innerHTML;
var trs = upDataset.inStrings(found, null); var trs = upDataset.inStrings(found, null);
$("#"+dialogId).find("tbody").html(trs.join()); $("#"+dialogId).find("tbody").html(trs.join());
@ -654,7 +653,6 @@ $(document).ready(function() {
content : resp, content : resp,
init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("table template")[0].innerHTML; var found = $("#"+dialogId).find("table template")[0].innerHTML;
var trs = upDataset.inStrings(found, null); var trs = upDataset.inStrings(found, null);
$("#"+dialogId).find("tbody").html(trs.join()); $("#"+dialogId).find("tbody").html(trs.join());

@ -41,7 +41,7 @@
</div> </div>
<form name="frmEdit"> <form name="frmEdit">
<input type="text" name="dialogId" hidden />
<div class="row g-1 mt-2"> <div class="row g-1 mt-2">
<div class="col-md-12"> <div class="col-md-12">
<label is="name-label" for="etcCn" class="bg-lighter px-2 col-form-label">특기사항</label> <label is="name-label" for="etcCn" class="bg-lighter px-2 col-form-label">특기사항</label>
@ -96,8 +96,8 @@ $(document).ready(function(){
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
alert("저장되었습니다."); alert("저장되었습니다.");
var dialogId = $P.$find("frmEdit").find("input[name='dialogId']").val();
dialog.close(dialogId); dialog.close($P.selfDlgId());
} }
} }
}); });

@ -68,10 +68,7 @@
</div> </div>
</div> </div>
</div> </div>
<form name="frmEdit">
<input type="text" name="dialogId" hidden />
</form>
</div> </div>
</div> </div>

@ -65,7 +65,7 @@
</div> </div>
<form name="frmEdit"> <form name="frmEdit">
<input type="text" name="dialogId" hidden />
<div class="row g-1"> <div class="row g-1">
<div class="col-md-4"> <div class="col-md-4">
<label is="name-label" for="docNo" <label is="name-label" for="docNo"

@ -74,7 +74,7 @@
</div> </div>
<form name="frmEdit"> <form name="frmEdit">
<input type="text" name="dialogId" hidden />
</form> </form>

@ -72,7 +72,7 @@
</div> </div>
<form name="frmEdit"> <form name="frmEdit">
<input type="text" name="dialogId" hidden />
</form> </form>

@ -17,6 +17,9 @@ class DoctxFinder extends EventTarget {
selfElement(){ selfElement(){
return document.querySelector("[data-doctx='"+this.doctx+"']"); return document.querySelector("[data-doctx='"+this.doctx+"']");
} }
selfDlgId(){
return $(this.selfElement()).parents(".modal")[0].id;
}
$find(name){ $find(name){
return $(document.querySelector("[data-doctx='"+this.doctx+"']")).find("[name='"+name+"']"); return $(document.querySelector("[data-doctx='"+this.doctx+"']")).find("[name='"+name+"']");
} }

Loading…
Cancel
Save