- 인터페이스 화면에서 레이아웃 저장 후 변환정보를 필수로 확인 및 저장 할 수 있도록 레이아웃 저장 후 자동 팝업

This commit is contained in:
daekuk
2026-02-05 10:01:38 +09:00
parent 0d31134972
commit f42af436d3
2 changed files with 38 additions and 14 deletions
@@ -375,10 +375,20 @@
url:url, url:url,
data:postData, data:postData,
success:function(args){ success:function(args){
alert("<%=localeMessage.getString("common.saveMsg")%>");
if(isPop == "true"){ 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(); window.close();
} else { } else {
alert("<%=localeMessage.getString("common.saveMsg")%>");
goNav(returnUrl); goNav(returnUrl);
} }
}, },
@@ -1153,7 +1153,11 @@
addLayoutBtnEvent('outboundErrResponse', '아웃바운드 오류', 'TGTE'); addLayoutBtnEvent('outboundErrResponse', '아웃바운드 오류', 'TGTE');
window.addEventListener('message', function(e) { window.addEventListener('message', function(e) {
if (e.origin !== window.location.origin) return;
const popupMessage = e.data; const popupMessage = e.data;
if (!popupMessage) return;
if ('DELETE' == popupMessage.cmd) { if ('DELETE' == popupMessage.cmd) {
if ('layout' == popupMessage.type) { if ('layout' == popupMessage.type) {
$('#' + popupMessage.layoutPartName).val(''); $('#' + popupMessage.layoutPartName).val('');
@@ -1163,17 +1167,27 @@
$(partName).val(''); $(partName).val('');
} }
transformSetStateChange(); transformSetStateChange();
return;
} }
});
$('#requestTransformButton').on("click", function(event) { // 레이아웃 저장 후 변환 팝업 자동 실행 로직
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'); modifyTransform('request');
}); } else if (part.includes('Response')) {
$('#responseTransformButton').on("click", function(event) {
modifyTransform('response'); modifyTransform('response');
}); } else if (part.includes('ErrResponse')) {
$('#errResponseTransformButton').on("click", function(event) {
modifyTransform('errResponse'); modifyTransform('errResponse');
}
}
}); });
// modifyLayout('inboundRequestLayout', '인바운드 요청', 'CBSS') // modifyLayout('inboundRequestLayout', '인바운드 요청', 'CBSS')