From f42af436d3ab98c99654c7934ba190c0c66e7c74 Mon Sep 17 00:00:00 2001 From: daekuk Date: Thu, 5 Feb 2026 10:01:38 +0900 Subject: [PATCH] =?UTF-8?q?-=20=EC=9D=B8=ED=84=B0=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=8A=A4=20=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=A0=80=EC=9E=A5=20=ED=9B=84=20?= =?UTF-8?q?=EB=B3=80=ED=99=98=EC=A0=95=EB=B3=B4=EB=A5=BC=20=ED=95=84?= =?UTF-8?q?=EC=88=98=EB=A1=9C=20=ED=99=95=EC=9D=B8=20=EB=B0=8F=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D?= =?UTF-8?q?=20=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=A0=80=EC=9E=A5=20?= =?UTF-8?q?=ED=9B=84=20=EC=9E=90=EB=8F=99=20=ED=8C=9D=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsp/onl/admin/rule/layoutManDetail.jsp | 12 +++++- .../apim/apiInterfaceManDetail.jsp | 40 +++++++++++++------ 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/WebContent/jsp/onl/admin/rule/layoutManDetail.jsp b/WebContent/jsp/onl/admin/rule/layoutManDetail.jsp index 8bcf3eb..4ab7166 100644 --- a/WebContent/jsp/onl/admin/rule/layoutManDetail.jsp +++ b/WebContent/jsp/onl/admin/rule/layoutManDetail.jsp @@ -375,10 +375,20 @@ url:url, data:postData, success:function(args){ - alert("<%=localeMessage.getString("common.saveMsg")%>"); if(isPop == "true"){ + alert("<%=localeMessage.getString("common.saveMsg")%> \n저장 후 변환정보 수정이 필수입니다. 변환정보를 확인하세요"); + const origin = window.location.origin; + + const layoutName = $("input[name='loutName']").val(); + + parent.postMessage({ + action: 'LAYOUT_SAVED_OPEN_TRANSFORM', + layoutPartName: '${param.layoutPartName}' + }, origin); + window.close(); } else { + alert("<%=localeMessage.getString("common.saveMsg")%>"); goNav(returnUrl); } }, diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 4072679..7450ced 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -1153,27 +1153,41 @@ addLayoutBtnEvent('outboundErrResponse', '아웃바운드 오류', 'TGTE'); window.addEventListener('message', function(e) { + if (e.origin !== window.location.origin) return; + const popupMessage = e.data; - if('DELETE' == popupMessage.cmd){ - if('layout' == popupMessage.type){ - $('#'+popupMessage.layoutPartName).val(''); + if (!popupMessage) return; + + if ('DELETE' == popupMessage.cmd) { + if ('layout' == popupMessage.type) { + $('#' + popupMessage.layoutPartName).val(''); } - if('transform' == popupMessage.type){ + if ('transform' == popupMessage.type) { const partName = popupMessage.transformName.endsWith('REQ') ? '#requestTransform' : '#responseTransform'; $(partName).val(''); } transformSetStateChange(); + return; } - }); - $('#requestTransformButton').on("click", function(event) { - modifyTransform('request'); - }); - $('#responseTransformButton').on("click", function(event) { - modifyTransform('response'); - }); - $('#errResponseTransformButton').on("click", function(event) { - modifyTransform('errResponse'); + // 레이아웃 저장 후 변환 팝업 자동 실행 로직 + if (popupMessage.action === 'LAYOUT_SAVED_OPEN_TRANSFORM') { + + // 혹시 모를 popup창 닫기 + if ($('.ui-dialog-content').length > 0) { + $('.ui-dialog-content').dialog('close'); + } + + const part = popupMessage.layoutPartName || ""; + + if (part.includes('Request')) { + modifyTransform('request'); + } else if (part.includes('Response')) { + modifyTransform('response'); + } else if (part.includes('ErrResponse')) { + modifyTransform('errResponse'); + } + } }); // modifyLayout('inboundRequestLayout', '인바운드 요청', 'CBSS')