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

main
이범준 8 months ago
parent c92c08c87a
commit c780578ace

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

@ -317,21 +317,20 @@
}
// 우편번호 검색
fnZip${pageName} = () => {
var callbackFuncName = "fnZipReturn${pageName}";
var popupWidth = 900;
var popupHeight = 700;
var popupX = (window.screen.width / 2) - (popupWidth / 2);
var popupY= (window.screen.height / 2) - (popupHeight / 2);
window.open(
wctx.url("/resources/html/searchAddr.html"+"?callbackFuncName="+callbackFuncName)
,"searchAddr"
,'status=no, height=' + popupHeight + ', width=' + popupWidth + ', left='+ popupX + ', top='+ popupY
);
fnZip${pageName} = async() => {
var resp = await fetch(wctx.url("/resources/html/searchAddr.html"));
var template = await resp.text();
dialog.open({
id : "searchAddrDialog",
title: "주소검색",
size : "lg",
content: template,
init : () => {
$("#searchAddrCallback").val("fnZipReturn${pageName}");
}
});
}
// 우편번호 검색 결과
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">
<form name="form" id="form" method="post">
<input type="hidden" name="resultType" value="json" /> <!-- 요청 변수 설정 (검색결과형식 설정, json) -->
@ -40,6 +6,7 @@
<input type="hidden" id="currentPage" name="currentPage" value="1"/> <!-- 요청 변수 설정 (현재 페이지. currentPage : n > 0) -->
<div class="container-search">
<input type="hidden" id="searchAddrCallback" />
<div class="row g-1">
<div class="col-12 d-flex justify-content-center">
<input type="text" id="dummy" value="" hidden />
@ -110,26 +77,7 @@
</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">
//var callbackFuncName = location.search.split("=")[1];
var openerPageName = location.search.split("=")[1];
/**************************************************************************
* DatasetControl
@ -281,16 +229,25 @@ function fnReturn(){
addrObj.SNO = addrObj.lnbrSlno;
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);
window.opener.pageObject[openerPageName].callbackSearchAddr(addrObj);
window.close();
dialog.close("searchAddrDialog");
}
fnMakeResizableTable($("#table-responsive")[0]);
$("#list").hide();
</script>
</body>
</html>

Loading…
Cancel
Save