주소검색 창이 다이얼로그 창으로 표시되도록 수정함.

main
이범준 8 months ago
parent c92c08c87a
commit c780578ace

@ -304,19 +304,21 @@
} }
// 주소 검색 // 주소 검색
$P.fnSearchAddr = (title) => { $P.fnSearchAddr = async(title) => {
let popupWidth = 900;
let popupHeight = 700; var resp = await fetch(wctx.url("/resources/html/searchAddr.html"));
let popupX = (window.screen.width / 2) - (popupWidth / 2); var template = await resp.text();
let popupY = (window.screen.height / 2) - (popupHeight / 2);
dialog.open({
window.open( id : "searchAddrDialog",
encodeURI(wctx.url("/resources/html/searchAddr.html" title: title,
+ "?openerPageName=${pageName}" size : "lg",
)) content: template,
, "searchAddr" init : () => {
, 'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY $("#searchAddrCallback").val("pageObject['${pageName}'].callbackSearchAddr");
); }
});
} }
// 첨부파일 조회 // 첨부파일 조회

@ -317,21 +317,20 @@
} }
// 우편번호 검색 // 우편번호 검색
fnZip${pageName} = () => { fnZip${pageName} = async() => {
var callbackFuncName = "fnZipReturn${pageName}"; var resp = await fetch(wctx.url("/resources/html/searchAddr.html"));
var template = await resp.text();
var popupWidth = 900;
var popupHeight = 700; dialog.open({
id : "searchAddrDialog",
var popupX = (window.screen.width / 2) - (popupWidth / 2); title: "주소검색",
var popupY= (window.screen.height / 2) - (popupHeight / 2); size : "lg",
content: template,
window.open( init : () => {
wctx.url("/resources/html/searchAddr.html"+"?callbackFuncName="+callbackFuncName) $("#searchAddrCallback").val("fnZipReturn${pageName}");
,"searchAddr" }
,'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY });
);
} }
// 우편번호 검색 결과 // 우편번호 검색 결과
fnZipReturn${pageName} = (obj) => { fnZipReturn${pageName} = (obj) => {

@ -1,37 +1,3 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/resources/image/favicon.ico" />
<!-- Fonts -->
<link rel="stylesheet" href="/resources/font/publicsans/fontface.css" />
<!-- Icons. Uncomment required icon fonts -->
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/boxicons.css" />
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/fontawesome.css" />
<link rel="stylesheet" href="/resources/3rd-party/sneat/fonts/flag-icons.css" />
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-icon.css" />
<!-- Core CSS -->
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-core.css" />
<link rel="stylesheet" href="/resources/3rd-party/sneat/css/theme-default.css" />
<link rel="stylesheet" href="/resources/3rd-party/sneat/css/docs.css" />
<link rel="stylesheet" href="/resources/css/fims/framework/common/xit-core-extend.css" />
<!-- Vendors CSS -->
<link rel="stylesheet" href="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.css" />
<link rel="stylesheet" href="/resources/css/styles.css" />
<link rel="stylesheet" href="/resources/css/fims/framework/common/common.css"/>
<link rel="stylesheet" href="/resources/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.css" />
<title>주소검색</title>
</head>
<body>
<div class="card m-4 p-3"> <div class="card m-4 p-3">
<form name="form" id="form" method="post"> <form name="form" id="form" method="post">
<input type="hidden" name="resultType" value="json" /> <!-- 요청 변수 설정 (검색결과형식 설정, json) --> <input type="hidden" name="resultType" value="json" /> <!-- 요청 변수 설정 (검색결과형식 설정, json) -->
@ -40,6 +6,7 @@
<input type="hidden" id="currentPage" name="currentPage" value="1"/> <!-- 요청 변수 설정 (현재 페이지. currentPage : n > 0) --> <input type="hidden" id="currentPage" name="currentPage" value="1"/> <!-- 요청 변수 설정 (현재 페이지. currentPage : n > 0) -->
<div class="container-search"> <div class="container-search">
<input type="hidden" id="searchAddrCallback" />
<div class="row g-1"> <div class="row g-1">
<div class="col-12 d-flex justify-content-center"> <div class="col-12 d-flex justify-content-center">
<input type="text" id="dummy" value="" hidden /> <input type="text" id="dummy" value="" hidden />
@ -110,26 +77,7 @@
</div> </div>
<!-- Core JS -->
<script src="/resources/3rd-party/sneat/js/helpers.js"></script>
<script src="/resources/3rd-party/sneat/js/config.js"></script>
<script src="/resources/3rd-party/sneat/libs/popper/popper.js"></script>
<script src="/resources/3rd-party/sneat/js/bootstrap.js"></script>
<script src="/resources/3rd-party/sneat/libs/jquery/jquery.js" ></script>
<script src="/resources/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
<script src="/resources/3rd-party/sneat/js/menu.js"></script>
<!-- base -->
<script src="/resources/js/base/base.js"></script>
<script src="/resources/js/base/dataset.js"></script>
<script src="/resources/js/base/base-fims.js"></script>
<script src="/resources/js/fims/framework/cmm/componentization.js"></script>
<script language="javascript"> <script language="javascript">
//var callbackFuncName = location.search.split("=")[1];
var openerPageName = location.search.split("=")[1];
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
@ -281,16 +229,25 @@ function fnReturn(){
addrObj.SNO = addrObj.lnbrSlno; addrObj.SNO = addrObj.lnbrSlno;
addrObj.DONG_CD = ""; addrObj.DONG_CD = "";
var callbackFuncName = $("#searchAddrCallback").val();
if(callbackFuncName.startsWith("pageObject")){
var i1 = callbackFuncName.indexOf("[");
var i2 = callbackFuncName.indexOf("]");
var page = callbackFuncName.substring(i1+2,i2-1);
var func = callbackFuncName.substring(i2+2);
pageObject[page][func](addrObj);
} else {
window[callbackFuncName](addrObj);
}
// window.opener[callbackFuncName](addrObj); dialog.close("searchAddrDialog");
window.opener.pageObject[openerPageName].callbackSearchAddr(addrObj);
window.close();
} }
fnMakeResizableTable($("#table-responsive")[0]); fnMakeResizableTable($("#table-responsive")[0]);
$("#list").hide(); $("#list").hide();
</script> </script>
</body>
</html>

Loading…
Cancel
Save