feat : 모달 팝업 오픈 함수 추가

main
이범준 2 years ago
parent 1f940663f3
commit 775f5767be

@ -646,8 +646,15 @@ Date Author Description
// }); // });
$("#btnClose").on('click', () => { $("#btnClose").on('click', () => {
window.opener?.callbackSearch(); window.opener?.callbackSearch();
window.close()
if ( self !== top ) {
parent.$("#cmmModal").find(".btn-close").trigger("click");
} else {
window.close();
}
}); });
$('#addrSearch').on('click', () => CmmPopup.zipPopup()); $('#addrSearch').on('click', () => CmmPopup.zipPopup());
@ -724,7 +731,8 @@ Date Author Description
regltId: '${param.regltId}' regltId: '${param.regltId}'
,regltSeCode: '${param.regltSeCode}' ,regltSeCode: '${param.regltSeCode}'
,regltProcessSttusCode: '${param.regltProcessSttusCode}' ,regltProcessSttusCode: '${param.regltProcessSttusCode}'
}) });
}); });
</script> </script>

@ -263,7 +263,7 @@ Date Author Description
default: default:
break; break;
} }
popup = CmmPopup.open(url, params, popOption, popTitle); popup = CmmPopup.openModal(url, params, popOption, popTitle);
} }
,onClickGrid: function(props){ ,onClickGrid: function(props){
const selColumn = props.columnInfo.name; const selColumn = props.columnInfo.name;
@ -274,7 +274,11 @@ Date Author Description
return {regltSeCode: d.regltSeCode, regltId: d.regltId, regltProcessSttusCode: d.regltProcessSttusCode} return {regltSeCode: d.regltSeCode, regltId: d.regltId, regltProcessSttusCode: d.regltProcessSttusCode}
}) })
ARR_NAV[CUR_TAB_IDX] = new PageNavigation(ARR_GRID[CUR_TAB_IDX], rowDatas, props.rowKey); ARR_NAV[CUR_TAB_IDX] = new PageNavigation(ARR_GRID[CUR_TAB_IDX], rowDatas, props.rowKey);
fnBiz.pagePopup(popupDiv, ARR_NAV[CUR_TAB_IDX].gridInfo.curRowData); fnBiz.pagePopup(popupDiv, ARR_NAV[CUR_TAB_IDX].gridInfo.curRowData);
$(".tooltip").remove();
break; break;
default: default:

@ -411,3 +411,36 @@
.bg-title-cleanparking { .bg-title-cleanparking {
background-color: #EEC575 !important; background-color: #EEC575 !important;
} }
/* 다이얼로그 창 넓이 */
.w-dialog-px-500 {
--bs-modal-width : 500px;
}
.w-dialog-px-600 {
--bs-modal-width : 600px;
}
.w-dialog-px-700 {
--bs-modal-width : 700px;
}
.w-dialog-px-800 {
--bs-modal-width : 800px;
}
.w-dialog-px-900 {
--bs-modal-width : 900px;
}
.w-dialog-px-1000 {
--bs-modal-width : 1000px;
}
.w-dialog-px-1100 {
--bs-modal-width : 1100px;
}
.w-dialog-px-1200 {
--bs-modal-width : 1200px;
}

@ -292,6 +292,66 @@ const CmmPopup = {
return popup; return popup;
} }
, openModal: function (url, params, options, title = 'nonamePopup', method = 'post') {
if($("#popupShowBtn").length < 1){
let modalTemplate = `<button type="button"
id="popupShowBtn"
data-bs-toggle="modal"
data-bs-target="#cmmModal"
hidden>
</button>
<div class="modal fade" id="cmmModal" tabindex="-1">
<div id="modalDialog" class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
</button>
</div>
<div id="modalBody" class="modal-body">
</div>
</div>
</div>
</div>`;
$("body").append(modalTemplate);
}
$("#modalDialog").attr("class","modal-dialog");
if(options.width) {
$("#modalDialog").addClass("w-dialog-px-"+options.width);
}
if($("#modalIframe").length > 0){
$("#modalIframe").remove();
}
let modalIframe = $("<iframe></iframe>");
modalIframe.attr("id" , "modalIframe")
.attr("name" , "modalIframe")
.attr("src" , "")
.attr("title" , title)
.attr("width" , "100%")
.attr("frameborder" , "0")
.attr("scrolling" , "no")
.css("border" , "0")
.css("overflow" , "auto")
.css("overflow-x" , "no")
;
$("#modalBody").append(modalIframe);
popup = CmmPopup.open(url, params, options, "modalIframe", method);
$(popup.frameElement).on("load", function(){
let popupHeight = $(popup.frameElement.contentDocument.getElementById("wrap")).height();
$(popup.frameElement).attr("height", popupHeight);
});
$("#popupShowBtn").trigger("click");
return popup;
}
/** /**
* <pre> * <pre>
* 주소 검색 팝업 호출 * 주소 검색 팝업 호출

Loading…
Cancel
Save