no message
parent
aab4008098
commit
5c95e350ca
@ -1,130 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>주소 검색</title>
|
||||
<%
|
||||
/**
|
||||
* @파일명 : AdresSearch.jsp
|
||||
* @파일정보 : 주소 검색 팝업화면
|
||||
* @수정이력
|
||||
* @수정자 수정일 수정내용
|
||||
* @------- ------------ ----------------
|
||||
* @박민규 2020.10.05. 최초생성
|
||||
* @---------------------------------------
|
||||
* @author (주)엑스아이티 개발팀
|
||||
* @since 2020. 2. 2.
|
||||
* @version 1.0 Copyright(c) XIT All rights reserved.
|
||||
*/
|
||||
%>
|
||||
<%
|
||||
/**
|
||||
* Encoding Set
|
||||
* -시스템의 인코딩 설정에 따라 주석 해제 후 사용
|
||||
*/
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
//request.setCharacterEncoding("EUC-KR");
|
||||
|
||||
|
||||
String inputYn = request.getParameter("inputYn");
|
||||
String addrDetail = request.getParameter("addrDetail"); //사용자가 입력한 상세주소
|
||||
|
||||
String roadFullAddr = request.getParameter("roadFullAddr"); //전체 도로명 주소(도로명주소 + 사용자 입력주소 + 도로명주소 참고항목)
|
||||
String roadAddr = request.getParameter("roadAddr"); //전체 도로명 주소. 예시-> 서울특별시 마포구 성암로 301 (상암동)
|
||||
String roadAddrPart1 = request.getParameter("roadAddrPart1"); //도로명주소(참고항목 제외). 예시-> 서울특별시 마포구 성암로 301
|
||||
String roadAddrPart2 = request.getParameter("roadAddrPart2"); //도로명주소 참고항목. 예시-> (상암동)
|
||||
String jibunAddr = request.getParameter("jibunAddr"); //지번주소. 예시-> 서울특별시 마포구 상암동 1595 한국지역정보개발원(KLID Tower)
|
||||
String engAddr = request.getParameter("engAddr"); //영문주소. 예시-> 301, Seongam-ro, Mapo-gu, Seoul
|
||||
String zipNo = request.getParameter("zipNo"); //우편번호. 예시-> 03923
|
||||
String admCd = request.getParameter("admCd"); //행정구역코드. 예시-> 1144012700
|
||||
String rnMgtSn = request.getParameter("rnMgtSn"); //도로명코드. 예시-> 14403113012
|
||||
String bdMgtSn = request.getParameter("bdMgtSn"); //건물관리번호. 예시-> 1144012700115950000000001
|
||||
String detBdNmList = request.getParameter("detBdNmList"); //상세건물명. 예시->
|
||||
String bdNm = request.getParameter("bdNm"); //건물명. 예시-> 한국지역정보개발원(KLID Tower)
|
||||
String bdKdcd = request.getParameter("bdKdcd"); //공동주택여부. 예시-> 0
|
||||
String siNm = request.getParameter("siNm"); //시도명. 예시-> 서울특별시
|
||||
String sggNm = request.getParameter("sggNm"); //시군구명. 예시-> 마포구
|
||||
String emdNm = request.getParameter("emdNm"); //읍면동명. 예시-> 상암동
|
||||
String liNm = request.getParameter("liNm"); //법정리명. 예시->
|
||||
String rn = request.getParameter("rn"); //도로명. 예시->
|
||||
String udrtYn = request.getParameter("udrtYn"); //지하여부(0:지상,1:지하). 예시-> 0
|
||||
String buldMnnm = request.getParameter("buldMnnm"); //건물본번. 예시-> 301
|
||||
String buldSlno = request.getParameter("buldSlno"); //건물부번(부번이 없는 경우 0). 예시-> 0
|
||||
String mtYn = request.getParameter("mtYn"); //산여부(0:대지,1:산). 예시-> 0
|
||||
String lnbrMnnm = request.getParameter("lnbrMnnm"); //지번본번(번지). 예시-> 1595
|
||||
String lnbrSlno = request.getParameter("lnbrSlno"); //지번부번(호)(부번이 없는 경우 0).예시-> 0
|
||||
String emdNo = request.getParameter("emdNo"); //읍변동일련번호. 예시-> 03
|
||||
|
||||
%>
|
||||
</head>
|
||||
<script type="text/javaScript">
|
||||
function init(){
|
||||
var url = location.href;
|
||||
var confmKey = " U01TX0FVVEgyMDE3MDQyMTE3MTQ1MjIwNzQ4";
|
||||
var inputYn= "<%= inputYn%>";
|
||||
if(inputYn != "Y"){
|
||||
document.form.confmKey.value = confmKey;
|
||||
document.form.returnUrl.value = url;
|
||||
document.form.action="http://www.juso.go.kr/addrlink/addrLinkUrl.do"; //인터넷망
|
||||
document.form.submit();
|
||||
}else{
|
||||
var obj = new Object();
|
||||
|
||||
|
||||
obj.inputYn = "<%= inputYn %>";
|
||||
obj.addrDetail = "<%= addrDetail %>";
|
||||
|
||||
obj.roadFullAddr = "<%= roadFullAddr %>";
|
||||
obj.roadAddr = "<%= roadAddr %>";
|
||||
obj.roadAddrPart1 = "<%= roadAddrPart1 %>";
|
||||
obj.roadAddrPart2 = "<%= roadAddrPart2 %>";
|
||||
obj.jibunAddr = "<%= jibunAddr %>";
|
||||
obj.engAddr = "<%= engAddr %>";
|
||||
obj.zipNo = "<%= zipNo %>";
|
||||
obj.admCd = "<%= admCd %>";
|
||||
obj.rnMgtSn = "<%= rnMgtSn %>";
|
||||
obj.bdMgtSn = "<%= bdMgtSn %>";
|
||||
obj.detBdNmList = "<%= detBdNmList %>";
|
||||
obj.bdNm = "<%= bdNm %>";
|
||||
obj.bdKdcd = "<%= bdKdcd %>";
|
||||
obj.siNm = "<%= siNm %>";
|
||||
obj.sggNm = "<%= sggNm %>";
|
||||
obj.emdNm = "<%= emdNm %>";
|
||||
obj.liNm = "<%= liNm %>";
|
||||
obj.rn = "<%= rn %>";
|
||||
obj.udrtYn = "<%= udrtYn %>";
|
||||
obj.buldMnnm = "<%= buldMnnm %>";
|
||||
obj.buldSlno = "<%= buldSlno %>";
|
||||
obj.mtYn = "<%= mtYn %>";
|
||||
obj.lnbrMnnm = "<%= lnbrMnnm %>";
|
||||
obj.lnbrSlno = "<%= lnbrSlno %>";
|
||||
obj.emdNo = "<%= emdNo %>";
|
||||
|
||||
|
||||
var callback = '${param.callback}';
|
||||
if(callback==''||callback==null||callback==undefined)
|
||||
opener.jusoCallBack(obj);
|
||||
else{
|
||||
callback = 'opener.'+callback+'(obj)';
|
||||
eval(callback);
|
||||
}
|
||||
|
||||
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<body onload="init();">
|
||||
<form id="form" name="form" method="post">
|
||||
<input type="hidden" id="confmKey" name="confmKey" value=" U01TX0FVVEgyMDE3MDQyMTE3MTQ1MjIwNzQ4" />
|
||||
<input type="hidden" id="returnUrl" name="returnUrl" value="" />
|
||||
<!-- 해당시스템의 인코딩타입이 EUC-KR일경우에만 추가 START-->
|
||||
<!--
|
||||
<input type="hidden" id="encodingType" name="encodingType" value="EUC-KR"/>
|
||||
-->
|
||||
<!-- 해당시스템의 인코딩타입이 EUC-KR일경우에만 추가 END-->
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,730 +0,0 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<%
|
||||
request.setCharacterEncoding("UTF-8"); // 한글깨지면 주석제거
|
||||
|
||||
String confmKey = "U01TX0FVVEgyMDIxMDYyMjE1MTIyMTExMTMxMDU="; // 검색API 승인키
|
||||
String domain = "http://www.juso.go.kr"; // 인터넷망
|
||||
// ※ 행정망 내에서 운영되는 시스템도 이용 가능합니다. 행정망 서비스를 위한 API 요청URL은 별도로 문의 주시기 바랍니다.(1588-0061)
|
||||
String resultType = "4"; // 검색결과 화면 출력유(1 : 도로명, 2 : 도로명+지번, 3 : 도로명+상세건물명, 4 : 도로명+지번+상세건물명)
|
||||
%>
|
||||
<script src="${ctx}/resources/3rd-party/sneat/libs/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="${ctx}/resources/3rd-party/juso/js/addrlink.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="${ctx}/resources/3rd-party/juso/css/addrlink.css"></link>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>주소정보연계 | 도로명주소 안내시스템</title>
|
||||
<script type="text/javaScript">
|
||||
//특수문자, 특정문자열(sql예약어) 제거
|
||||
function checkSearchedWord(obj){
|
||||
obj.value = obj.value+" ";
|
||||
//특수문자 제거
|
||||
if(obj.value.length >0){
|
||||
var expText = /[%=><]/ ;
|
||||
if(expText.test(obj.value) == true){
|
||||
obj.value = obj.value.split(expText).join("");
|
||||
}
|
||||
//체크 문자열
|
||||
var sqlArray = new Array( //sql 예약어
|
||||
"OR", "SELECT", "INSERT", "DELETE", "UPDATE", "CREATE", "DROP", "EXEC", "UNION", "FETCH", "DECLARE", "TRUNCATE"
|
||||
);
|
||||
|
||||
var regex;
|
||||
var regex_plus ;
|
||||
for(var i=0; i<sqlArray.length; i++){
|
||||
regex = new RegExp("\\s" + sqlArray[i] + "\\s","gi") ;
|
||||
if (regex.test(obj.value)) {
|
||||
obj.value =obj.value.replace(regex, "");
|
||||
alert("\"" + sqlArray[i]+"\"와(과) 같은 특정문자로 검색할 수 없습니다.");
|
||||
}
|
||||
regex_plus = new RegExp( "\\+" + sqlArray[i] + "\\+","gi") ;
|
||||
if (regex_plus.test(obj.value)) {
|
||||
obj.value =obj.value.replace(regex_plus, "");
|
||||
alert("\"" + sqlArray[i]+"\"와(과) 같은 특정문자로 검색할 수 없습니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
return obj.value = obj.value;
|
||||
}
|
||||
|
||||
function searchUrlJuso(){
|
||||
$("#resultData").hide();
|
||||
var frm = document.AKCFrm;
|
||||
frm.keyword.value = checkSearchedWord(frm.keyword); // 특수문자 및 sql예약어 제거, 20160912
|
||||
$("#keyword").val(validateJuso($("#keyword").val())); //공백 및 특수문자 제거
|
||||
$("#keyword").val(regExpCheckJuso($("#keyword").val()));
|
||||
|
||||
$.ajax({
|
||||
url :"<%=domain %>/addrlink/addrLinkApiJsonp.do" //인터넷망
|
||||
,type:"post"
|
||||
,data:$("#AKCFrm").serialize()
|
||||
,dataType:"jsonp"
|
||||
,crossDomain:true
|
||||
,success:function(xmlStr){
|
||||
if(navigator.appName.indexOf("Microsoft") > -1){
|
||||
var xmlData = new ActiveXObject("Microsoft.XMLDOM");
|
||||
xmlData.loadXML(xmlStr.returnXml)
|
||||
}else{
|
||||
var xmlData = xmlStr.returnXml;
|
||||
}
|
||||
$(".popSearchNoResult").html("");
|
||||
var errCode = $(xmlData).find("errorCode").text();
|
||||
var errDesc = $(xmlData).find("errorMessage").text();
|
||||
|
||||
var totalCount = $(xmlData).find("totalCount").text();
|
||||
var currentPage = $(xmlData).find("currentPage").text();
|
||||
|
||||
if( parseInt(totalCount) > 1000 && currentPage == "1" )
|
||||
alert("검색 결과가 너무 많습니다(1,000건 이상)\n검색어 예를 참조하여 검색하시기 바랍니다.");
|
||||
|
||||
if(errCode != "0"){
|
||||
alert(errDesc);
|
||||
}else{
|
||||
if(xmlStr != null){
|
||||
makeList(xmlData);
|
||||
}
|
||||
}
|
||||
}
|
||||
,error: function(xhr,status, error){
|
||||
//alert("에러발생");
|
||||
alert("검색에 실패하였습니다 \n 다시 검색하시기 바랍니다.");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function makeList(xmlStr){
|
||||
|
||||
var htmlStr = "";
|
||||
if( $(xmlStr).find("totalCount").text() == "0" ){
|
||||
|
||||
htmlStr +=' ';
|
||||
htmlStr += '<div class="popSearchNoResult" style="margin-top:10px; margin-bottom:5px;">';
|
||||
htmlStr += ' 검색된 내용이 없습니다.';
|
||||
htmlStr += '</div>';
|
||||
htmlStr +='';
|
||||
|
||||
}else{
|
||||
|
||||
htmlStr += '<p class="text-guide">도로명주소 검색 결과 <strong>('+ $(xmlStr).find("totalCount").text()+'건)</strong></p>';
|
||||
htmlStr += '<table class="data-col" style="margin-top:3px;">';
|
||||
htmlStr += ' <caption>검색 결과</caption>';
|
||||
htmlStr += ' <colgroup>';
|
||||
htmlStr += ' <col style="width:8%">';
|
||||
htmlStr += ' <col>';
|
||||
htmlStr += ' <col style="width:11%">';
|
||||
htmlStr += ' <col style="width:14%">';
|
||||
htmlStr += ' </colgroup>';
|
||||
htmlStr += ' <thead>';
|
||||
htmlStr += ' <tr>';
|
||||
htmlStr += ' <th scope="col">No</th>';
|
||||
htmlStr += ' <th scope="col">도로명주소</th>';
|
||||
htmlStr += ' <th scope="col"> </th>';
|
||||
htmlStr += ' <th scope="col">우편번호</th>';
|
||||
htmlStr += ' </tr>';
|
||||
htmlStr += ' </thead>';
|
||||
htmlStr += ' <tbody>';
|
||||
|
||||
var currentPage = parseInt($(xmlStr).find("currentPage").text());
|
||||
var countPerPage = parseInt($(xmlStr).find("countPerPage").text());
|
||||
var listNum = (currentPage*countPerPage)-(--countPerPage);
|
||||
var num = 0;
|
||||
$(xmlStr).find("juso").each(function(){
|
||||
num++;
|
||||
|
||||
var resultType = "<%= resultType%>";
|
||||
|
||||
htmlStr += '<tr>';
|
||||
htmlStr +=' <td class="subj" style="text-align:center;">'+(listNum++)+'</td>';
|
||||
|
||||
if( resultType == "1" ){
|
||||
|
||||
htmlStr += ' <td class="subj" colspan="2" id="roadAddrTd'+num+' style="text-align:left; padding-left: 5px; line-height: 0.5em;">';
|
||||
htmlStr += ' <a href="javascript:setMaping(\''+num+'\')">';
|
||||
htmlStr += ' <div tabindex="6">';
|
||||
htmlStr += ' <div id="roadAddrDiv'+num+'"><b>'+$(this).find('roadAddr').text()+'</b></div>';
|
||||
htmlStr += ' </div>';
|
||||
htmlStr += ' </a>';
|
||||
htmlStr += ' <span id="jibunAddrDiv'+num+'" style="display:none;">'+$(this).find('jibunAddr').text()+'</span>';
|
||||
htmlStr +=' <div id="roadAddrPart1Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart1').text()+'</div>';
|
||||
htmlStr +=' <div id="roadAddrPart2Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart2').text()+'</div>';
|
||||
htmlStr +=' <div id="engAddrDiv'+num+'" style="display:none;">'+$(this).find('engAddr').text()+'</div>';
|
||||
htmlStr += ' </td>';
|
||||
|
||||
}else if( resultType == "2" ){
|
||||
|
||||
htmlStr += ' <td class="subj" colspan="2" id="roadAddrTd'+num+' style="text-align:left; padding-left: 5px; line-height: 0.5em;">';
|
||||
htmlStr += ' <a href="javascript:setMaping(\''+num+'\')">';
|
||||
htmlStr += ' <div tabindex="6">';
|
||||
htmlStr += ' <div id="roadAddrDiv'+num+'"><b>'+$(this).find('roadAddr').text()+'</b></div>';
|
||||
htmlStr +=' <span style="font-size:11px;">[지번] <span id="jibunAddrDiv'+num+'">'+$(this).find('jibunAddr').text()+'</span></span>';
|
||||
htmlStr += ' </div>';
|
||||
htmlStr += ' </a>';
|
||||
htmlStr +=' <div id="roadAddrPart1Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart1').text()+'</div>';
|
||||
htmlStr +=' <div id="roadAddrPart2Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart2').text()+'</div>';
|
||||
htmlStr +=' <div id="engAddrDiv'+num+'" style="display:none;">'+$(this).find('engAddr').text()+'</div>';
|
||||
htmlStr += ' </td>';
|
||||
|
||||
}else if( resultType == "3" ){
|
||||
|
||||
htmlStr +=' <td class="subj" id="roadAddrTd'+num+' style="text-align:left; padding-left: 5px; line-height: 0.5em;">';
|
||||
htmlStr +=' <a href="javascript:setMaping(\''+num+'\')">';
|
||||
htmlStr +=' <div tabindex="6">';
|
||||
htmlStr +=' <div id="roadAddrDiv'+num+'"><b>'+$(this).find('roadAddr').text()+'</b></div>';
|
||||
htmlStr +=' </div>';
|
||||
htmlStr +=' </a>';
|
||||
htmlStr +=' <div id="detListDivX'+num+'" style="display:none;"><span style="font-size:11px;"> [상세건물명]'+$(this).find('detBdNmList').text()+' </span></div>';
|
||||
htmlStr += ' <span id="jibunAddrDiv'+num+'" style="display:none;">'+$(this).find('jibunAddr').text()+'</span>';
|
||||
htmlStr +=' <div id="roadAddrPart1Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart1').text()+'</div>';
|
||||
htmlStr +=' <div id="roadAddrPart2Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart2').text()+'</div>';
|
||||
htmlStr +=' <div id="engAddrDiv'+num+'" style="display:none;">'+$(this).find('engAddr').text()+'</div>';
|
||||
htmlStr +=' </td>';
|
||||
htmlStr +=' <td class="subj" style="text-align:center;">';
|
||||
htmlStr +=' <div id="detDiv'+num+'" style="font-size:12px;">';
|
||||
if($(this).find('detBdNmList').text() != ""){
|
||||
htmlStr +='<a href="javascript:addrJuminRenew('+num+');">상세건물</br>보기</a>';
|
||||
}
|
||||
htmlStr +=' </div>';
|
||||
htmlStr +=' <div id="detDivX'+num+'" style="display:none;"><a href="javascript:addrJuminRenewX('+num+');">닫기</a></div>';
|
||||
htmlStr +=' </td>';
|
||||
|
||||
}else{
|
||||
|
||||
htmlStr +=' <td class="subj" id="roadAddrTd'+num+' style="text-align:left; padding-left: 5px; line-height: 0.5em;">';
|
||||
htmlStr +=' <a href="javascript:setMaping(\''+num+'\')">';
|
||||
htmlStr +=' <div tabindex="6">';
|
||||
htmlStr +=' <div id="roadAddrDiv'+num+'"><b>'+$(this).find('roadAddr').text()+'</b></div>';
|
||||
htmlStr +=' <span style="font-size:11px;">[지번] <span id="jibunAddrDiv'+num+'">'+$(this).find('jibunAddr').text()+'</span></span>';
|
||||
htmlStr +=' </div>';
|
||||
htmlStr +=' </a>';
|
||||
htmlStr +=' <div id="detListDivX'+num+'" style="display:none;"><span style="font-size:11px;"> [상세건물명]'+$(this).find('detBdNmList').text()+' </span></div>';
|
||||
htmlStr +=' <div id="roadAddrPart1Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart1').text()+'</div>';
|
||||
htmlStr +=' <div id="roadAddrPart2Div'+num+'" style="display:none;">'+$(this).find('roadAddrPart2').text()+'</div>';
|
||||
htmlStr +=' <div id="engAddrDiv'+num+'" style="display:none;">'+$(this).find('engAddr').text()+'</div>';
|
||||
htmlStr +=' </td>';
|
||||
htmlStr +=' <td class="subj" style="text-align:center;">';
|
||||
htmlStr +=' <div id="detDiv'+num+'" style="font-size:12px;">';
|
||||
if($(this).find('detBdNmList').text() != ""){
|
||||
htmlStr +='<a href="javascript:addrJuminRenew('+num+');">상세건물</br>보기</a>';
|
||||
}
|
||||
htmlStr +=' </div>';
|
||||
htmlStr +=' <div id="detDivX'+num+'" style="display:none;"><a href="javascript:addrJuminRenewX('+num+');">닫기</a></div>';
|
||||
htmlStr +=' </td>';
|
||||
|
||||
}
|
||||
|
||||
htmlStr +=' <td class="subj" style="text-align:center" id="zipNoTd'+num+'"> ';
|
||||
htmlStr +=' <div id="zipNoDiv'+num+'">'+$(this).find('zipNo').text()+'</div>';
|
||||
htmlStr +=' </td>';
|
||||
htmlStr +=' <input type="hidden" id="admCdHid'+num+'" value="'+$(this).find('admCd').text()+'">';
|
||||
htmlStr +=' <input type="hidden" id="rnMgtSnHid'+num+'" value="'+$(this).find('rnMgtSn').text()+'">';
|
||||
htmlStr +=' <input type="hidden" id="bdMgtSnHid'+num+'" value="'+$(this).find('bdMgtSn').text()+'">';
|
||||
htmlStr +=' <input type="hidden" id="detBdNmListHid'+num+'" value="'+$(this).find('detBdNmList').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="bdNmHid'+num+'" value="'+$(this).find('bdNm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="bdKdcdHid'+num+'" value="'+$(this).find('bdKdcd').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="siNmHid'+num+'" value="'+$(this).find('siNm').text()+'">';
|
||||
htmlStr +=' <input type="hidden" id="sggNmHid'+num+'" value="'+$(this).find('sggNm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="emdNmHid'+num+'" value="'+$(this).find('emdNm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="liNmHid'+num+'" value="'+$(this).find('liNm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="rnHid'+num+'" value="'+$(this).find('rn').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="udrtYnHid'+num+'" value="'+$(this).find('udrtYn').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="buldMnnmHid'+num+'" value="'+$(this).find('buldMnnm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="buldSlnoHid'+num+'" value="'+$(this).find('buldSlno').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="mtYnHid'+num+'" value="'+$(this).find('mtYn').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="lnbrMnnmHid'+num+'" value="'+$(this).find('lnbrMnnm').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="lnbrSlnoHid'+num+'" value="'+$(this).find('lnbrSlno').text()+'"> ';
|
||||
htmlStr +=' <input type="hidden" id="emdNoHid'+num+'" value="'+$(this).find('emdNo').text()+'"> ';
|
||||
htmlStr +='</tr> ';
|
||||
});
|
||||
|
||||
htmlStr += ' </tbody>';
|
||||
htmlStr += "</table>";
|
||||
htmlStr += '<div class="paginate" id="pageApi"></div>';
|
||||
}
|
||||
|
||||
$(".popSearchNoResult").addClass("result");
|
||||
$(".popSearchNoResult").html(htmlStr);
|
||||
$(".result").show();
|
||||
$("#resultData").hide();
|
||||
$("#searchContentBox").css("height","");
|
||||
$("#searchContentBox").css("height","365px");
|
||||
pageMake(xmlStr);
|
||||
|
||||
}
|
||||
|
||||
// xml타입 페이지 처리 (주소정보 리스트 makeList(xmlData); 다음에서 호출)
|
||||
function pageMake(xmlStr){
|
||||
var total = $(xmlStr).find("totalCount").text(); // 총건수
|
||||
var pageNum = $(xmlStr).find("currentPage").text();// 현재페이지
|
||||
var paggingStr = "";
|
||||
if(total < 1){
|
||||
}else{
|
||||
var PAGEBLOCK= 10;
|
||||
var pageSize= parseInt( $(xmlStr).find("countPerPage").text() );
|
||||
var totalPages = Math.floor((total-1)/pageSize) + 1;
|
||||
var firstPage = Math.floor((pageNum-1)/PAGEBLOCK) * PAGEBLOCK + 1;
|
||||
if( firstPage <= 0 ) firstPage = 1;
|
||||
var lastPage = firstPage-1 + PAGEBLOCK;
|
||||
if( lastPage > totalPages ) lastPage = totalPages;
|
||||
var nextPage = lastPage+1 ;
|
||||
var prePage = firstPage-5 ;
|
||||
|
||||
if(totalPages > 1){
|
||||
if( firstPage > PAGEBLOCK ){
|
||||
paggingStr += "<a class='skip prev' href='javascript: $(\"#currentPage\").val("+prePage+"); searchUrlJuso();'>이전으로</a> " ;
|
||||
}
|
||||
for( i=firstPage; i<=lastPage; i++ ){
|
||||
if( pageNum == i )
|
||||
paggingStr += "<strong>" + i + "</strong> ";
|
||||
else
|
||||
paggingStr += "<a href='javascript:$(\"#currentPage\").val("+i+"); searchUrlJuso();'>" + i + "</a> ";
|
||||
}
|
||||
if( lastPage < totalPages ){
|
||||
paggingStr += "<a class='skip next' href='javascript: $(\"#currentPage\").val("+nextPage+"); searchUrlJuso();'>다음으로</a>";
|
||||
}
|
||||
}
|
||||
$("#pageApi").html(paggingStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setParent(){
|
||||
var rtRoadAddr = $.trim($("#rtRoadAddr").val());
|
||||
var rtAddrPart1 = $.trim($("#rtAddrPart1").val());
|
||||
var rtAddrPart2 = $.trim($("#rtAddrPart2").val());
|
||||
var rtEngAddr = $.trim($("#rtEngAddr").val());
|
||||
var rtJibunAddr = $.trim($("#rtJibunAddr").val());
|
||||
var rtAddrDetail = $.trim($("#rtAddrDetail").val());
|
||||
var rtZipNo = $.trim($("#rtZipNo").val());
|
||||
var rtAdmCd = $.trim($("#rtAdmCd").val());
|
||||
var rtRnMgtSn = $.trim($("#rtRnMgtSn").val());
|
||||
var rtBdMgtSn = $.trim($("#rtBdMgtSn").val());
|
||||
var rtDetBdNmList = $.trim($("#rtDetBdNmList").val());
|
||||
var rtBdNm = $.trim($("#rtBdNm").val());
|
||||
var rtBdKdcd = $.trim($("#rtBdKdcd").val());
|
||||
var rtSiNm = $.trim($("#rtSiNm").val());
|
||||
var rtSggNm = $.trim($("#rtSggNm").val());
|
||||
var rtEmdNm = $.trim($("#rtEmdNm").val());
|
||||
var rtLiNm = $.trim($("#rtLiNm").val());
|
||||
var rtRn = $.trim($("#rtRn").val());
|
||||
var rtUdrtYn = $.trim($("#rtUdrtYn").val());
|
||||
var rtBuldMnnm = $.trim($("#rtBuldMnnm").val());
|
||||
var rtBuldSlno = $.trim($("#rtBuldSlno").val());
|
||||
var rtMtYn = $.trim($("#rtMtYn").val());
|
||||
var rtLnbrMnnm = $.trim($("#rtLnbrMnnm").val());
|
||||
var rtLnbrSlno = $.trim($("#rtLnbrSlno").val());
|
||||
var rtEmdNo = $.trim($("#rtEmdNo").val());
|
||||
|
||||
var rtRoadFullAddr = rtAddrPart1;
|
||||
if(rtAddrDetail != "" && rtAddrDetail != null){
|
||||
rtRoadFullAddr += ", " + rtAddrDetail;
|
||||
}
|
||||
if(rtAddrPart2 != "" && rtAddrPart2 != null){
|
||||
rtRoadFullAddr += " " + rtAddrPart2;
|
||||
}
|
||||
|
||||
// IE에서 opener관련 오류가 발생하는 경우, 부모창에서 지정한 이름으로 opener를 재정의
|
||||
if(opener == null || opener == undefined) opener = window.open("", "jusoPopup");
|
||||
|
||||
/* ============================
|
||||
* 2021.06.22. 박민규
|
||||
* return 재정의
|
||||
============================ */
|
||||
//2021.06.22. 주석처리
|
||||
// opener.jusoCallBack(rtRoadFullAddr, rtAddrPart1, rtAddrDetail, rtAddrPart2, rtEngAddr, rtJibunAddr, rtZipNo, rtAdmCd, rtRnMgtSn, rtBdMgtSn, rtDetBdNmList, rtBdNm, rtBdKdcd, rtSiNm, rtSggNm, rtEmdNm, rtLiNm, rtRn, rtUdrtYn, rtBuldMnnm, rtBuldSlno, rtMtYn, rtLnbrMnnm, rtLnbrSlno, rtEmdNo);
|
||||
// window.open("about:blank","_self").close();
|
||||
var obj = new Object();
|
||||
obj.addrDetail = rtAddrDetail;
|
||||
obj.roadFullAddr = rtRoadFullAddr;
|
||||
obj.roadAddr = rtRoadAddr;
|
||||
obj.roadAddrPart1 = rtAddrPart1;
|
||||
obj.roadAddrPart2 = rtAddrPart2;
|
||||
obj.jibunAddr = rtJibunAddr;
|
||||
obj.engAddr = rtEngAddr;
|
||||
obj.zipNo = rtZipNo;
|
||||
obj.admCd = rtAdmCd;
|
||||
obj.rnMgtSn = rtRnMgtSn;
|
||||
obj.bdMgtSn = rtBdMgtSn;
|
||||
obj.detBdNmList = rtDetBdNmList;
|
||||
obj.bdNm = rtBdNm;
|
||||
obj.bdKdcd = rtBdKdcd;
|
||||
obj.siNm = rtSiNm;
|
||||
obj.sggNm = rtSggNm;
|
||||
obj.emdNm = rtEmdNm;
|
||||
obj.liNm = rtLiNm;
|
||||
obj.rn = rtRn;
|
||||
obj.udrtYn = rtUdrtYn;
|
||||
obj.buldMnnm = rtBuldMnnm;
|
||||
obj.buldSlno = rtBuldSlno;
|
||||
obj.mtYn = rtMtYn;
|
||||
obj.lnbrMnnm = rtLnbrMnnm;
|
||||
obj.lnbrSlno = rtLnbrSlno;
|
||||
obj.emdNo = rtEmdNo;
|
||||
var callback = '${param.callback}';
|
||||
if(callback==''||callback==null||callback==undefined)
|
||||
opener.jusoCallBack(obj);
|
||||
else{
|
||||
callback = 'opener.'+callback+'(obj)';
|
||||
eval(callback);
|
||||
}
|
||||
window.open("about:blank","_self").close();
|
||||
|
||||
}
|
||||
|
||||
function setMaping(idx){
|
||||
$("#searchContentBox").css("height","365px"); // 로고 위치 지정
|
||||
|
||||
var roadAddr = $("#roadAddrDiv"+idx).text()
|
||||
var addrPart1 = $("#roadAddrPart1Div"+idx).text();
|
||||
var addrPart2 = $("#roadAddrPart2Div"+idx).text();
|
||||
var engAddr = $("#engAddrDiv"+idx).text();
|
||||
var jibunAddr = $("#jibunAddrDiv"+idx).text();
|
||||
var zipNo = $("#zipNoDiv"+idx).text();
|
||||
var admCd = $("#admCdHid"+idx).val();
|
||||
var rnMgtSn = $("#rnMgtSnHid"+idx).val();
|
||||
var bdMgtSn = $("#bdMgtSnHid"+idx).val();
|
||||
var detBdNmList = $("#detBdNmListHid"+idx).val();
|
||||
var bdNm = $("#bdNmHid"+idx).val();
|
||||
var bdKdcd = $("#bdKdcdHid"+idx).val();
|
||||
var siNm = $("#siNmHid"+idx).val();
|
||||
var sggNm = $("#sggNmHid"+idx).val();
|
||||
var emdNm = $("#emdNmHid"+idx).val();
|
||||
var liNm = $("#liNmHid"+idx).val();
|
||||
var rn = $("#rnHid"+idx).val();
|
||||
var udrtYn = $("#udrtYnHid"+idx).val();
|
||||
var buldMnnm = $("#buldMnnmHid"+idx).val();
|
||||
var buldSlno = $("#buldSlnoHid"+idx).val();
|
||||
var mtYn = $("#mtYnHid"+idx).val();
|
||||
var lnbrMnnm = $("#lnbrMnnmHid"+idx).val();
|
||||
var lnbrSlno = $("#lnbrSlnoHid"+idx).val();
|
||||
var emdNo = $("#emdNoHid"+idx).val();
|
||||
|
||||
$("#rtRoadAddr").val(roadAddr);
|
||||
$("#rtAddrPart1").val(addrPart1);
|
||||
$("#rtAddrPart2").val(addrPart2);
|
||||
$("#rtEngAddr").val(engAddr);
|
||||
$("#rtJibunAddr").val(jibunAddr);
|
||||
$("#rtZipNo").val(zipNo);
|
||||
$("#rtAdmCd").val(admCd);
|
||||
$("#rtRnMgtSn").val(rnMgtSn);
|
||||
$("#rtBdMgtSn").val(bdMgtSn);
|
||||
$("#rtDetBdNmList").val(detBdNmList);
|
||||
$("#rtBdNm").val(bdNm);
|
||||
$("#rtBdKdcd").val(bdKdcd);
|
||||
$("#rtSiNm").val(siNm);
|
||||
$("#rtSggNm").val(sggNm);
|
||||
$("#rtEmdNm").val(emdNm);
|
||||
$("#rtLiNm").val(liNm);
|
||||
$("#rtRn").val(rn);
|
||||
$("#rtUdrtYn").val(udrtYn);
|
||||
$("#rtBuldMnnm").val(buldMnnm);
|
||||
$("#rtBuldSlno").val(buldSlno);
|
||||
$("#rtMtYn").val(mtYn);
|
||||
$("#rtLnbrMnnm").val(lnbrMnnm);
|
||||
$("#rtLnbrSlno").val(lnbrSlno);
|
||||
$("#rtEmdNo").val(emdNo);
|
||||
|
||||
$(".result").hide();
|
||||
$("#resultData").show();
|
||||
|
||||
$("#addrPart1").html(addrPart1);
|
||||
$("#addrPart2").html(addrPart2);
|
||||
$("#rtAddrDetail").focus();
|
||||
}
|
||||
|
||||
function init(){
|
||||
var browerName = navigator.appName;
|
||||
var browerAgent = navigator.userAgent;
|
||||
self.resizeTo(570, 520);
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
placeHolder();
|
||||
$('#searchRdNm').on('click', function(){
|
||||
$('.popWrap3').css({'display':'block','top':'21px','right':'121px'});
|
||||
});
|
||||
$('#popupClose2').on('click', function(){
|
||||
$('.popWrap3').css('display','none');
|
||||
});
|
||||
|
||||
$('.choIdx a').click(function(event){
|
||||
$('.choIdx a').removeClass('on');
|
||||
if($(this).hasClass('off')){
|
||||
return;
|
||||
}else{
|
||||
$(this).addClass('on');
|
||||
event.preventDefault();
|
||||
var target =this.hash;
|
||||
var $target=$(target);
|
||||
var top = $(target).position().top-106;
|
||||
if(prevPosition ==0){
|
||||
$('#roadNameList2').scrollTop(top);
|
||||
prevPosition = top;
|
||||
}else{
|
||||
$('#roadNameList2').scrollTop(prevPosition+top);
|
||||
prevPosition = prevPosition + top;
|
||||
}
|
||||
|
||||
if($('#roadNameList2')[0].scrollHeight - $('#roadNameList2').scrollTop() == $('#roadNameList2').innerHeight()){
|
||||
prevPosition = $('#roadNameList2').scrollTop();
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#roadNameList2').children().css('display','none');
|
||||
$('#roadNameList2').scroll(function(){prevPosition = this.scrollTop;});
|
||||
});
|
||||
window.onresize = placeHolderPoint;
|
||||
|
||||
function placeHolderPoint(){
|
||||
$(":input[placeholderTxt]").each(function(){
|
||||
var labelId = "label"+this.id;
|
||||
var objVal = $(this).val();
|
||||
var placeTxt = $(this).attr("placeholderTxt");
|
||||
var left = parseInt($(this).offset().left);
|
||||
var top = parseInt($(this).offset().top);
|
||||
|
||||
$("#"+labelId).css({"left":left+"px","top":top+"px"});
|
||||
});
|
||||
}
|
||||
|
||||
function placeHolder(){
|
||||
$(":input[placeholderTxt]").each(function(){
|
||||
var labelId = "label"+this.id;
|
||||
var objVal = $(this).val();
|
||||
var placeTxt = $(this).attr("placeholderTxt");
|
||||
var left = parseInt($(this).offset().left);
|
||||
var top = parseInt($(this).offset().top);
|
||||
$(this).after("<label for='"+this.id+"' id='"+labelId+"' style ='position:absolute;left:"+left+"px;top:"+top+"px; font-size:15px;color:#1898d2;font-weight:bold; padding-left:10px;padding-top:11px;'><b>"+placeTxt+"</b></label>");
|
||||
|
||||
if(objVal !=""){
|
||||
$("#"+labelId).hide();
|
||||
}
|
||||
|
||||
$(this).focus(function(){
|
||||
$("#"+labelId).hide();
|
||||
});
|
||||
|
||||
$(this).blur(function(){
|
||||
if($(this).val() == ""){
|
||||
$("#"+labelId).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function addrDetailChk(){
|
||||
var evtCode = (window.netscape) ? ev.which : event.keyCode;
|
||||
if(evtCode == 63 || evtCode == 35 || evtCode == 38 || evtCode == 43 || evtCode == 92 || evtCode == 34){ // # & + \ " 문자제한
|
||||
alert('특수문자 ? # & + \\ " 를 입력 할 수 없습니다.');
|
||||
if(event.preventDefault){
|
||||
event.preventDefault();
|
||||
}else{
|
||||
event.returnValue=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addrDetailChk1(obj){
|
||||
if(obj.value.length > 0){
|
||||
var expText = /^[^?#&+\"\\]+$/;
|
||||
if(expText.test(obj.value) != true){
|
||||
alert('특수문자 ? # & + \\ " 를 입력 할 수 없습니다.');
|
||||
obj.value="";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function popClose(){
|
||||
window.close();
|
||||
}
|
||||
|
||||
function addrJuminRenew(idx){
|
||||
$("#detDivX"+idx).show();
|
||||
$("#detListDivX"+idx).show();
|
||||
$("#detDiv"+idx).hide();
|
||||
|
||||
var docHeight = $("#resultList").height(); // 결과 DIV 높이 가져옴
|
||||
if(docHeight > 300){ // 높이가 310인 경우 로고 위치 조정
|
||||
docHeight += 60;
|
||||
$("#searchContentBox").css("height",docHeight+"px");// 로고 위치 지정
|
||||
}else{
|
||||
$("#searchContentBox").css("365px");// 로고 위치 지정
|
||||
}
|
||||
}
|
||||
function addrJuminRenewX(idx){
|
||||
$("#detDivX"+idx).hide();
|
||||
$("#detListDivX"+idx).hide();
|
||||
$("#detDiv"+idx).show();
|
||||
|
||||
var docHeight = $("#resultList").height(); // 결과 DIV 높이 가져옴
|
||||
if(docHeight > 300){ // 높이가 310인 경우 로고 위치 조정
|
||||
docHeight += 60;
|
||||
$("#searchContentBox").css("height",docHeight+"px");// 로고 위치 지정
|
||||
}else{
|
||||
$("#searchContentBox").css("365px");// 로고 위치 지정
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var docHeight = $("#resultList").height(); // 결과 DIV 높이 가져옴
|
||||
|
||||
if(docHeight > 300){ // 높이가 310인 경우 로고 위치 조정
|
||||
docHeight += 60;
|
||||
$("#searchContentBox").css("height",docHeight+"px");// 로고 위치 지정
|
||||
}else{
|
||||
$("#searchContentBox").css("365px");// 로고 위치 지정
|
||||
}
|
||||
|
||||
$("#keyword").focus();
|
||||
|
||||
$("#keyword").on("keydown", function(event){
|
||||
if (event.which == 13) {
|
||||
event.keyCode = 0;
|
||||
$("#currentPage").val(1);
|
||||
searchUrlJuso();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function trim(strSource) {
|
||||
return strSource.replace(/(^\s*)|(\s*$)/g, "");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html { overflow-y:hidden; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="init();" class ="visualSection">
|
||||
<form name="rtForm" id="rtForm" method="post">
|
||||
<input type="hidden" name="inputYn" id="inputYn" value="Y"/>
|
||||
<input type="hidden" name="roadFullAddr" id="roadFullAddr"/>
|
||||
<input type="hidden" name="roadAddrPart1" id="roadAddrPart1"/>
|
||||
<input type="hidden" name="roadAddrPart2" id="roadAddrPart2"/>
|
||||
<input type="hidden" name="engAddr" id="engAddr"/>
|
||||
<input type="hidden" name="jibunAddr" id="jibunAddr"/>
|
||||
<input type="hidden" name="zipNo" id="zipNo"/>
|
||||
<input type="hidden" name="addrDetail" id="addrDetail"/>
|
||||
<input type="hidden" name="admCd" id="admCd" />
|
||||
<input type="hidden" name="rnMgtSn" id="rnMgtSn" />
|
||||
<input type="hidden" name="bdMgtSn" id="bdMgtSn" />
|
||||
|
||||
<input type="hidden" name="detBdNmList" id="detBdNmList" />
|
||||
<input type="hidden" name="bdNm" id="bdNm" />
|
||||
<input type="hidden" name="bdKdcd" id="bdKdcd" />
|
||||
<input type="hidden" name="siNm" id="siNm" />
|
||||
<input type="hidden" name="sggNm" id="sggNm" />
|
||||
<input type="hidden" name="emdNm" id="emdNm" />
|
||||
<input type="hidden" name="liNm" id="liNm" />
|
||||
<input type="hidden" name="rn" id="rn" />
|
||||
<input type="hidden" name="udrtYn" id="udrtYn" />
|
||||
<input type="hidden" name="buldMnnm" id="buldMnnm" />
|
||||
<input type="hidden" name="buldSlno" id="buldSlno" />
|
||||
<input type="hidden" name="mtYn" id="mtYn" />
|
||||
<input type="hidden" name="lnbrMnnm" id="lnbrMnnm" />
|
||||
<input type="hidden" name="lnbrSlno" id="lnbrSlno" />
|
||||
<input type="hidden" name="emdNo" id="emdNo" />
|
||||
</form>
|
||||
|
||||
<form name="AKCFrm" id="AKCFrm" method="post">
|
||||
<input type="hidden" name="iframe" value="" />
|
||||
<input type="hidden" name="confmKey" value="<%=confmKey %>" />
|
||||
<input type="hidden" name="encodingType" value="" />
|
||||
<input type="hidden" name="cssUrl" value="" />
|
||||
<input type="hidden" name="resultType" value="<%=resultType %>" />
|
||||
<input type="hidden" name="currentPage" id="currentPage" value="1" />
|
||||
<input type="hidden" name="countPerPage" value="5" />
|
||||
|
||||
<input type="hidden" name="rtRoadAddr" id="rtRoadAddr" />
|
||||
<input type="hidden" name="rtAddrPart1" id="rtAddrPart1" />
|
||||
<input type="hidden" name="rtAddrPart2" id="rtAddrPart2" />
|
||||
<input type="hidden" name="rtEngAddr" id="rtEngAddr" />
|
||||
<input type="hidden" name="rtJibunAddr" id="rtJibunAddr" />
|
||||
<input type="hidden" name="rtZipNo" id="rtZipNo" />
|
||||
<input type="hidden" name="rtAdmCd" id="rtAdmCd" />
|
||||
<input type="hidden" name="rtRnMgtSn" id="rtRnMgtSn" />
|
||||
<input type="hidden" name="rtBdMgtSn" id="rtBdMgtSn" />
|
||||
|
||||
<input type="hidden" name="rtDetBdNmList" id="rtDetBdNmList" />
|
||||
<input type="hidden" name="rtBdNm" id="rtBdNm" />
|
||||
<input type="hidden" name="rtBdKdcd" id="rtBdKdcd" />
|
||||
<input type="hidden" name="rtSiNm" id="rtSiNm" />
|
||||
<input type="hidden" name="rtSggNm" id="rtSggNm" />
|
||||
<input type="hidden" name="rtEmdNm" id="rtEmdNm" />
|
||||
<input type="hidden" name="rtLiNm" id="rtLiNm" />
|
||||
<input type="hidden" name="rtRn" id="rtRn" />
|
||||
<input type="hidden" name="rtUdrtYn" id="rtUdrtYn" />
|
||||
<input type="hidden" name="rtBuldMnnm" id="rtBuldMnnm" />
|
||||
<input type="hidden" name="rtBuldSlno" id="rtBuldSlno" />
|
||||
<input type="hidden" name="rtMtYn" id="rtMtYn" />
|
||||
<input type="hidden" name="rtLnbrMnnm" id="rtLnbrMnnm" />
|
||||
<input type="hidden" name="rtLnbrSlno" id="rtLnbrSlno" />
|
||||
<input type="hidden" name="rtEmdNo" id="rtEmdNo" />
|
||||
|
||||
<input type="hidden" name ="searchType" id="searchType" />
|
||||
<input type="hidden" name ="dsgubuntext" id="dsgubuntext" />
|
||||
<input type="hidden" name ="dscity1text" id="dscity1text" />
|
||||
<input type="hidden" name ="dscounty1text" id="dscounty1text" />
|
||||
<input type="hidden" name ="dsemd1text" id="dsemd1text" />
|
||||
<input type="hidden" name ="dsri1text" id="dsri1text" />
|
||||
<input type="hidden" name ="dsrd_nm1text" id="dsrd_nm1text" />
|
||||
<input type="hidden" name ="dssan1text" id="dssan1text" />
|
||||
|
||||
<div class="pop-address-search" style="width: 100%;" >
|
||||
<div class="pop-address-search-inner" style="border: 0px;">
|
||||
<div style="height: 365px;" id="searchContentBox">
|
||||
<fieldset>
|
||||
<legend>도로명주소 검색</legend>
|
||||
<span class="wrap">
|
||||
<input type="text" class="popSearchInput" style="font-size: 13px; font-weight: bold; ime-mode:active;" title="검색어를 입력하세요" name="keyword" id="keyword" placeholder="도로명주소, 건물명 또는 지번입력" value="" tabindex="1"/>
|
||||
<button type="button" title="검색" tabindex="2" onclick="javascript:$('#currentPage').val(1); searchUrlJuso();" style="color:transparent; cursor: pointer;">검색</button>
|
||||
</span>
|
||||
<a class="close" href="javascript:popClose();" title="창닫기" tabindex="3">닫기</a>
|
||||
</fieldset>
|
||||
<p class="guide" style="margin-top:3px;">검색어 예 : 도로명(반포대로 58), 건물명(독립기념관), 지번(삼성동 25)</p>
|
||||
|
||||
|
||||
<!-- nodata -->
|
||||
<div class="popSearchNoResult" style="margin-top:10px; margin-bottom:5px;"></div>
|
||||
<!-- //nodata -->
|
||||
|
||||
<!-- 상세주소 -->
|
||||
<div class="detail" style="display:none;" id="resultData">
|
||||
<p><strong>상세주소 입력</strong></p>
|
||||
<table class="data-row">
|
||||
<caption>주소 입력</caption>
|
||||
<colgroup>
|
||||
<col style="width:20%"></col>
|
||||
<col></col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">도로명주소</th>
|
||||
<td id="addrPart1" style="font-size:15px; height:20px; line-height:20px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="inputPopAddress">상세주소입력</label></th>
|
||||
<td>
|
||||
<input type="text" name="rtAddrDetail" id="rtAddrDetail" style="width: 100%; font-size: 13px;" onkeypress="addrDetailChk();" onkeyup="addrDetailChk1(this);" title="상세주소"/>
|
||||
<div id="addrPart2" style="font-size: 13px; line-height: 2em;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="btns-submit">
|
||||
<a class="btn-bl" href="javascript:setParent();">주소입력</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //상세주소 입력 -->
|
||||
<div class="logo" style="display: block;" > </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -1,94 +0,0 @@
|
||||
<%@ page import="org.springframework.security.core.context.SecurityContextHolder" %>
|
||||
<%@ page import="org.springframework.security.core.Authentication" %>
|
||||
<%@ page import="org.springframework.security.web.access.AccessDeniedHandlerImpl" %>
|
||||
|
||||
<%@ page isErrorPage="true"%>
|
||||
<%@ page contentType="text/html; charset=euc-kr" %>
|
||||
<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core' %>
|
||||
<%@page import="cokr.xit.fims.framework.core.utils.XitCmmnUtil"%>
|
||||
<%@ page import="java.lang.String" %>
|
||||
<%
|
||||
boolean authenticateFail = false;
|
||||
if(request.getAttribute("authenticateFail")!=null && !request.getAttribute("authenticateFail").toString().equals("")){
|
||||
authenticateFail = true;
|
||||
}
|
||||
|
||||
boolean authFail = false;
|
||||
if(request.getAttribute("authFail")!=null && !request.getAttribute("authFail").toString().equals("")){
|
||||
authFail = true;
|
||||
}
|
||||
|
||||
String target = XitCmmnUtil.nvl((String)request.getAttribute("target"));
|
||||
target = target.equals("") ? "_top" : target;
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<title>Access is denied</title>
|
||||
</head>
|
||||
<script type="text/javascript">
|
||||
function fncGoAfterErrorPage(){
|
||||
if('<%=authenticateFail%>' == 'true' ){
|
||||
document.dummyForm.target="_top";
|
||||
document.dummyForm.action = "<c:url value='/empaftererrorpage.do'/>";
|
||||
document.dummyForm.submit();
|
||||
}else if('<%=authFail%>' == 'true'){
|
||||
document.dummyForm.target="<%=target%>";
|
||||
document.dummyForm.action = "<c:url value='/empaftererrorpage.do'/>";
|
||||
document.dummyForm.submit();
|
||||
}else{
|
||||
//document.location.href = "<c:url value='/empaftererrorpage.do'/>";
|
||||
history.back(-2);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" valign="top"><br />
|
||||
<br />
|
||||
<br />
|
||||
<table width="600" border="0" cellpadding="0" cellspacing="0" background="<c:url value='/resources/image/fims/framework/egovframework/com/cmm/blue_bg.jpg'/>">
|
||||
<tr>
|
||||
<td align="center"><table width="100%" border="0" cellspacing="9" cellpadding="0">
|
||||
<tr>
|
||||
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center"><table width="520" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td width="74" rowspan="2" align="center"><img src="<c:url value='/resources/image/fims/framework/egovframework/com/cmm/danger.jpg'/>" alt="오류표시" width="74" height="74" /></td>
|
||||
<td width="399" align="left" class="lt_text2">
|
||||
요청에 대한 권한이 없습니다.
|
||||
<br/>시스템관리자에 문의 바랍니다.
|
||||
<%-- <%= request.getAttribute(org.springframework.security.web.WebAttributes.AUTHENTICATION_EXCEPTION) %> --%>
|
||||
<%-- <% Authentication auth = SecurityContextHolder.getContext().getAuthentication(); --%>
|
||||
<!-- if (auth != null) { -->
|
||||
<%-- } %> --%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" valign="top" class="lt_text5">${exception.message}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="500" border="0" cellspacing="2" cellpadding="2">
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br />
|
||||
<br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="#LINK" onclick="javascript:fncGoAfterErrorPage(); return false;"><img alt="이전화면 이동" src="<c:url value='/resources/image/fims/framework/etc/go_history.jpg'/>" width="90" height="29" border="0" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -1,222 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
[class*="pop-address-search"] {font-size:12px; font-family: "돋움",Dotum,AppleGothic,sans-serif; color:#000;}
|
||||
[class*="pop-address-search"] *{padding:0; margin:0; line-height:1.2em}
|
||||
[class*="pop-address-search"] p,
|
||||
[class*="pop-address-search"] h1,
|
||||
[class*="pop-address-search"] h2,
|
||||
[class*="pop-address-search"] h3,
|
||||
[class*="pop-address-search"] h4,
|
||||
[class*="pop-address-search"] h5,
|
||||
[class*="pop-address-search"] h6,
|
||||
[class*="pop-address-search"] ul,
|
||||
[class*="pop-address-search"] ol,
|
||||
[class*="pop-address-search"] li,
|
||||
[class*="pop-address-search"] dl,
|
||||
[class*="pop-address-search"] dt,
|
||||
[class*="pop-address-search"] dd,
|
||||
[class*="pop-address-search"] div,
|
||||
[class*="pop-address-search"] table,
|
||||
[class*="pop-address-search"] th,
|
||||
[class*="pop-address-search"] td,
|
||||
[class*="pop-address-search"] form,
|
||||
[class*="pop-address-search"] fieldset,
|
||||
[class*="pop-address-search"] legend,
|
||||
[class*="pop-address-search"] input,
|
||||
[class*="pop-address-search"] textarea,
|
||||
[class*="pop-address-search"] button,
|
||||
[class*="pop-address-search"] select,
|
||||
[class*="pop-address-search"] pre,
|
||||
[class*="pop-address-search"] code {-webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box;color:#000;}
|
||||
[class*="pop-address-search"] input,
|
||||
[class*="pop-address-search"] textarea,
|
||||
[class*="pop-address-search"] select,
|
||||
[class*="pop-address-search"] button,
|
||||
[class*="pop-address-search"] table {font-size:13px; font-family: "돋움",Dotum,AppleGothic,sans-serif; color:#000; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box;}
|
||||
[class*="pop-address-search"] article,
|
||||
[class*="pop-address-search"] aside,
|
||||
[class*="pop-address-search"] details,
|
||||
[class*="pop-address-search"] figcaption,
|
||||
[class*="pop-address-search"] figure,
|
||||
[class*="pop-address-search"] footer,
|
||||
[class*="pop-address-search"] header,
|
||||
[class*="pop-address-search"] hgroup,
|
||||
[class*="pop-address-search"] nav,
|
||||
[class*="pop-address-search"] section,
|
||||
[class*="pop-address-search"] summary {display:block; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box;}
|
||||
[class*="pop-address-search"] img,
|
||||
[class*="pop-address-search"] fieldset {border:0; vertical-align:middle}
|
||||
[class*="pop-address-search"] iframe,
|
||||
[class*="pop-address-search"] button {border:0}
|
||||
[class*="pop-address-search"] ul,
|
||||
[class*="pop-address-search"] ol {list-style:none}
|
||||
[class*="pop-address-search"] legend,
|
||||
[class*="pop-address-search"] caption,
|
||||
[class*="pop-address-search"] hr {display:none}
|
||||
[class*="pop-address-search"] table {border-collapse:collapse; border-spacing:0;}
|
||||
[class*="pop-address-search"] a {text-decoration:none; font-family: "돋움",Dotum,AppleGothic,sans-serif;}
|
||||
|
||||
/* 바탕 배경 이미지 */
|
||||
.pop-address-search .pop-address-search-inner { background-image: url();}
|
||||
/* 회사 로고 이미지 */
|
||||
.pop-address-search .pop-address-search-inner .logo { background: url(../img/PopUpAPI_Logo.png) no-repeat; background-position:center; min-height: 40px;}
|
||||
|
||||
.pop-address-search {position:absolute; z-index:1; left:0; top:0; width:500px; min-height:400px}
|
||||
.pop-address-search .pop-address-search-inner {position:relative; padding:18px; padding-bottom:20px; text-align:center; border:1px solid #000; background-color:#fff; background-repeat:no-repeat; background-position:100% 100%}
|
||||
.pop-address-search .pop-address-search-inner fieldset {display:inline-block; position:relative; padding-right:36px}
|
||||
.pop-address-search .pop-address-search-inner fieldset .close {position:absolute; right:0; top:50%; margin-top:-12px; width:24px; height:24px; background:url(../img/btn-close-search.png) 50% 50% no-repeat; text-indent:-9999px}
|
||||
.pop-address-search .pop-address-search-inner .wrap {display:block; width:350px; position:relative; border:2px solid #186bb9; padding:0 39px 0 0}
|
||||
.pop-address-search .pop-address-search-inner .wrap:after {content:""; display:block; clear:both}
|
||||
.pop-address-search .pop-address-search-inner .wrap *{height:39px; border:0 none}
|
||||
.pop-address-search .pop-address-search-inner .wrap input[type="text"] {width:100%; line-height:39px; font-size: 14px;}
|
||||
.pop-address-search .pop-address-search-inner .wrap button[type="button"] {position:absolute; right:0; top:0; width:39px; background:url(../img/btn-search.png) 50% 50% no-repeat}
|
||||
.pop-address-search .pop-address-search-inner .guide {display:inline-block; margin-top:14px; color:#186bb9; padding-right:39px}
|
||||
.pop-address-search .pop-address-search-inner .logo {text-align:center; margin-top:15px;}
|
||||
.pop-address-search .pop-address-search-inner .exam {text-align:left; margin-top:5px}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col {border-bottom:1px solid #ddd; margin-top:16px}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col thead tr th {text-align:center; height:49px; padding:16px 0}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col tbody tr td {text-align:left; height:auto; padding:19px 0 7px 20px; border-bottom:0}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col tbody tr ~ tr td {padding-top:7px}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col tbody tr:last-child td {padding-bottom:19px}
|
||||
.pop-address-search .pop-address-search-inner .exam table.data-col ~ p {margin-top:19px;}
|
||||
.pop-address-search .pop-address-search-inner .result {margin-top:25px}
|
||||
.pop-address-search .pop-address-search-inner .result .text-guide {text-align:left}
|
||||
.pop-address-search .pop-address-search-inner .result .text-guide strong {color:#186bb9}
|
||||
.pop-address-search .pop-address-search-inner .result .text-guide ~ table.data-col {margin-top:16px;}
|
||||
.pop-address-search .pop-address-search-inner .result table.data-col tbody tr td {line-height:1.57em}
|
||||
.pop-address-search .pop-address-search-inner .result table.data-col thead tr th,
|
||||
.pop-address-search .pop-address-search-inner .result table.data-col tbody tr td {height:40px; padding:1px 0}
|
||||
.pop-address-search .pop-address-search-inner .result table.data-col tbody tr:nth-child(odd) td {background:#f7f7f7}
|
||||
.pop-address-search .pop-address-search-inner .result table.data-col tbody tr.nodata td {background:#fff}
|
||||
.pop-address-search .pop-address-search-inner .detail {margin-top:25px}
|
||||
.pop-address-search .pop-address-search-inner .detail p {margin-bottom:16px; text-align:left}
|
||||
.pop-address-search .pop-address-search-inner .detail table.data-row tbody tr td {text-align:left; line-height:1.57em}
|
||||
|
||||
.pop-address-search-form {background:#fff}
|
||||
.pop-address-search-form .pop-address-header {padding:20px 30px; background:#333}
|
||||
.pop-address-search-form .pop-address-header h2 {font-size:20px; font-weight:normal; color:#fff}
|
||||
.pop-address-search-form .pop-address-body {padding:30px}
|
||||
.pop-address-search-form .pop-address-field {display:block; width:388px; margin:0 auto; margin-bottom:29px; position:relative; border:2px solid #186bb9; padding:0 39px 0 0}
|
||||
.pop-address-search-form .pop-address-field:after {content:""; display:block; clear:both}
|
||||
.pop-address-search-form .pop-address-field *{height:39px; border:0 none}
|
||||
.pop-address-search-form .pop-address-field input[type="text"] {width:100%; line-height:39px;}
|
||||
.pop-address-search-form .pop-address-field button[type="button"] {position:absolute; right:0; top:0; width:39px; background:url(../img/btn-search.png) 50% 50% no-repeat}
|
||||
.pop-address-search-form .pop-address-body .text-guide {margin-bottom:15px}
|
||||
.pop-address-search-form .pop-address-body table.data-col thead tr th,
|
||||
.pop-address-search-form .pop-address-body table.data-col tbody tr td {height:49px; padding:16px 0}
|
||||
.pop-address-search-form .pop-address-body table.data-col tbody tr:nth-child(odd) td {background:#f7f7f7}
|
||||
.pop-address-search-form .pop-address-body table.data-col tbody tr.nodata td {background:#fff}
|
||||
.pop-address-search-form .pop-address-body .paginate {margin-top:20px}
|
||||
.pop-address-search-form .pop-address-detail {margin-top:40px; padding-top:30px; border-top:1px dotted #666}
|
||||
.pop-address-search-form .pop-address-detail .btns-submit {margin-top:20px}
|
||||
.pop-address-search-form .pop-address-detail .pop-address-jibun {margin-top:19px}
|
||||
.pop-address-search-wrapper {position:fixed; z-index:9; left:0; top:0; right:0; bottom:0}
|
||||
.pop-address-search-layer {position:absolute; z-index:10; left:50%; top:50%; margin:-290px 0 0 -340px; width:680px; border:1px solid #000; -webkit-box-shadow: 5px 5px 12px -2px rgba(0,0,0,0.36); -moz-box-shadow: 5px 5px 12px -2px rgba(0,0,0,0.36); box-shadow: 5px 5px 12px -2px rgba(0,0,0,0.36);}
|
||||
.pop-address-search-layer .pop-address-header {position:relative}
|
||||
.pop-address-search-layer .pop-address-header .close {position:absolute; right:25px; top:50%; margin-top:-12px; width:24px; height:24px; background:url(../img/btn-close-pop.png) 50% 50% no-repeat; text-indent:-9999px}
|
||||
|
||||
|
||||
/* form element */
|
||||
/* radio, checkbox */
|
||||
[class*="pop-address-search"] input[type="checkbox"],
|
||||
[class*="pop-address-search"] input[type="radio"] {display:inline-block; width:13px; height:13px; vertical-align:middle; margin-right:3px}
|
||||
/* select, input text */
|
||||
[class*="pop-address-search"] select,
|
||||
[class*="pop-address-search"] input[type="text"],
|
||||
[class*="pop-address-search"] input[type="password"] {display:inline-block; height:35px; line-height:33px; padding:0 9px; border:1px solid #ccc; vertical-align:middle}
|
||||
[class*="pop-address-search"] input[type="text"].input-datepicker {width:130px; background:#fff url(../img/ico-datepicker.gif) right 50% no-repeat}
|
||||
[class*="pop-address-search"] .read-only {background-color:#f7f7f7}
|
||||
[class*="pop-address-search"] ::-webkit-input-placeholder {color:#999;}
|
||||
[class*="pop-address-search"] :-moz-placeholder {color:#999;}
|
||||
[class*="pop-address-search"] ::-moz-placeholder {color:#999;}
|
||||
[class*="pop-address-search"] :-ms-input-placeholder {color:#999;}
|
||||
[class*="pop-address-search"] input.placeholder,
|
||||
[class*="pop-address-search"] textarea.placeholder {color:#999;}
|
||||
[class*="pop-address-search"] select {padding:0 25px 0 14px}
|
||||
[class*="pop-address-search"] textarea {display:block; width:100%; line-height:1.333em; padding:15px 14px; border:1px solid #ccc;}
|
||||
[class*="pop-address-search"] .wrap-file {position:relative}
|
||||
[class*="pop-address-search"] .wrap-file input[type="file"] {position:absolute; left:0; top:0; height:100%; width:100%; opacity:0}
|
||||
[class*="pop-address-search"] .wrap-file input[type="text"] {width:100%}
|
||||
|
||||
/* button and */
|
||||
[class*="btn-"] {display:inline-block; height:35px; line-height:34px; min-width:90px; text-align:center; padding:0 10px; vertical-align:middle; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box;}
|
||||
[class*="btn-"].l {height:43px; line-height:42px; padding:0 20px}
|
||||
[class*="btn-"].download span {padding-left:25px; font-weight:bold; background:url(../img/btn-download-red.png) 0 50% no-repeat}
|
||||
[class*="btn-"].go span {padding-right:21px; font-weight:bold; background:url(../img/btn-go-w.png) 100% 50% no-repeat}
|
||||
.btn-b {color:#fff; background:#000; border:1px solid #000}
|
||||
.btn-w {background:#fff; border:1px solid #000}
|
||||
.btn-bl {color:#fff; background:#186bb9; border:1px solid #186bb9}
|
||||
.btn-dg {color:#fff; background:#333; border:1px solid #333}
|
||||
.btn-g {color:#fff; background:#666; border:1px solid #666}
|
||||
.btns-submit {text-align:center; margin-top:25px}
|
||||
.btns-submit [class*="btn"] {margin:0 7px}
|
||||
.btns-submit:after {content:""; display:block; clear:both}
|
||||
.btns-submit .flex {float:left}
|
||||
.btns-submit .flex ~ .flex {padding-left:10px}
|
||||
.btns-submit .flex [class*="btn-"] {margin:0 0 0 0; width:100%}
|
||||
.btns-submit .more {display:inline-block; margin-top:-5px; padding-top:35px; background:url(../img/btn-more.png) 50% 0 no-repeat}
|
||||
.btns-submit .left {float:left; text-align:left}
|
||||
.btns-submit .left > *{margin:0 6px 0 0}
|
||||
.btns-submit .right {float:right; text-align:right}
|
||||
.btns-submit .right > *{margin:0 0 0 6px}
|
||||
.btns-submit .right .text-guide {display:inline-block; margin-right:5px}
|
||||
|
||||
/* data table, data list, board */
|
||||
/* common */
|
||||
table {width:100%}
|
||||
table tr th .hidden {position:absolute; left:-9999em}
|
||||
/* data, row */
|
||||
table.data-row {border-top:1px solid #bbb; border-bottom:1px solid #bbb}
|
||||
table.data-row tr ~ tr th,
|
||||
table.data-row tr ~ tr td {border-top:1px solid #ddd}
|
||||
table.data-row th {padding:15px 0; background:#f7f7f7; text-align:center}
|
||||
table.data-row td {/* height:40px; */ height:65px; padding:15px}
|
||||
table.data-row td input[type="text"] + input[type="checkbox"],
|
||||
table.data-row td input[type="text"] + input[type="radio"],
|
||||
table.data-row td input[type="password"] + input[type="checkbox"],
|
||||
table.data-row td input[type="password"] + input[type="radio"] {margin-left:11px}
|
||||
table.data-row td input[type="text"] + [class*="btn-"] {margin-left:6px}
|
||||
table.data-row td .row:after {content:""; display:block; clear:both}
|
||||
table.data-row td .flex {float:left}
|
||||
table.data-row td .flex ~ .flex {padding-left:10px}
|
||||
table.data-row td .flex input[type="text"],
|
||||
table.data-row td .flex input[type="password"] {width:100%}
|
||||
table.data-row td .flex [class*="btn-"] {width:100%; padding:0 0 0 0}
|
||||
table.data-row td p.guide {line-height:1.57em; margin-top:6px}
|
||||
table.data-row th .req {display:inline-block; width:12px; height:15px; background:url(../img/ico-required.png) 0 50% no-repeat; vertical-align:text-top; margin-right:6px; text-indent:-9999px}
|
||||
/* date col */
|
||||
table.data-col {table-layout:fixed; border-top:1px solid #000}
|
||||
table.data-col thead tr th,
|
||||
table.data-col tbody tr td {height:59px; padding:21px 0; border-bottom:1px solid #000}
|
||||
table.data-col thead tr th {border-bottom:1px solid #000}
|
||||
table.data-col tbody tr td {border-bottom:1px solid #ddd; text-align:center;}
|
||||
table.data-col tbody tr td.subj {text-align:left; }
|
||||
table.data-col tbody tr td.subj p {white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
|
||||
|
||||
/* search */
|
||||
/* board search */
|
||||
.search-data {margin-top:30px; padding:29px; border:1px solid #999; text-align:center}
|
||||
.search-data label {margin-right:6px; font-weight:bold}
|
||||
.search-data input[type='text'] {width:400px; margin-right:6px}
|
||||
|
||||
/* nav, tab */
|
||||
.paginate {margin-top:10px; text-align:center}
|
||||
.paginate > *{display:inline-block; padding:0px; min-width:31px; height:31px; line-height:31px; -webkit-box-sizing:border-box; -moz-box-sizing:border-box; -o-box-sizing:border-box; -ms-box-sizing:border-box; box-sizing:border-box; vertical-align:middle; }
|
||||
.paginate strong {color:#fff; border:1px solid #186bb9; background:#186bb9;}
|
||||
.paginate a:hover,
|
||||
.paginate a:focus {border:1px solid #ccc}
|
||||
.paginate a {text-decoration:none; font-family: "돋움",Dotum,AppleGothic,sans-serif; color:#000;}
|
||||
.paginate .skip {padding:0; text-align:left; text-indent:-9999px; *text-indent:0; *font-size:0; *color:#fff; border:1px solid #ccc}
|
||||
.paginate .skip.prev {margin-right:18px; background:url(../img/btn-paginate-prev.png) 50% 50% no-repeat}
|
||||
.paginate .skip.prev10 {background:url(../img/btn-paginate-prev10.png) 50% 50% no-repeat}
|
||||
.paginate .skip.next {margin-left:18px; background:url(../img/btn-paginate-next.png) 50% 50% no-repeat}
|
||||
.paginate .skip.next10 {background:url(../img/btn-paginate-next10.png) 50% 50% no-repeat}
|
||||
|
||||
/* text */
|
||||
.tit-bul {margin-bottom:19px; font-size:18px; font-weight:bold; padding-left:13px; background:url(../img/bul-6x6-circle.png) 0 50% no-repeat}
|
||||
.appr {color:#1661a7}
|
||||
.list-text li {padding-left:8px; line-height:1.57em; background:url(../img/bul-3x3-circle.png) 0 0.6em no-repeat}
|
||||
.list-text li.emp {background:url(../img/bul-3x3-circle-red.png) 0 0.6em no-repeat}
|
||||
.list-text li ~ li {margin-top:3px}
|
||||
.list-text li strong {color:#df1919}
|
||||
.text-guide {padding-left:8px; line-height:1.57em; background:url(../img/bul-3x3-circle.png) 0 0.6em no-repeat}
|
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 161 B |
Binary file not shown.
Before Width: | Height: | Size: 160 B |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 132 B |
@ -1,63 +0,0 @@
|
||||
|
||||
//검색 정제 (번지 빼기, 띄어쓰기)
|
||||
function regExpCheckJuso(strKeyword)
|
||||
{
|
||||
var tempKeyword = strKeyword;
|
||||
var charKeyword;
|
||||
var tempLength;
|
||||
|
||||
//주소일 경우 글자뒤에 번지 x, 주소와 숫자 사이에 한칸 띄우기
|
||||
var reqExp1 =/([0-9]|번지)$/;
|
||||
var reqExp2 =/번지$/;
|
||||
var checkChar =/^([0-9]|-|\.|\·)$/;
|
||||
var checkEng =/^[A-Za-z]+$/;
|
||||
|
||||
if(reqExp1.test(strKeyword))
|
||||
{
|
||||
// 글자 뒤의 번지 삭제
|
||||
tempKeyword = strKeyword.split(reqExp2).join("");
|
||||
|
||||
// 주소와 숫자 사이 한칸 띄우기
|
||||
tempLength = tempKeyword.length;
|
||||
|
||||
for(var i=tempLength-1;i>=0;i--)
|
||||
{
|
||||
charKeyword = tempKeyword.charAt(i);
|
||||
|
||||
if(!checkChar.test(charKeyword))
|
||||
{
|
||||
if(charKeyword != " " && !checkEng.test(charKeyword))
|
||||
{
|
||||
tempKeyword = insertString(tempKeyword,i+1,' ');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var regExp3 = /[0-9]*[ ]*(대로|로|길)[ ]+[0-9]+[ ]*([가-힝]|[ ])*[ ]*(로|길)/;
|
||||
var regExp4 = /[ ]/;
|
||||
|
||||
var k = tempKeyword.match(regExp3) ;
|
||||
|
||||
if (k != null) {
|
||||
var tmp = k[0].split(regExp4).join("");
|
||||
|
||||
tempKeyword=tempKeyword.replace(regExp3, tmp);
|
||||
}
|
||||
|
||||
return tempKeyword;
|
||||
}
|
||||
|
||||
function insertString(key,index,string)
|
||||
{
|
||||
if(index >0)
|
||||
return key.substring(0,index) + string + key.substring(index,key.length);
|
||||
else
|
||||
return string+key;
|
||||
}
|
||||
function validateJuso(value){
|
||||
value =value.replace(/(^\s*)|(\s*$)/g, ""); //앞뒤 공백 제거
|
||||
return value.split(/[%]/).join(""); //특수문자제거
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,2 +0,0 @@
|
||||
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
||||
var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,"writestart progress write writeend".split(" "))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,"data:attachment/file;");var n=e.open(t,"_blank");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,"_blank");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||"download",n)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||"download";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!==null){define("FileSaver.js",function(){return saveAs})}
|
File diff suppressed because one or more lines are too long
@ -1,8 +0,0 @@
|
||||
/*
|
||||
@source http://purl.eligrey.com/github/FileSaver.js/blob/master/src/FileSaver.js
|
||||
*/
|
||||
var module$FileSaver={},saveAs$$module$FileSaver=saveAs$$module$FileSaver||function(b){if(!("undefined"===typeof b||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var f=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),q="download"in f,r=/constructor/i.test(b.HTMLElement)||b.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),k=b.setImmediate||b.setTimeout,t=function(a){k(function(){throw a;},0)},l=function(a){setTimeout(function(){"string"===typeof a?(b.URL||
|
||||
b.webkitURL||b).revokeObjectURL(a):a.remove()},4E4)},m=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a},p=function(a,c,u){u||(a=m(a));var d=this,n="application/octet-stream"===a.type,g=function(){var a=["writestart","progress","write","writeend"];a=[].concat(a);for(var b=a.length;b--;){var c=d["on"+a[b]];if("function"===typeof c)try{c.call(d,d)}catch(v){t(v)}}};d.readyState=d.INIT;
|
||||
if(q){var e=(b.URL||b.webkitURL||b).createObjectURL(a);k(function(){f.href=e;f.download=c;var a=new MouseEvent("click");f.dispatchEvent(a);g();l(e);d.readyState=d.DONE},0)}else(function(){if((h||n&&r)&&b.FileReader){var c=new FileReader;c.onloadend=function(){var a=h?c.result:c.result.replace(/^data:[^;]*;/,"data:attachment/file;");b.open(a,"_blank")||(b.location.href=a);d.readyState=d.DONE;g()};c.readAsDataURL(a);d.readyState=d.INIT}else e||(e=(b.URL||b.webkitURL||b).createObjectURL(a)),n?b.location.href=
|
||||
e:b.open(e,"_blank")||(b.location.href=e),d.readyState=d.DONE,g(),l(e)})()},c=p.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,b,c){b=b||a.name||"download";c||(a=m(a));return navigator.msSaveOrOpenBlob(a,b)};c.abort=function(){};c.readyState=c.INIT=0;c.WRITING=1;c.DONE=2;c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null;return function(a,b,c){return new p(a,b||a.name||"download",c)}}}("undefined"!==typeof self&&self||"undefined"!==
|
||||
typeof window&&window||this);module$FileSaver.saveAs=saveAs$$module$FileSaver;
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,88 +0,0 @@
|
||||
/*
|
||||
tableExport.jquery.plugin
|
||||
Version 1.10.19
|
||||
Copyright (c) 2015-2020 hhurz, https://github.com/hhurz/tableExport.jquery.plugin
|
||||
Based on https://github.com/kayalshri/tableExport.jquery.plugin
|
||||
Licensed under the MIT License
|
||||
*/
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,k,y){c instanceof String&&(c=String(c));for(var v=c.length,A=0;A<v;A++){var S=c[A];if(k.call(y,S,A,c))return{i:A,v:S}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,k,y){c!=Array.prototype&&c!=Object.prototype&&(c[k]=y.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,k,y,v){if(k){y=$jscomp.global;c=c.split(".");for(v=0;v<c.length-1;v++){var A=c[v];A in y||(y[A]={});y=y[A]}c=c[c.length-1];v=y[c];k=k(v);k!=v&&null!=k&&$jscomp.defineProperty(y,c,{configurable:!0,writable:!0,value:k})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,y){return $jscomp.findInternal(this,c,y).v}},"es6","es3");
|
||||
(function(c){c.fn.tableExport=function(k){function y(b){var d=[];A(b,"thead").each(function(){d.push.apply(d,A(c(this),a.theadSelector).toArray())});return d}function v(b){var d=[];A(b,"tbody").each(function(){d.push.apply(d,A(c(this),a.tbodySelector).toArray())});a.tfootSelector.length&&A(b,"tfoot").each(function(){d.push.apply(d,A(c(this),a.tfootSelector).toArray())});return d}function A(b,a){var d=b[0].tagName,p=b.parents(d).length;return b.find(a).filter(function(){return p===c(this).closest(d).parents(d).length})}
|
||||
function S(b){var a=[];c(b).find("thead").first().find("th").each(function(b,d){void 0!==c(d).attr("data-field")?a[b]=c(d).attr("data-field"):a[b]=b.toString()});return a}function I(b){var a="undefined"!==typeof b[0].rowIndex,e=!1===a&&"undefined"!==typeof b[0].cellIndex,p=e||a?Ja(b):b.is(":visible"),f=b.attr("data-tableexport-display");e&&"none"!==f&&"always"!==f&&(b=c(b[0].parentNode),a="undefined"!==typeof b[0].rowIndex,f=b.attr("data-tableexport-display"));a&&"none"!==f&&"always"!==f&&(f=b.closest("table").attr("data-tableexport-display"));
|
||||
return"none"!==f&&(!0===p||"always"===f)}function Ja(b){var a=[];V&&(a=J.filter(function(){var a=!1;this.nodeType===b[0].nodeType&&("undefined"!==typeof this.rowIndex&&this.rowIndex===b[0].rowIndex?a=!0:"undefined"!==typeof this.cellIndex&&this.cellIndex===b[0].cellIndex&&"undefined"!==typeof this.parentNode.rowIndex&&"undefined"!==typeof b[0].parentNode.rowIndex&&this.parentNode.rowIndex===b[0].parentNode.rowIndex&&(a=!0));return a}));return!1===V||0===a.length}function sa(b,d,e){var p=!1;I(b)?0<
|
||||
a.ignoreColumn.length&&(-1!==c.inArray(e,a.ignoreColumn)||-1!==c.inArray(e-d,a.ignoreColumn)||T.length>e&&"undefined"!==typeof T[e]&&-1!==c.inArray(T[e],a.ignoreColumn))&&(p=!0):p=!0;return p}function B(b,d,e,p,f){if("function"===typeof f){var l=!1;"function"===typeof a.onIgnoreRow&&(l=a.onIgnoreRow(c(b),e));if(!1===l&&(0===a.ignoreRow.length||-1===c.inArray(e,a.ignoreRow)&&-1===c.inArray(e-p,a.ignoreRow))&&I(c(b))){var q=A(c(b),d),h=0;q.each(function(b){var a=c(this),d,l=O(this),p=U(this);c.each(G,
|
||||
function(){if(e>=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(d=0;d<=this.e.c-this.s.c;++d)f(null,e,h++)});if(!1===sa(a,q.length,b)){if(p||l)l=l||1,G.push({s:{r:e,c:h},e:{r:e+(p||1)-1,c:h+l-1}});f(this,e,h++)}if(l)for(d=0;d<l-1;++d)f(null,e,h++)});c.each(G,function(){if(e>=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(da=0;da<=this.e.c-this.s.c;++da)f(null,e,h++)})}}}function ta(b,a,e,c){if("undefined"!==typeof c.images&&(e=c.images[e],"undefined"!==typeof e)){a=a.getBoundingClientRect();
|
||||
var d=b.width/b.height,l=a.width/a.height,p=b.width,h=b.height,z=19.049976/25.4,g=0;l<=d?(h=Math.min(b.height,a.height),p=a.width*h/a.height):l>d&&(p=Math.min(b.width,a.width),h=a.height*p/a.width);p*=z;h*=z;h<b.height&&(g=(b.height-h)/2);try{c.doc.addImage(e.src,b.textPos.x,b.y+g,p,h)}catch(Pa){}b.textPos.x+=p}}function ua(b,d){if("string"===a.outputMode)return b.output();if("base64"===a.outputMode)return K(b.output());if("window"===a.outputMode)window.URL=window.URL||window.webkitURL,window.open(window.URL.createObjectURL(b.output("blob")));
|
||||
else try{var e=b.output("blob");saveAs(e,a.fileName+".pdf")}catch(p){ja(a.fileName+".pdf","data:application/pdf"+(d?"":";base64")+",",d?b.output("blob"):b.output())}}function va(b,a,e){var d=0;"undefined"!==typeof e&&(d=e.colspan);if(0<=d){for(var f=b.width,c=b.textPos.x,q=a.table.columns.indexOf(a.column),h=1;h<d;h++)f+=a.table.columns[q+h].width;1<d&&("right"===b.styles.halign?c=b.textPos.x+f-b.width:"center"===b.styles.halign&&(c=b.textPos.x+(f-b.width)/2));b.width=f;b.textPos.x=c;"undefined"!==
|
||||
typeof e&&1<e.rowspan&&(b.height*=e.rowspan);if("middle"===b.styles.valign||"bottom"===b.styles.valign)e=("string"===typeof b.text?b.text.split(/\r\n|\r|\n/g):b.text).length||1,2<e&&(b.textPos.y-=(2-1.15)/2*a.row.styles.fontSize*(e-2)/3);return!0}return!1}function wa(b,a,e){"undefined"!==typeof b&&null!==b&&(b.hasAttribute("data-tableexport-canvas")?(a=(new Date).getTime(),c(b).attr("data-tableexport-canvas",a),e.images[a]={url:'[data-tableexport-canvas="'+a+'"]',src:null}):"undefined"!==a&&null!=
|
||||
a&&a.each(function(){if(c(this).is("img")){var a=xa(this.src);e.images[a]={url:this.src,src:this.src}}wa(b,c(this).children(),e)}))}function Ka(b,a){function d(b){if(b.url)if(b.src){var d=new Image;p=++f;d.crossOrigin="Anonymous";d.onerror=d.onload=function(){if(d.complete&&(0===d.src.indexOf("data:image/")&&(d.width=b.width||d.width||0,d.height=b.height||d.height||0),d.width+d.height)){var e=document.createElement("canvas"),c=e.getContext("2d");e.width=d.width;e.height=d.height;c.drawImage(d,0,0);
|
||||
b.src=e.toDataURL("image/png")}--f||a(p)};d.src=b.url}else{var e=c(b.url);e.length&&(p=++f,html2canvas(e[0]).then(function(d){b.src=d.toDataURL("image/png");--f||a(p)}))}}var p=0,f=0;if("undefined"!==typeof b.images)for(var l in b.images)b.images.hasOwnProperty(l)&&d(b.images[l]);(b=f)||(a(p),b=void 0);return b}function ya(b,d,e){d.each(function(){if(c(this).is("div")){var d=ea(L(this,"background-color"),[255,255,255]),f=ea(L(this,"border-top-color"),[0,0,0]),l=fa(this,"border-top-width",a.jspdf.unit),
|
||||
q=this.getBoundingClientRect(),h=this.offsetLeft*e.wScaleFactor,z=this.offsetTop*e.hScaleFactor,g=q.width*e.wScaleFactor;q=q.height*e.hScaleFactor;e.doc.setDrawColor.apply(void 0,f);e.doc.setFillColor.apply(void 0,d);e.doc.setLineWidth(l);e.doc.rect(b.x+h,b.y+z,g,q,l?"FD":"F")}else c(this).is("img")&&(d=xa(this.src),ta(b,this,d,e));ya(b,c(this).children(),e)})}function za(b,d,e){if("function"===typeof e.onAutotableText)e.onAutotableText(e.doc,b,d);else{var p=b.textPos.x,f=b.textPos.y,l={halign:b.styles.halign,
|
||||
valign:b.styles.valign};if(d.length){for(d=d[0];d.previousSibling;)d=d.previousSibling;for(var q=!1,h=!1;d;){var z=d.innerText||d.textContent||"",g=z.length&&" "===z[0]?" ":"",k=1<z.length&&" "===z[z.length-1]?" ":"";!0!==a.preserve.leadingWS&&(z=g+ka(z));!0!==a.preserve.trailingWS&&(z=la(z)+k);c(d).is("br")&&(p=b.textPos.x,f+=e.doc.internal.getFontSize());c(d).is("b")?q=!0:c(d).is("i")&&(h=!0);(q||h)&&e.doc.setFontType(q&&h?"bolditalic":q?"bold":"italic");if(g=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize()){"linebreak"===
|
||||
b.styles.overflow&&p>b.textPos.x&&p+g>b.textPos.x+b.width&&(0<=".,!%*;:=-".indexOf(z.charAt(0))&&(k=z.charAt(0),g=e.doc.getStringUnitWidth(k)*e.doc.internal.getFontSize(),p+g<=b.textPos.x+b.width&&(e.doc.autoTableText(k,p,f,l),z=z.substring(1,z.length)),g=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize()),p=b.textPos.x,f+=e.doc.internal.getFontSize());if("visible"!==b.styles.overflow)for(;z.length&&p+g>b.textPos.x+b.width;)z=z.substring(0,z.length-1),g=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize();
|
||||
e.doc.autoTableText(z,p,f,l);p+=g}if(q||h)c(d).is("b")?q=!1:c(d).is("i")&&(h=!1),e.doc.setFontType(q||h?q?"bold":"italic":"normal");d=d.nextSibling}b.textPos.x=p;b.textPos.y=f}else e.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,l)}}function W(b,a,e){return null==b?"":b.toString().replace(new RegExp(null==a?"":a.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),e)}function ka(b){return null==b?"":b.toString().replace(/^\s+/,"")}function la(b){return null==b?"":b.toString().replace(/\s+$/,
|
||||
"")}function La(b){a.date.pattern.lastIndex=0;var d=a.date.pattern.exec(b);if(null==d)return!1;b=+d[a.date.match_y];if(0>b||8099<b)return!1;var e=1*d[a.date.match_m];d=1*d[a.date.match_d];if(!isFinite(d))return!1;var c=new Date(b,e-1,d,0,0,0);return c.getFullYear()===b&&c.getMonth()===e-1&&c.getDate()===d?new Date(Date.UTC(b,e-1,d,0,0,0)):!1}function ma(b){b=b||"0";""!==a.numbers.html.thousandsSeparator&&(b=W(b,a.numbers.html.thousandsSeparator,""));"."!==a.numbers.html.decimalMark&&(b=W(b,a.numbers.html.decimalMark,
|
||||
"."));return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function Ma(b){-1<b.indexOf("%")?(b=ma(b.replace(/%/g,"")),!1!==b&&(b/=100)):b=!1;return b}function E(b,d,e,p){var f="",l="text";if(null!==b){var q=c(b);q.removeData("teUserDefText");if(q[0].hasAttribute("data-tableexport-canvas"))var h="";else if(q[0].hasAttribute("data-tableexport-value"))h=(h=q.attr("data-tableexport-value"))?h+"":"",q.data("teUserDefText",1);else if(h=q.html(),"function"===typeof a.onCellHtmlData)h=a.onCellHtmlData(q,
|
||||
d,e,h),q.data("teUserDefText",1);else if(""!==h){b=c.parseHTML(h);var g=0,k=0;h="";c.each(b,function(){if(c(this).is("input"))h+=q.find("input").eq(g++).val();else if(c(this).is("select"))h+=q.find("select option:selected").eq(k++).text();else if(c(this).is("br"))h+="<br>";else{if("undefined"===typeof c(this).html())h+=c(this).text();else if(void 0===jQuery().bootstrapTable||!1===c(this).hasClass("fht-cell")&&!1===c(this).hasClass("filterControl")&&0===q.parents(".detail-view").length)h+=c(this).html();
|
||||
if(c(this).is("a")){var b=q.find("a").attr("href")||"";f="function"===typeof a.onCellHtmlHyperlink?f+a.onCellHtmlHyperlink(q,d,e,b,h):"href"===a.htmlHyperlink?f+b:f+h;h=""}}})}if(h&&""!==h&&!0===a.htmlContent)f=c.trim(h);else if(h&&""!==h)if(""!==q.attr("data-tableexport-cellformat")){var m=h.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi,"\u2060"),n=c("<div/>").html(m).contents();b=!1;m="";c.each(n.text().split("\u2028"),function(b,d){0<b&&(m+=" ");!0!==a.preserve.leadingWS&&(d=ka(d));m+=!0!==
|
||||
a.preserve.trailingWS?la(d):d});c.each(m.split("\u2060"),function(b,d){0<b&&(f+="\n");!0!==a.preserve.leadingWS&&(d=ka(d));!0!==a.preserve.trailingWS&&(d=la(d));f+=d.replace(/\u00AD/g,"")});f=f.replace(/\u00A0/g," ");if("json"===a.type||"excel"===a.type&&"xmlss"===a.mso.fileFormat||!1===a.numbers.output)b=ma(f),!1!==b&&(l="number",f=Number(b));else if(a.numbers.html.decimalMark!==a.numbers.output.decimalMark||a.numbers.html.thousandsSeparator!==a.numbers.output.thousandsSeparator)if(b=ma(f),!1!==
|
||||
b){n=(""+b.substr(0>b?1:0)).split(".");1===n.length&&(n[1]="");var t=3<n[0].length?n[0].length%3:0;l="number";f=(0>b?"-":"")+(a.numbers.output.thousandsSeparator?(t?n[0].substr(0,t)+a.numbers.output.thousandsSeparator:"")+n[0].substr(t).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):n[0])+(n[1].length?a.numbers.output.decimalMark+n[1]:"")}}else f=h;!0===a.escape&&(f=escape(f));"function"===typeof a.onCellData&&(f=a.onCellData(q,d,e,f,l),q.data("teUserDefText",1))}void 0!==p&&(p.type=
|
||||
l);return f}function Aa(b){return 0<b.length&&!0===a.preventInjection&&0<="=+-@".indexOf(b.charAt(0))?"'"+b:b}function Na(b,a,e){return a+"-"+e.toLowerCase()}function ea(b,a){(b=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b))&&(a=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]);return a}function Ba(b){var a=L(b,"text-align"),e=L(b,"font-weight"),c=L(b,"font-style"),f="";"start"===a&&(a="rtl"===L(b,"direction")?"right":"left");700<=e&&(f="bold");"italic"===c&&(f+=c);""===f&&(f="normal");a={style:{align:a,
|
||||
bcolor:ea(L(b,"background-color"),[255,255,255]),color:ea(L(b,"color"),[0,0,0]),fstyle:f},colspan:O(b),rowspan:U(b)};null!==b&&(b=b.getBoundingClientRect(),a.rect={width:b.width,height:b.height});return a}function O(b){var a=c(b).attr("data-tableexport-colspan");"undefined"===typeof a&&c(b).is("[colspan]")&&(a=c(b).attr("colspan"));return parseInt(a)||0}function U(b){var a=c(b).attr("data-tableexport-rowspan");"undefined"===typeof a&&c(b).is("[rowspan]")&&(a=c(b).attr("rowspan"));return parseInt(a)||
|
||||
0}function L(b,a){try{return window.getComputedStyle?(a=a.replace(/([a-z])([A-Z])/,Na),window.getComputedStyle(b,null).getPropertyValue(a)):b.currentStyle?b.currentStyle[a]:b.style[a]}catch(e){}return""}function fa(a,d,e){d=L(a,d).match(/\d+/);if(null!==d){d=d[0];a=a.parentElement;var b=document.createElement("div");b.style.overflow="hidden";b.style.visibility="hidden";a.appendChild(b);b.style.width=100+e;e=100/b.offsetWidth;a.removeChild(b);return d*e}return 0}function Oa(a){for(var b=new ArrayBuffer(a.length),
|
||||
e=new Uint8Array(b),c=0;c!==a.length;++c)e[c]=a.charCodeAt(c)&255;return b}function na(a){var b=a.c,e="";for(++b;b;b=Math.floor((b-1)/26))e=String.fromCharCode((b-1)%26+65)+e;return e+(""+(a.r+1))}function oa(a,d){if("undefined"===typeof d||"number"===typeof d)return oa(a.s,a.e);"string"!==typeof a&&(a=na(a));"string"!==typeof d&&(d=na(d));return a===d?a:a+":"+d}function Ca(a,d){var b=Number(a);if(isFinite(b))return b;var c=1;""!==d.thousandsSeparator&&(a=a.replace(new RegExp("([\\d])"+d.thousandsSeparator+
|
||||
"([\\d])","g"),"$1$2"));"."!==d.decimalMark&&(a=a.replace(new RegExp("([\\d])"+d.decimalMark+"([\\d])","g"),"$1.$2"));a=a.replace(/[$]/g,"").replace(/[%]/g,function(){c*=100;return""});if(isFinite(b=Number(a)))return b/c;a=a.replace(/[(](.*)[)]/,function(a,b){c=-c;return b});return isFinite(b=Number(a))?b/c:b}function xa(a){var b=0,c;if(0===a.length)return b;var p=0;for(c=a.length;p<c;p++){var f=a.charCodeAt(p);b=(b<<5)-b+f;b|=0}return b}function M(b,d,c,p,f,l){var e=!0;"function"===typeof a.onBeforeSaveToFile&&
|
||||
(e=a.onBeforeSaveToFile(b,d,c,p,f),"boolean"!==typeof e&&(e=!0));if(e)try{if(Da=new Blob([b],{type:c+";charset="+p}),saveAs(Da,d,!1===l),"function"===typeof a.onAfterSaveToFile)a.onAfterSaveToFile(b,d)}catch(h){ja(d,"data:"+c+(p.length?";charset="+p:"")+(f.length?";"+f:"")+",",l?"\ufeff"+b:b)}}function ja(b,d,c){var e=window.navigator.userAgent;if(!1!==b&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([c]),b);else if(!1!==b&&(0<e.indexOf("MSIE ")||e.match(/Trident.*rv\:11\./))){if(d=
|
||||
document.createElement("iframe")){document.body.appendChild(d);d.setAttribute("style","display:none");d.contentDocument.open("txt/plain","replace");d.contentDocument.write(c);d.contentDocument.close();d.contentWindow.focus();switch(b.substr(b.lastIndexOf(".")+1)){case "doc":case "json":case "png":case "pdf":case "xls":case "xlsx":b+=".txt"}d.contentDocument.execCommand("SaveAs",!0,b);document.body.removeChild(d)}}else{var f=document.createElement("a");if(f){var l=null;f.style.display="none";!1!==
|
||||
b?f.download=b:f.target="_blank";"object"===typeof c?(window.URL=window.URL||window.webkitURL,e=[],e.push(c),l=window.URL.createObjectURL(new Blob(e,{type:d})),f.href=l):0<=d.toLowerCase().indexOf("base64,")?f.href=d+K(c):f.href=d+encodeURIComponent(c);document.body.appendChild(f);if(document.createEvent)null===ha&&(ha=document.createEvent("MouseEvents")),ha.initEvent("click",!0,!1),f.dispatchEvent(ha);else if(document.createEventObject)f.fireEvent("onclick");else if("function"===typeof f.onclick)f.onclick();
|
||||
setTimeout(function(){l&&window.URL.revokeObjectURL(l);document.body.removeChild(f);if("function"===typeof a.onAfterSaveToFile)a.onAfterSaveToFile(c,b)},100)}}}function K(a){var b,c="",p=0;if("string"===typeof a){a=a.replace(/\x0d\x0a/g,"\n");var f="";for(b=0;b<a.length;b++){var l=a.charCodeAt(b);128>l?f+=String.fromCharCode(l):(127<l&&2048>l?f+=String.fromCharCode(l>>6|192):(f+=String.fromCharCode(l>>12|224),f+=String.fromCharCode(l>>6&63|128)),f+=String.fromCharCode(l&63|128))}a=f}for(;p<a.length;){var q=
|
||||
a.charCodeAt(p++);f=a.charCodeAt(p++);b=a.charCodeAt(p++);l=q>>2;q=(q&3)<<4|f>>4;var h=(f&15)<<2|b>>6;var g=b&63;isNaN(f)?h=g=64:isNaN(b)&&(g=64);c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)}return c}var a={csvEnclosure:'"',csvSeparator:",",
|
||||
csvUseBOM:!0,date:{html:"dd/mm/yyyy"},displayTableName:!1,escape:!1,exportHiddenCells:!1,fileName:"tableExport",htmlContent:!1,htmlHyperlink:"content",ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,
|
||||
fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},mso:{fileFormat:"xlshtml",onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:"",xslx:{formatId:{date:14,numbers:2}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onAfterSaveToFile:null,onBeforeSaveToFile:null,
|
||||
onCellData:null,onCellHtmlData:null,onCellHtmlHyperlink:null,onIgnoreRow:null,onTableExportBegin:null,onTableExportEnd:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},N={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,
|
||||
1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,
|
||||
323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]},C=this,ha=null,u=[],w=[],n=0,t="",T=[],G=[],Da,J=[],V=!1;c.extend(!0,a,k);"xlsx"===a.type&&(a.mso.fileFormat=a.type,a.type="excel");"undefined"!==typeof a.excelFileFormat&&"undefined"===a.mso.fileFormat&&(a.mso.fileFormat=a.excelFileFormat);"undefined"!==typeof a.excelPageFormat&&
|
||||
"undefined"===a.mso.pageFormat&&(a.mso.pageFormat=a.excelPageFormat);"undefined"!==typeof a.excelPageOrientation&&"undefined"===a.mso.pageOrientation&&(a.mso.pageOrientation=a.excelPageOrientation);"undefined"!==typeof a.excelRTL&&"undefined"===a.mso.rtl&&(a.mso.rtl=a.excelRTL);"undefined"!==typeof a.excelstyles&&"undefined"===a.mso.styles&&(a.mso.styles=a.excelstyles);"undefined"!==typeof a.onMsoNumberFormat&&"undefined"===a.mso.onMsoNumberFormat&&(a.mso.onMsoNumberFormat=a.onMsoNumberFormat);"undefined"!==
|
||||
typeof a.worksheetName&&"undefined"===a.mso.worksheetName&&(a.mso.worksheetName=a.worksheetName);a.mso.pageOrientation="l"===a.mso.pageOrientation.substr(0,1)?"landscape":"portrait";a.date.html=a.date.html||"";if(a.date.html.length){k=[];k.dd="(3[01]|[12][0-9]|0?[1-9])";k.mm="(1[012]|0?[1-9])";k.yyyy="((?:1[6-9]|2[0-2])\\d{2})";k.yy="(\\d{2})";var r=a.date.html.match(/[^a-zA-Z0-9]/)[0];r=a.date.html.toLowerCase().split(r);a.date.regex="^\\s*";a.date.regex+=k[r[0]];a.date.regex+="(.)";a.date.regex+=
|
||||
k[r[1]];a.date.regex+="\\2";a.date.regex+=k[r[2]];a.date.regex+="\\s*$";a.date.pattern=new RegExp(a.date.regex,"g");k=r.indexOf("dd")+1;a.date.match_d=k+(1<k?1:0);k=r.indexOf("mm")+1;a.date.match_m=k+(1<k?1:0);k=(0<=r.indexOf("yyyy")?r.indexOf("yyyy"):r.indexOf("yy"))+1;a.date.match_y=k+(1<k?1:0)}T=S(C);if("function"===typeof a.onTableExportBegin)a.onTableExportBegin();if("csv"===a.type||"tsv"===a.type||"txt"===a.type){var P="",Z=0;G=[];n=0;var pa=function(b,d,e){b.each(function(){t="";B(this,d,n,
|
||||
e+b.length,function(b,c,d){var e=t,f="";if(null!==b)if(b=E(b,c,d),c=null===b||""===b?"":b.toString(),"tsv"===a.type)b instanceof Date&&b.toLocaleString(),f=W(c,"\t"," ");else if(b instanceof Date)f=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(f=Aa(c),f=W(f,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=f.indexOf(a.csvSeparator)||/[\r\n ]/g.test(f))f=a.csvEnclosure+f+a.csvEnclosure;t=e+(f+("tsv"===a.type?"\t":a.csvSeparator))});t=c.trim(t).substring(0,t.length-1);0<t.length&&(0<P.length&&
|
||||
(P+="\n"),P+=t);n++});return b.length};Z+=pa(c(C).find("thead").first().find(a.theadSelector),"th,td",Z);A(c(C),"tbody").each(function(){Z+=pa(A(c(this),a.tbodySelector),"td,th",Z)});a.tfootSelector.length&&pa(c(C).find("tfoot").first().find(a.tfootSelector),"td,th",Z);P+="\n";if("string"===a.outputMode)return P;if("base64"===a.outputMode)return K(P);if("window"===a.outputMode){ja(!1,"data:text/"+("csv"===a.type?"csv":"plain")+";charset=utf-8,",P);return}M(P,a.fileName+"."+a.type,"text/"+("csv"===
|
||||
a.type?"csv":"plain"),"utf-8","","csv"===a.type&&a.csvUseBOM)}else if("sql"===a.type){n=0;G=[];var D="INSERT INTO "+a.sql.tableEnclosure+a.tableName+a.sql.tableEnclosure+" (";u=y(c(C));c(u).each(function(){B(this,"th,td",n,u.length,function(b,c,e){b=E(b,c,e)||"";-1<b.indexOf(a.sql.columnEnclosure)&&(b=W(b.toString(),a.sql.columnEnclosure,a.sql.columnEnclosure+a.sql.columnEnclosure));D+=a.sql.columnEnclosure+b+a.sql.columnEnclosure+","});n++;D=c.trim(D).substring(0,D.length-1)});D+=") VALUES ";w=v(c(C));
|
||||
c(w).each(function(){t="";B(this,"td,th",n,u.length+w.length,function(a,c,e){a=E(a,c,e)||"";-1<a.indexOf("'")&&(a=W(a.toString(),"'","''"));t+="'"+a+"',"});3<t.length&&(D+="("+t,D=c.trim(D).substring(0,D.length-1),D+="),");n++});D=c.trim(D).substring(0,D.length-1);D+=";";if("string"===a.outputMode)return D;if("base64"===a.outputMode)return K(D);M(D,a.fileName+".sql","application/sql","utf-8","",!1)}else if("json"===a.type){var X=[];G=[];u=y(c(C));c(u).each(function(){var a=[];B(this,"th,td",n,u.length,
|
||||
function(b,c,g){a.push(E(b,c,g))});X.push(a)});var qa=[];w=v(c(C));c(w).each(function(){var a={},d=0;B(this,"td,th",n,u.length+w.length,function(b,c,f){X.length?a[X[X.length-1][d]]=E(b,c,f):a[d]=E(b,c,f);d++});!1===c.isEmptyObject(a)&&qa.push(a);n++});k="head"===a.jsonScope?JSON.stringify(X):"data"===a.jsonScope?JSON.stringify(qa):JSON.stringify({header:X,data:qa});if("string"===a.outputMode)return k;if("base64"===a.outputMode)return K(k);M(k,a.fileName+".json","application/json","utf-8","base64",
|
||||
!1)}else if("xml"===a.type){n=0;G=[];var Q='<?xml version="1.0" encoding="utf-8"?>';Q+="<tabledata><fields>";u=y(c(C));c(u).each(function(){B(this,"th,td",n,u.length,function(a,c,e){Q+="<field>"+E(a,c,e)+"</field>"});n++});Q+="</fields><data>";var Ea=1;w=v(c(C));c(w).each(function(){var a=1;t="";B(this,"td,th",n,u.length+w.length,function(b,c,g){t+="<column-"+a+">"+E(b,c,g)+"</column-"+a+">";a++});0<t.length&&"<column-1></column-1>"!==t&&(Q+='<row id="'+Ea+'">'+t+"</row>",Ea++);n++});Q+="</data></tabledata>";
|
||||
if("string"===a.outputMode)return Q;if("base64"===a.outputMode)return K(Q);M(Q,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===a.type&&"xmlss"===a.mso.fileFormat){var ra=[],F=[];c(C).filter(function(){return I(c(this))}).each(function(){function b(a,b,d){var f=[];c(a).each(function(){var b=0,e=0;t="";B(this,"td,th",n,d+a.length,function(a,d,l){if(null!==a){var h="";d=E(a,d,l);l="String";if(!1!==jQuery.isNumeric(d))l="Number";else{var g=Ma(d);!1!==g&&(d=g,l="Number",h+=' ss:StyleID="pct1"')}"Number"!==
|
||||
l&&(d=d.replace(/\n/g,"<br>"));g=O(a);a=U(a);c.each(f,function(){if(n>=this.s.r&&n<=this.e.r&&e>=this.s.c&&e<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)e++,b++});if(a||g)a=a||1,g=g||1,f.push({s:{r:n,c:e},e:{r:n+a-1,c:e+g-1}});1<g&&(h+=' ss:MergeAcross="'+(g-1)+'"',e+=g-1);1<a&&(h+=' ss:MergeDown="'+(a-1)+'" ss:StyleID="rsp1"');0<b&&(h+=' ss:Index="'+(e+1)+'"',b=0);t+="<Cell"+h+'><Data ss:Type="'+l+'">'+c("<div />").text(d).html()+"</Data></Cell>\r";e++}});0<t.length&&(H+='<Row ss:AutoFitHeight="0">\r'+
|
||||
t+"</Row>\r");n++});return a.length}var d=c(this),e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(F.length+1):"undefined"!==typeof a.mso.worksheetName[F.length]&&(e=a.mso.worksheetName[F.length]);e.length||(e=d.find("caption").text()||"");e.length||(e="Table "+(F.length+1));e=c.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));F.push(c("<div />").text(e).html());!1===a.exportHiddenCells&&(J=d.find("tr, th, td").filter(":hidden"),V=0<J.length);
|
||||
n=0;T=S(this);H="<Table>\r";e=b(y(d),"th,td",0);b(v(d),"td,th",e);H+="</Table>\r";ra.push(H)});k={};r={};for(var m,R,Y=0,da=F.length;Y<da;Y++)m=F[Y],R=k[m],R=k[m]=null==R?1:R+1,2===R&&(F[r[m]]=F[r[m]].substring(0,29)+"-1"),1<k[m]?F[Y]=F[Y].substring(0,29)+"-"+k[m]:r[m]=Y;k='<?xml version="1.0" encoding="UTF-8"?>\r<?mso-application progid="Excel.Sheet"?>\r<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:o="urn:schemas-microsoft-com:office:office"\r xmlns:x="urn:schemas-microsoft-com:office:excel"\r xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:html="http://www.w3.org/TR/REC-html40">\r<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">\r <Created>'+
|
||||
(new Date).toISOString()+'</Created>\r</DocumentProperties>\r<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">\r <AllowPNG/>\r</OfficeDocumentSettings>\r<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">\r <WindowHeight>9000</WindowHeight>\r <WindowWidth>13860</WindowWidth>\r <WindowTopX>0</WindowTopX>\r <WindowTopY>0</WindowTopY>\r <ProtectStructure>False</ProtectStructure>\r <ProtectWindows>False</ProtectWindows>\r</ExcelWorkbook>\r<Styles>\r <Style ss:ID="Default" ss:Name="Normal">\r <Alignment ss:Vertical="Bottom"/>\r <Borders/>\r <Font/>\r <Interior/>\r <NumberFormat/>\r <Protection/>\r </Style>\r <Style ss:ID="rsp1">\r <Alignment ss:Vertical="Center"/>\r </Style>\r <Style ss:ID="pct1">\r <NumberFormat ss:Format="Percent"/>\r </Style>\r</Styles>\r';
|
||||
for(r=0;r<ra.length;r++)k+='<Worksheet ss:Name="'+F[r]+'" ss:RightToLeft="'+(a.mso.rtl?"1":"0")+'">\r'+ra[r],k=a.mso.rtl?k+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\r<DisplayRightToLeft/>\r</WorksheetOptions>\r':k+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"/>\r',k+="</Worksheet>\r";k+="</Workbook>\r";if("string"===a.outputMode)return k;if("base64"===a.outputMode)return K(k);M(k,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===
|
||||
a.type&&"xlsx"===a.mso.fileFormat){var aa=[],Fa=XLSX.utils.book_new();c(C).filter(function(){return I(c(this))}).each(function(){for(var b=c(this),d={},e=this.getElementsByTagName("tr"),g={s:{r:0,c:0},e:{r:0,c:0}},f=[],l,q=[],h=0,k=0,m,n,t,u,r,w=XLSX.SSF.get_table();h<e.length&&1E7>k;++h)if(m=e[h],n=!1,"function"===typeof a.onIgnoreRow&&(n=a.onIgnoreRow(c(m),h)),!0!==n&&(0===a.ignoreRow.length||-1===c.inArray(h,a.ignoreRow)&&-1===c.inArray(h-e.length,a.ignoreRow))&&!1!==I(c(m))){var y=m.children,
|
||||
C=0;for(m=0;m<y.length;++m)r=y[m],u=+O(r)||1,C+=u;var A=0;for(m=n=0;m<y.length;++m)if(r=y[m],u=+O(r)||1,l=m+A,!sa(c(r),C,l+(l<n?n-l:0))){A+=u-1;for(l=0;l<f.length;++l){var v=f[l];v.s.c==n&&v.s.r<=k&&k<=v.e.r&&(n=v.e.c+1,l=-1)}(0<(t=+U(r))||1<u)&&f.push({s:{r:k,c:n},e:{r:k+(t||1)-1,c:n+u-1}});var D={type:""};l=E(r,h,m+A,D);v={t:"s",v:l};var B="";if(""!==c(r).attr("data-tableexport-cellformat")){var x=parseInt(c(r).attr("data-tableexport-xlsxformatid")||0);0===x&&"function"===typeof a.mso.xslx.formatId.numbers&&
|
||||
(x=a.mso.xslx.formatId.numbers(c(r),h,m+A));0===x&&"function"===typeof a.mso.xslx.formatId.date&&(x=a.mso.xslx.formatId.date(c(r),h,m+A));if(49===x||"@"===x)B="s";else if("number"===D.type||0<x&&14>x||36<x&&41>x||48===x)B="n";else if("date"===D.type||13<x&&37>x||44<x&&48>x||56===x)B="d"}else B="s";if(null!=l)if(0===l.length)v.t=B||"z";else if(0!==l.trim().length&&"s"!==B)if("function"===D.type)v={f:l};else if("TRUE"===l)v={t:"b",v:!0};else if("FALSE"===l)v={t:"b",v:!1};else if(""===B&&c(r).find("a").length)l=
|
||||
"href"!==a.htmlHyperlink?l:"",v={f:'=HYPERLINK("'+c(r).find("a").attr("href")+(l.length?'","'+l:"")+'")'};else if("n"===B||isFinite(Ca(l,a.numbers.output))){if(r=Ca(l,a.numbers.output),0===x&&"function"!==typeof a.mso.xslx.formatId.numbers&&(x=a.mso.xslx.formatId.numbers),isFinite(r)||isFinite(l))v={t:"n",v:isFinite(r)?r:l,z:"string"===typeof x?x:x in w?w[x]:"0.00"}}else if(!1!==(r=La(l))||"d"===B)0===x&&"function"!==typeof a.mso.xslx.formatId.date&&(x=a.mso.xslx.formatId.date),v={t:"d",v:!1!==r?
|
||||
r:l,z:"string"===typeof x?x:x in w?w[x]:"m/d/yy"};d[na({c:n,r:k})]=v;g.e.c<n&&(g.e.c=n);n+=u}++k}f.length&&(d["!merges"]=f);q.length&&(d["!rows"]=q);g.e.r=k-1;d["!ref"]=oa(g);1E7<=k&&(d["!fullref"]=oa((g.e.r=e.length-h+k-1,g)));e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(aa.length+1):"undefined"!==typeof a.mso.worksheetName[aa.length]&&(e=a.mso.worksheetName[aa.length]);e.length||(e=b.find("caption").text()||"");e.length||(e="Table "+(aa.length+
|
||||
1));e=c.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));aa.push(e);XLSX.utils.book_append_sheet(Fa,d,e)});k=XLSX.write(Fa,{type:"binary",bookType:a.mso.fileFormat,bookSST:!1});M(Oa(k),a.fileName+"."+a.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","UTF-8","",!1)}else if("excel"===a.type||"xls"===a.type||"word"===a.type||"doc"===a.type){k="excel"===a.type||"xls"===a.type?"excel":"word";r="excel"===k?"xls":"doc";m='xmlns:x="urn:schemas-microsoft-com:office:'+
|
||||
k+'"';var H="",ba="";c(C).filter(function(){return I(c(this))}).each(function(){var b=c(this);""===ba&&(ba=a.mso.worksheetName||b.find("caption").text()||"Table",ba=c.trim(ba.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===a.exportHiddenCells&&(J=b.find("tr, th, td").filter(":hidden"),V=0<J.length);n=0;G=[];T=S(this);H+="<table><thead>";u=y(b);c(u).each(function(){var b=c(this);t="";B(this,"th,td",n,u.length,function(c,d,f){if(null!==c){var e="";t+="<th";if(a.mso.styles.length){var g=document.defaultView.getComputedStyle(c,
|
||||
null),h=document.defaultView.getComputedStyle(b[0],null),k;for(k in a.mso.styles){var m=g[a.mso.styles[k]];""===m&&(m=h[a.mso.styles[k]]);""!==m&&"0px none rgb(0, 0, 0)"!==m&&"rgba(0, 0, 0, 0)"!==m&&(e+=""===e?'style="':";",e+=a.mso.styles[k]+":"+m)}}""!==e&&(t+=" "+e+'"');e=O(c);0<e&&(t+=' colspan="'+e+'"');e=U(c);0<e&&(t+=' rowspan="'+e+'"');t+=">"+E(c,d,f)+"</th>"}});0<t.length&&(H+="<tr>"+t+"</tr>");n++});H+="</thead><tbody>";w=v(b);c(w).each(function(){var b=c(this);t="";B(this,"td,th",n,u.length+
|
||||
w.length,function(d,g,f){if(null!==d){var e=E(d,g,f),q="",h=c(d).attr("data-tableexport-msonumberformat");"undefined"===typeof h&&"function"===typeof a.mso.onMsoNumberFormat&&(h=a.mso.onMsoNumberFormat(d,g,f));"undefined"!==typeof h&&""!==h&&(q="style=\"mso-number-format:'"+h+"'");if(a.mso.styles.length){g=document.defaultView.getComputedStyle(d,null);f=document.defaultView.getComputedStyle(b[0],null);for(var k in a.mso.styles)h=g[a.mso.styles[k]],""===h&&(h=f[a.mso.styles[k]]),""!==h&&"0px none rgb(0, 0, 0)"!==
|
||||
h&&"rgba(0, 0, 0, 0)"!==h&&(q+=""===q?'style="':";",q+=a.mso.styles[k]+":"+h)}t+="<td";""!==q&&(t+=" "+q+'"');q=O(d);0<q&&(t+=' colspan="'+q+'"');d=U(d);0<d&&(t+=' rowspan="'+d+'"');"string"===typeof e&&""!==e&&(e=Aa(e),e=e.replace(/\n/g,"<br>"));t+=">"+e+"</td>"}});0<t.length&&(H+="<tr>"+t+"</tr>");n++});a.displayTableName&&(H+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+E(c("<p>"+a.tableName+"</p>"))+"</td></tr>");H+="</tbody></table>"});m='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+
|
||||
m+' xmlns="http://www.w3.org/TR/REC-html40">'+('<meta http-equiv="content-type" content="application/vnd.ms-'+k+'; charset=UTF-8">');m+="<head>";"excel"===k&&(m+="\x3c!--[if gte mso 9]>",m+="<xml>",m+="<x:ExcelWorkbook>",m+="<x:ExcelWorksheets>",m+="<x:ExcelWorksheet>",m+="<x:Name>",m+=ba,m+="</x:Name>",m+="<x:WorksheetOptions>",m+="<x:DisplayGridlines/>",a.mso.rtl&&(m+="<x:DisplayRightToLeft/>"),m+="</x:WorksheetOptions>",m+="</x:ExcelWorksheet>",m+="</x:ExcelWorksheets>",m+="</x:ExcelWorkbook>",
|
||||
m+="</xml>",m+="<![endif]--\x3e");m+="<style>";m+="@page { size:"+a.mso.pageOrientation+"; mso-page-orientation:"+a.mso.pageOrientation+"; }";m+="@page Section1 {size:"+N[a.mso.pageFormat][0]+"pt "+N[a.mso.pageFormat][1]+"pt";m+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";m+="div.Section1 {page:Section1;}";m+="@page Section2 {size:"+N[a.mso.pageFormat][1]+"pt "+N[a.mso.pageFormat][0]+"pt";m+=";mso-page-orientation:"+a.mso.pageOrientation+
|
||||
";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";m+="div.Section2 {page:Section2;}";m+="br {mso-data-placement:same-cell;}";m+="</style>";m+="</head>";m+="<body>";m+='<div class="Section'+("landscape"===a.mso.pageOrientation?"2":"1")+'">';m+=H;m+="</div>";m+="</body>";m+="</html>";if("string"===a.outputMode)return m;if("base64"===a.outputMode)return K(m);M(m,a.fileName+"."+r,"application/vnd.ms-"+k,"","base64",!1)}else if("png"===a.type)html2canvas(c(C)[0]).then(function(b){b=
|
||||
b.toDataURL();for(var c=atob(b.substring(22)),e=new ArrayBuffer(c.length),g=new Uint8Array(e),f=0;f<c.length;f++)g[f]=c.charCodeAt(f);if("string"===a.outputMode)return c;if("base64"===a.outputMode)return K(b);"window"===a.outputMode?window.open(b):M(e,a.fileName+".png","image/png","","",!1)});else if("pdf"===a.type)if(!0===a.pdfmake.enabled){k=[];var Ga=[];n=0;G=[];r=function(a,d,e){var b=0;c(a).each(function(){var a=[];B(this,d,n,e,function(b,c,d){if("undefined"!==typeof b&&null!==b){var e=O(b),
|
||||
f=U(b);b=E(b,c,d)||" ";1<e||1<f?a.push({colSpan:e||1,rowSpan:f||1,text:b}):a.push(b)}else a.push(" ")});a.length&&Ga.push(a);b<a.length&&(b=a.length);n++});return b};u=y(c(this));m=r(u,"th,td",u.length);for(R=k.length;R<m;R++)k.push("*");w=v(c(this));r(w,"th,td",u.length+w.length);k={content:[{table:{headerRows:u.length,widths:k,body:Ga}}]};c.extend(!0,k,a.pdfmake.docDefinition);pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};
|
||||
c.extend(!0,pdfMake.fonts,a.pdfmake.fonts);pdfMake.createPdf(k).getBuffer(function(b){M(b,a.fileName+".pdf","application/pdf","","",!1)})}else if(!1===a.jspdf.autotable){k={dim:{w:fa(c(C).first().get(0),"width","mm"),h:fa(c(C).first().get(0),"height","mm")},pagesplit:!1};var Ha=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format);Ha.addHTML(c(C).first(),a.jspdf.margins.left,a.jspdf.margins.top,k,function(){ua(Ha,!1)})}else{var g=a.jspdf.autotable.tableExport;if("string"===typeof a.jspdf.format&&
|
||||
"bestfit"===a.jspdf.format.toLowerCase()){var ia="",ca="",Ia=0;c(C).each(function(){if(I(c(this))){var a=fa(c(this).get(0),"width","pt");if(a>Ia){a>N.a0[0]&&(ia="a0",ca="l");for(var d in N)N.hasOwnProperty(d)&&N[d][1]>a&&(ia=d,ca="l",N[d][0]>a&&(ca="p"));Ia=a}}});a.jspdf.format=""===ia?"a4":ia;a.jspdf.orientation=""===ca?"w":ca}if(null==g.doc&&(g.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),g.wScaleFactor=1,g.hScaleFactor=1,"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(g.doc);
|
||||
!0===g.outputImages&&(g.images={});"undefined"!==typeof g.images&&(c(C).filter(function(){return I(c(this))}).each(function(){var b=0;G=[];!1===a.exportHiddenCells&&(J=c(this).find("tr, th, td").filter(":hidden"),V=0<J.length);u=y(c(this));w=v(c(this));c(w).each(function(){B(this,"td,th",u.length+b,u.length+w.length,function(a){wa(a,c(a).children(),g)});b++})}),u=[],w=[]);Ka(g,function(){c(C).filter(function(){return I(c(this))}).each(function(){var b;n=0;G=[];!1===a.exportHiddenCells&&(J=c(this).find("tr, th, td").filter(":hidden"),
|
||||
V=0<J.length);T=S(this);g.columns=[];g.rows=[];g.teCells={};if("function"===typeof g.onTable&&!1===g.onTable(c(this),a))return!0;a.jspdf.autotable.tableExport=null;var d=c.extend(!0,{},a.jspdf.autotable);a.jspdf.autotable.tableExport=g;d.margin={};c.extend(!0,d.margin,a.jspdf.margins);d.tableExport=g;"function"!==typeof d.beforePageContent&&(d.beforePageContent=function(a){if(1===a.pageCount){var b=a.table.rows.concat(a.table.headerRow);c.each(b,function(){0<this.height&&(this.height+=(2-1.15)/2*
|
||||
this.styles.fontSize,a.table.height+=(2-1.15)/2*this.styles.fontSize)})}});"function"!==typeof d.createdHeaderCell&&(d.createdHeaderCell=function(a,b){a.styles=c.extend({},b.row.styles);if("undefined"!==typeof g.columns[b.column.dataKey]){var e=g.columns[b.column.dataKey];if("undefined"!==typeof e.rect){a.contentWidth=e.rect.width;if("undefined"===typeof g.heightRatio||0===g.heightRatio){var f=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:
|
||||
b.row.raw[b.column.dataKey].rect.height;g.heightRatio=a.styles.rowHeight/f}f=b.row.raw[b.column.dataKey].rect.height*g.heightRatio;f>a.styles.rowHeight&&(a.styles.rowHeight=f)}a.styles.halign="inherit"===d.headerStyles.halign?"center":d.headerStyles.halign;a.styles.valign=d.headerStyles.valign;"undefined"!==typeof e.style&&!0!==e.style.hidden&&("inherit"===d.headerStyles.halign&&(a.styles.halign=e.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=e.style.bcolor),"inherit"===d.styles.textColor&&
|
||||
(a.styles.textColor=e.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=e.style.fstyle))}});"function"!==typeof d.createdCell&&(d.createdCell=function(a,b){b=g.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===d.styles.halign?"center":d.styles.halign;a.styles.valign=d.styles.valign;"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===d.styles.halign&&(a.styles.halign=b.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=
|
||||
b.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof d.drawHeaderCell&&(d.drawHeaderCell=function(a,b){var c=g.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?va(a,b,c):!1});"function"!==typeof d.drawCell&&(d.drawCell=function(a,b){var d=g.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof d&&d.isCanvas))va(a,
|
||||
b,d)&&(g.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"===typeof d||"undefined"!==typeof d.hasUserDefText&&!0===d.hasUserDefText||"undefined"===typeof d.elements||!d.elements.length?za(a,{},g):(b=a.height/d.rect.height,b>g.hScaleFactor&&(g.hScaleFactor=b),g.wScaleFactor=a.width/d.rect.width,b=a.textPos.y,ya(a,d.elements,g),a.textPos.y=b,za(a,d.elements,g)));else{d=d.elements[0];var e=c(d).attr("data-tableexport-canvas"),f=d.getBoundingClientRect();a.width=f.width*g.wScaleFactor;
|
||||
a.height=f.height*g.hScaleFactor;b.row.height=a.height;ta(a,d,e,g)}return!1});g.headerrows=[];u=y(c(this));c(u).each(function(){b=0;g.headerrows[n]=[];B(this,"th,td",n,u.length,function(a,c,d){var e=Ba(a);e.title=E(a,c,d);e.key=b++;e.rowIndex=n;g.headerrows[n].push(e)});n++});if(0<n)for(var e=n-1;0<=e;)c.each(g.headerrows[e],function(){var a=this;0<e&&null===this.rect&&(a=g.headerrows[e-1][this.key]);null!==a&&0<=a.rowIndex&&(!0!==a.style.hasOwnProperty("hidden")||!0!==a.style.hidden)&&g.columns.push(a)}),
|
||||
e=0<g.columns.length?-1:e-1;var k=0;w=[];w=v(c(this));c(w).each(function(){var a=[];b=0;B(this,"td,th",n,u.length+w.length,function(d,e,f){if("undefined"===typeof g.columns[b]){var h={title:"",key:b,style:{hidden:!0}};g.columns.push(h)}a.push(E(d,e,f));"undefined"!==typeof d&&null!==d?(h=Ba(d),h.isCanvas=d.hasAttribute("data-tableexport-canvas"),h.elements=h.isCanvas?c(d):c(d).children(),"undefined"!==typeof c(d).data("teUserDefText")&&(h.hasUserDefText=!0)):(h=c.extend(!0,{},g.teCells[k+":"+(b-1)]),
|
||||
h.colspan=-1);g.teCells[k+":"+b++]=h});a.length&&(g.rows.push(a),k++);n++});if("function"===typeof g.onBeforeAutotable)g.onBeforeAutotable(c(this),g.columns,g.rows,d);g.doc.autoTable(g.columns,g.rows,d);if("function"===typeof g.onAfterAutotable)g.onAfterAutotable(c(this),d);a.jspdf.autotable.startY=g.doc.autoTableEndPosY()+d.margin.top});ua(g.doc,"undefined"!==typeof g.images&&!1===jQuery.isEmptyObject(g.images));"undefined"!==typeof g.headerrows&&(g.headerrows.length=0);"undefined"!==typeof g.columns&&
|
||||
(g.columns.length=0);"undefined"!==typeof g.rows&&(g.rows.length=0);delete g.doc;g.doc=null})}if("function"===typeof a.onTableExportEnd)a.onTableExportEnd();return this}})(jQuery);
|
File diff suppressed because one or more lines are too long
@ -1,323 +0,0 @@
|
||||
/*
|
||||
* jQuery UI Monthpicker
|
||||
*
|
||||
* @licensed MIT <see below>
|
||||
* @licensed GPL <see below>
|
||||
*
|
||||
* @author Luciano Costa
|
||||
* http://lucianocosta.info/jquery.mtz.monthpicker/
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.core.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* MIT License
|
||||
* Copyright (c) 2011, Luciano Costa
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* GPL LIcense
|
||||
* Copyright (c) 2011, Luciano Costa
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
;(function ($) {
|
||||
|
||||
var methods = {
|
||||
init : function (options) {
|
||||
return this.each(function () {
|
||||
var
|
||||
$this = $(this),
|
||||
data = $this.data('monthpicker'),
|
||||
year = (options && options.year) ? options.year : (new Date()).getFullYear(),
|
||||
settings = $.extend({
|
||||
pattern: 'mm/yyyy',
|
||||
selectedMonth: null,
|
||||
selectedMonthName: '',
|
||||
selectedYear: year,
|
||||
startYear: year - 10,
|
||||
finalYear: year + 10,
|
||||
monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
id: "monthpicker_" + (Math.random() * Math.random()).toString().replace('.', ''),
|
||||
openOnFocus: true,
|
||||
disabledMonths: []
|
||||
}, options);
|
||||
|
||||
settings.dateSeparator = settings.pattern.replace(/(mmm|mm|m|yyyy|yy|y)/ig,'');
|
||||
|
||||
// If the plugin hasn't been initialized yet for this element
|
||||
if (!data) {
|
||||
|
||||
$(this).data('monthpicker', {
|
||||
'target': $this,
|
||||
'settings': settings
|
||||
});
|
||||
|
||||
if (settings.openOnFocus === true) {
|
||||
$this.on('focus', function () {
|
||||
$this.monthpicker('show');
|
||||
});
|
||||
}
|
||||
|
||||
$this.monthpicker('parseInputValue', settings);
|
||||
|
||||
$this.monthpicker('mountWidget', settings);
|
||||
|
||||
$this.on('monthpicker-click-month', function (e, month, year) {
|
||||
$this.monthpicker('setValue', settings);
|
||||
$this.monthpicker('hide');
|
||||
});
|
||||
|
||||
// hide widget when user clicks elsewhere on page
|
||||
$this.addClass("mtz-monthpicker-widgetcontainer");
|
||||
$(document).unbind("mousedown.mtzmonthpicker").on("mousedown.mtzmonthpicker", function (e) {
|
||||
if (!e.target.className || e.target.className.toString().indexOf('mtz-monthpicker') < 0) {
|
||||
$(this).monthpicker('hideAll');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
show: function () {
|
||||
$(this).monthpicker('hideAll');
|
||||
var widget = $('#' + this.data('monthpicker').settings.id);
|
||||
widget.css("top", this.offset().top + this.outerHeight());
|
||||
if ($(window).width() > (widget.width() + this.offset().left) ){
|
||||
widget.css("left", this.offset().left);
|
||||
} else {
|
||||
widget.css("left", this.offset().left - widget.width());
|
||||
}
|
||||
widget.show();
|
||||
widget.find('select').focus();
|
||||
this.trigger('monthpicker-show');
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
var widget = $('#' + this.data('monthpicker').settings.id);
|
||||
if (widget.is(':visible')) {
|
||||
widget.hide();
|
||||
this.trigger('monthpicker-hide');
|
||||
}
|
||||
},
|
||||
|
||||
hideAll: function () {
|
||||
$(".mtz-monthpicker-widgetcontainer").each(function () {
|
||||
if (typeof($(this).data("monthpicker"))!="undefined") {
|
||||
$(this).monthpicker('hide');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setValue: function (settings) {
|
||||
var
|
||||
month = settings.selectedMonth,
|
||||
year = settings.selectedYear;
|
||||
|
||||
if(settings.pattern.indexOf('mmm') >= 0) {
|
||||
month = settings.selectedMonthName;
|
||||
} else if(settings.pattern.indexOf('mm') >= 0 && settings.selectedMonth < 10) {
|
||||
month = '0' + settings.selectedMonth;
|
||||
}
|
||||
|
||||
if(settings.pattern.indexOf('yyyy') < 0) {
|
||||
year = year.toString().substr(2,2);
|
||||
}
|
||||
|
||||
if (settings.pattern.indexOf('y') > settings.pattern.indexOf(settings.dateSeparator)) {
|
||||
this.val(month + settings.dateSeparator + year);
|
||||
} else {
|
||||
this.val(year + settings.dateSeparator + month);
|
||||
}
|
||||
|
||||
this.change();
|
||||
},
|
||||
|
||||
disableMonths: function (months) {
|
||||
var
|
||||
settings = this.data('monthpicker').settings,
|
||||
container = $('#' + settings.id);
|
||||
|
||||
settings.disabledMonths = months;
|
||||
|
||||
container.find('.mtz-monthpicker-month').each(function () {
|
||||
var m = parseInt($(this).data('month'));
|
||||
if ($.inArray(m, months) >= 0) {
|
||||
$(this).addClass('ui-state-disabled');
|
||||
} else {
|
||||
$(this).removeClass('ui-state-disabled');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mountWidget: function (settings) {
|
||||
var
|
||||
monthpicker = this,
|
||||
container = $('<div id="'+ settings.id +'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" />'),
|
||||
header = $('<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all mtz-monthpicker" />'),
|
||||
combo = $('<select class="mtz-monthpicker mtz-monthpicker-year" />'),
|
||||
table = $('<table class="mtz-monthpicker" />'),
|
||||
tbody = $('<tbody class="mtz-monthpicker" />'),
|
||||
tr = $('<tr class="mtz-monthpicker" />'),
|
||||
td = '',
|
||||
selectedYear = settings.selectedYear,
|
||||
option = null,
|
||||
attrSelectedYear = $(this).data('selected-year'),
|
||||
attrStartYear = $(this).data('start-year'),
|
||||
attrFinalYear = $(this).data('final-year');
|
||||
|
||||
if (attrSelectedYear) {
|
||||
settings.selectedYear = attrSelectedYear;
|
||||
}
|
||||
|
||||
if (attrStartYear) {
|
||||
settings.startYear = attrStartYear;
|
||||
}
|
||||
|
||||
if (attrFinalYear) {
|
||||
settings.finalYear = attrFinalYear;
|
||||
}
|
||||
|
||||
container.css({
|
||||
position:'absolute',
|
||||
zIndex:999999,
|
||||
whiteSpace:'nowrap',
|
||||
width:'250px',
|
||||
overflow:'hidden',
|
||||
textAlign:'center',
|
||||
display:'none',
|
||||
top: monthpicker.offset().top + monthpicker.outerHeight(),
|
||||
left: monthpicker.offset().left
|
||||
});
|
||||
|
||||
combo.on('change', function () {
|
||||
var months = $(this).parent().parent().find('td[data-month]');
|
||||
months.removeClass('ui-state-active');
|
||||
if ($(this).val() == settings.selectedYear) {
|
||||
months.filter('td[data-month='+ settings.selectedMonth +']').addClass('ui-state-active');
|
||||
}
|
||||
monthpicker.trigger('monthpicker-change-year', $(this).val());
|
||||
});
|
||||
|
||||
// mount years combo
|
||||
for (var i = settings.startYear; i <= settings.finalYear; i++) {
|
||||
var option = $('<option class="mtz-monthpicker" />').attr('value', i).append(i);
|
||||
if (settings.selectedYear == i) {
|
||||
option.attr('selected', 'selected');
|
||||
}
|
||||
combo.append(option);
|
||||
}
|
||||
header.append(combo).appendTo(container);
|
||||
|
||||
// mount months table
|
||||
for (var i=1; i<=12; i++) {
|
||||
td = $('<td class="ui-state-default mtz-monthpicker mtz-monthpicker-month" style="padding:5px;cursor:pointer;" />').attr('data-month',i);
|
||||
if (settings.selectedMonth == i) {
|
||||
td.addClass('ui-state-active');
|
||||
}
|
||||
td.append(settings.monthNames[i-1]);
|
||||
tr.append(td).appendTo(tbody);
|
||||
if (i % 3 === 0) {
|
||||
tr = $('<tr class="mtz-monthpicker" />');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tbody.find('.mtz-monthpicker-month').on({
|
||||
'click' : function () {
|
||||
var m = parseInt($(this).data('month'));
|
||||
if ($.inArray(m, settings.disabledMonths) < 0 ) {
|
||||
settings.selectedYear = $(this).closest('.ui-datepicker').find('.mtz-monthpicker-year').first().val();
|
||||
settings.selectedMonth = $(this).data('month');
|
||||
settings.selectedMonthName = $(this).text();
|
||||
monthpicker.trigger('monthpicker-click-month', $(this).data('month'));
|
||||
$(this).closest('table').find('.ui-state-active').removeClass('ui-state-active');
|
||||
$(this).addClass('ui-state-active');
|
||||
}
|
||||
},
|
||||
'mouseenter' : function( event ) {
|
||||
$( event.currentTarget ).addClass( "ui-state-hover" );
|
||||
},
|
||||
'mouseleave' : function( event ) {
|
||||
$( event.currentTarget ).removeClass( "ui-state-hover" );
|
||||
}
|
||||
});
|
||||
|
||||
table.append(tbody).appendTo(container);
|
||||
|
||||
container.appendTo('body');
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
return this.each(function () {
|
||||
$(this).removeClass('mtz-monthpicker-widgetcontainer').unbind('focus').removeData('monthpicker');
|
||||
});
|
||||
},
|
||||
|
||||
getDate: function () {
|
||||
var settings = this.data('monthpicker').settings;
|
||||
if (settings.selectedMonth && settings.selectedYear) {
|
||||
return new Date(settings.selectedYear, settings.selectedMonth -1);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
parseInputValue: function (settings) {
|
||||
if (this.val()) {
|
||||
if (settings.dateSeparator) {
|
||||
var val = this.val().toString().split(settings.dateSeparator);
|
||||
if (settings.pattern.indexOf('m') === 0) {
|
||||
settings.selectedMonth = val[0];
|
||||
settings.selectedYear = val[1];
|
||||
} else {
|
||||
settings.selectedMonth = val[1];
|
||||
settings.selectedYear = val[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.monthpicker = function (method) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call( arguments, 1 ));
|
||||
} else if (typeof method === 'object' || ! method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
} else {
|
||||
$.error('Method ' + method + ' does not exist on jQuery.mtz.monthpicker');
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
@ -1,404 +0,0 @@
|
||||
|
||||
/**
|
||||
* XitFrame 공통 Util
|
||||
*/
|
||||
|
||||
var XitCmmnUtil = {
|
||||
/* ===================================
|
||||
* 동적 Form 생성
|
||||
* -설명: 객체에 담긴 key,value를 form으로 생성하여 반환
|
||||
* @author 박민규
|
||||
=================================== */
|
||||
createForm : function(obj){
|
||||
var form = document.createElement("form");
|
||||
|
||||
for(key in obj){
|
||||
var param = document.createElement('input');
|
||||
param.setAttribute('type', 'hidden');
|
||||
param.setAttribute('name', key);
|
||||
param.setAttribute('value', obj[key]);
|
||||
form.appendChild(param);
|
||||
}
|
||||
|
||||
return form;
|
||||
},
|
||||
|
||||
|
||||
/*===================================
|
||||
* 엑셀 export
|
||||
* -설명: SheetJS를 이용한 Excel export
|
||||
* -참조: https://github.com/hhurz/tableExport.jquery.plugin
|
||||
* https://www.npmjs.com/package/tableexport.jquery.plugin
|
||||
* @author 박민규
|
||||
*
|
||||
* [Options]
|
||||
* TableExport(document.getElementsByTagName("table"), {
|
||||
* headers: true, // (Boolean), display table headers (th or td elements) in the <thead>, (default: true)
|
||||
* footers: true, // (Boolean), display table footers (th or td elements) in the <tfoot>, (default: false)
|
||||
* formats: ["xls", "csv", "txt"], // (String[]), filetype(s) for the export, (default: ['xls', 'csv', 'txt'])
|
||||
* filename: "id", // (id, String), filename for the downloaded file, (default: 'id')
|
||||
* bootstrap: false, // (Boolean), style buttons using bootstrap, (default: true)
|
||||
* exportButtons: true, // (Boolean), automatically generate the built-in export buttons for each of the specified formats (default: true)
|
||||
* position: "bottom", // (top, bottom), position of the caption element relative to table, (default: 'bottom')
|
||||
* ignoreRows: null, // (Number, Number[]), row indices to exclude from the exported file(s) (default: null)
|
||||
* ignoreCols: null, // (Number, Number[]), column indices to exclude from the exported file(s) (default: null)
|
||||
* trimWhitespace: true // (Boolean), remove all leading/trailing newlines, spaces, and tabs from cell text in the exported file(s) (default: false)
|
||||
* });
|
||||
===================================*/
|
||||
excelExport : function(fileName){
|
||||
//selector 설정
|
||||
var _sltHead = '#div_thead';
|
||||
var _sltBody = '#div_tbody';
|
||||
var _sltFoot = '#div_tfoot';
|
||||
var _htmlColgroup = $('#div_thead > table > colgroup').html();;
|
||||
var _htmlHead = $(_sltHead+' > table > thead').html();
|
||||
var _htmlBody = $(_sltBody+' > table > tbody').html();
|
||||
|
||||
|
||||
//필수조건 확인
|
||||
if($(_sltHead).length==0){
|
||||
alert('헤더 데이터는 필수조건 입니다.');
|
||||
return false;
|
||||
}
|
||||
if($(_sltBody).length==0){
|
||||
alert('바디 데이터는 필수조건 입니다.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//소유자번호 유무 확인
|
||||
var arrCellsOfOwnerNo = new Array();
|
||||
$(_sltHead+' table tr:last-child th').each(function(){
|
||||
if(this.innerHTML.indexOf('주민번호')>-1
|
||||
||this.innerHTML.indexOf('주민등록번호')>-1
|
||||
||this.innerHTML.indexOf('소유자번호')>-1
|
||||
||this.innerHTML.indexOf('소유자주민번호')>-1
|
||||
||this.innerHTML.indexOf('주민/법인번호')>-1
|
||||
)
|
||||
arrCellsOfOwnerNo.push(this.cellIndex);
|
||||
});
|
||||
//소유자번호 마스킹 처리
|
||||
if(arrCellsOfOwnerNo.length>0){
|
||||
var isMask = confirm('개인정보를 마스킹처리 하시겠습니까?');
|
||||
var _maskBody = '';
|
||||
$(_htmlBody).each(function(){
|
||||
var row = this;
|
||||
arrCellsOfOwnerNo.forEach(function(cellIdx){
|
||||
var cell = $(row).find('td:eq('+cellIdx+')').text();
|
||||
$(row).find('td:eq('+cellIdx+')').text(nvl(cell).fmtJuminNo(isMask));
|
||||
});
|
||||
_maskBody += '<tr>'+$(row).html()+'</tr>';
|
||||
});
|
||||
_htmlBody = _maskBody;
|
||||
}
|
||||
|
||||
|
||||
//파일명 설정
|
||||
if(fileName==undefined || fileName==null || fileName=='')
|
||||
fileName = $('#docTitleNm').text();
|
||||
|
||||
//테이블 설정
|
||||
var colgroup = '<colgroup>'+ _htmlColgroup +'</colgroup>';
|
||||
var thead = '<thead>'+ _htmlHead +'</thead>';
|
||||
var tbody = '<tbody>'+ _htmlBody +'</tbody>';
|
||||
if($(_sltBody+' > table > tfoot').length>0)
|
||||
tbody += '<tfoot>'+$(_sltBody+' > table > tfoot').html()+'</tfoot>';
|
||||
var tfoot = $(_sltFoot).length==0?'':'<tfoot>'+$(_sltFoot+' > table > tfoot').html()+'</tfoot>';
|
||||
var table = '<table>'+colgroup+thead+tbody+tfoot+'</table>';
|
||||
|
||||
ExcelUtil.download(table, fileName);
|
||||
|
||||
},
|
||||
|
||||
pdfExport : function(fileName, selector){
|
||||
//pdf_wrap을 canvas객체로 변환
|
||||
html2canvas($(selector)[0]).then(function(canvas) {
|
||||
var doc = new jsPDF('p', 'mm', 'a4'); //jspdf객체 생성
|
||||
var imgData = canvas.toDataURL('image/png'); //캔버스를 이미지로 변환
|
||||
doc.addImage(imgData, 'PNG', 0, 0, doc.internal.pageSize.getWidth(), doc.internal.pageSize.getHeight()); //이미지를 기반으로 pdf생성
|
||||
doc.addPage();
|
||||
doc.save(fileName+'.pdf'); //pdf저장
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
wordExport : function(fileName){
|
||||
|
||||
},
|
||||
|
||||
pptExport : function(fileName){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* ajax 실행
|
||||
* ex)
|
||||
* cmmAjax({
|
||||
* url: "<c:url value='/biz/prd/dealer/dealerList.do' />"
|
||||
* ,data: {
|
||||
* DLR_ID : $("#dealerSelect_dlrId").val()
|
||||
* ,DLR_NM : $("#dealerSelect_dlrNm").val()
|
||||
* }
|
||||
* ,success: (response)=>{ //선택
|
||||
* //callback function
|
||||
* }
|
||||
* ,exception: (response)=>{ //선택
|
||||
* // callback function
|
||||
* }
|
||||
* });
|
||||
* @param {object} param
|
||||
* </pre>
|
||||
*/
|
||||
const cmmAjax = (param) => {
|
||||
$.ajax({
|
||||
url: param.url
|
||||
,type: nvl(param.type, "post")
|
||||
,data: param.data
|
||||
,async: nvl(param.async, true)
|
||||
,dataType: nvl(param.dataType, "json")
|
||||
,processData: nvl(param.processData, true)
|
||||
,contentType: nvl(param.contentType, 'application/x-www-form-urlencoded;charset=UTF-8')
|
||||
,cache : false
|
||||
,beforeSend: (jqXhr, settings) => {
|
||||
jqXhr.setRequestHeader('AJAX',true);
|
||||
}
|
||||
,success: function (res) {
|
||||
if (param.showSuccessMsg === undefined || param.showSuccessMsg === true) {
|
||||
if(res.message) alert(res.message);
|
||||
}
|
||||
if ($.type(param.success) === 'function') {
|
||||
param.success(res)
|
||||
}
|
||||
}
|
||||
,error: function(jqXHR, error, errThrown ){
|
||||
console.error('==============================================================');
|
||||
console.error('>>>>>>>>>ajax call error<<<<<<<<<<<');
|
||||
//console.error('::ajaxError >>>>> ', event, status, error)
|
||||
console.error(`status=${jqXHR.status}, responseText=${jqXHR.responseText}, errorThrow=${errThrown}`);
|
||||
console.error('==============================================================');
|
||||
|
||||
const resText = jqXHR.responseText;
|
||||
if(typeof resText === 'string'){
|
||||
alert(JSON.parse(resText).message);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(typeof resText === 'object'){
|
||||
alert(resText.message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return document.write(jqXHR.responseText);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 팝업호출시(isPopup)
|
||||
* 1) alert confirm 후 업무처리
|
||||
* 2) 부모(opener) 의 callBackSerch 실행
|
||||
* 3) window close
|
||||
* 일반호출시
|
||||
* 1) alert confirm 후 업무처리
|
||||
* 2) fnBiz.search() 호출
|
||||
*
|
||||
* @param {string} workType add | modify | remove
|
||||
* @param {object} param parameter data
|
||||
* </pre>
|
||||
*/
|
||||
const cmmBizAjax = (workType, param, isPopup = true) => {
|
||||
let confirmMsg = '하시겠습니까?';
|
||||
if(workType === 'add') confirmMsg = `등록 ${confirmMsg}`;
|
||||
else if(workType === 'modify') confirmMsg = `변경 ${confirmMsg}`;
|
||||
else if(workType === 'remove') confirmMsg = `삭제 ${confirmMsg}`;
|
||||
else confirmMsg = `${workType} ${confirmMsg}`;
|
||||
// else{
|
||||
// alert('workType이 부정확 합니다.');
|
||||
// return false;
|
||||
// }
|
||||
|
||||
param = $.extend(param, {
|
||||
success: ()=>{
|
||||
//if(callback === 'function') window.opener.callback();
|
||||
//else window.opener.callbackSearch();
|
||||
if(isPopup) {
|
||||
if(workType === 'add' || workType === 'remove'){
|
||||
window.opener.callbackSearch();
|
||||
window.close();
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
}else{
|
||||
fnBiz.search();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dialog.alert({
|
||||
content: confirmMsg,
|
||||
onOK:() => {
|
||||
cmmAjax(param);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
const cmmApiCall = (param) => {
|
||||
$.ajax({
|
||||
url: param.url
|
||||
,type: nvl(param.type, "post")
|
||||
,data: param.data
|
||||
,async: nvl(param.async, true)
|
||||
,dataType: nvl(param.dataType, "json")
|
||||
,processData: nvl(param.processData, true)
|
||||
,contentType: nvl(param.contentType, 'application/json;charset=UTF-8')
|
||||
,cache : false
|
||||
,beforeSend: (jqXhr, settings) => {
|
||||
jqXhr.setRequestHeader('AJAX',true);
|
||||
}
|
||||
,success: function (res) {
|
||||
if (param.showSuccessMsg === undefined || param.showSuccessMsg === true) {
|
||||
if(res.message) alert(res.message);
|
||||
}
|
||||
if ($.type(param.success) === 'function') {
|
||||
param.success(res.data)
|
||||
}
|
||||
}
|
||||
,error: function(jqXHR, error, errThrown ){
|
||||
console.error('==============================================================');
|
||||
console.error('>>>>>>>>>ajax call error<<<<<<<<<<<');
|
||||
//console.error('::ajaxError >>>>> ', event, status, error)
|
||||
console.error(`status=${jqXHR.status}, responseText=${jqXHR.responseText}, errorThrow=${errThrown}`);
|
||||
console.error('==============================================================');
|
||||
|
||||
const resText = jqXHR.responseText;
|
||||
if(typeof resText === 'string'){
|
||||
alert(JSON.parse(resText).message);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(typeof resText === 'object'){
|
||||
alert(resText.message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return document.write(jqXHR.responseText);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
const cmmDownloadAjax = (param) => {
|
||||
$.ajax({
|
||||
url: param.url
|
||||
,type: nvl(param.type, "post")
|
||||
,data: param.data
|
||||
,async: nvl(param.async, true)
|
||||
,dataType: nvl(param.dataType, "json")
|
||||
//,contentType: nvl(param.contentType, 'application/x-www-form-urlencoded;charset=UTF-8')
|
||||
//,contentType: 'blob'
|
||||
/*
|
||||
,xhr: function () {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
//response 데이터를 바이너리로 처리한다. 세팅하지 않으면 default가 text
|
||||
xhr.responseType = "blob";
|
||||
};
|
||||
return xhr;
|
||||
}
|
||||
*/
|
||||
,success: function (res, msg, xhr) {
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
// 성공했을때만 파일 다운로드 처리하고
|
||||
let disposition = xhr.getResponseHeader('Content-Disposition');
|
||||
let filename;
|
||||
if (disposition && disposition.indexOf('attachment') !== -1) {
|
||||
let filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
|
||||
let matches = filenameRegex.exec(disposition);
|
||||
if (matches != null && matches[1]) filename = matches[1].replace(/['"]/g, '');
|
||||
}
|
||||
let blob = new Blob([res]);
|
||||
let link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = filename;
|
||||
link.click();
|
||||
}else{
|
||||
//실패했을때는 alert 메시지 출력
|
||||
alertPopup("다운로드에 실패하였습니다.");
|
||||
}
|
||||
|
||||
|
||||
if (param.showSuccessMsg === undefined || param.showSuccessMsg === true) {
|
||||
if(res.message) alert(res.message);
|
||||
}
|
||||
if ($.type(param.success) === 'function') {
|
||||
param.success(res)
|
||||
}
|
||||
}
|
||||
,exception: function (res) {
|
||||
alert(res.message);
|
||||
if ($.type(param.exception) === 'function') {
|
||||
param.exception(res);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function dataURLtoBlob(dataurl) {
|
||||
var arr = dataurl.split(','),
|
||||
mime = arr[0].match(/:(.*?);/)[1],
|
||||
bstr = atob(arr[1]),
|
||||
n = bstr.length,
|
||||
u8arr = new Uint8Array(n);
|
||||
while (n--) {
|
||||
u8arr[n] = bstr.charCodeAt(n);
|
||||
}
|
||||
return new Blob([u8arr], {
|
||||
type: mime
|
||||
});
|
||||
}
|
||||
|
||||
function downloadImg(imgSrc) {
|
||||
var image = new Image();
|
||||
image.crossOrigin = "anonymous";
|
||||
image.src = imgSrc;
|
||||
var fileName = image.src.split("/").pop();
|
||||
image.onload = function() {
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.height;
|
||||
canvas.getContext('2d').drawImage(this, 0, 0);
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
window.navigator.msSaveBlob(dataURLtoBlob(canvas.toDataURL()), fileName);
|
||||
} else {
|
||||
var link = document.createElement('a');
|
||||
link.href = canvas.toDataURL();
|
||||
link.download = fileName;
|
||||
link.click();
|
||||
}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* val 값이 null이면 ifNulVal(미지정시 '')
|
||||
* null이 아니면 ifNotNullVal(미지정시 val)
|
||||
* @param {string} val
|
||||
* @param {string} ifNullVal
|
||||
* @param {string} ifNotNullVal
|
||||
* @returns {string|*}
|
||||
* </pre>
|
||||
*/
|
||||
window.nvl = (val, ifNullVal, ifNotNullVal) => {
|
||||
return val==null
|
||||
?( ifNullVal==null?"":ifNullVal)
|
||||
:(ifNotNullVal==null?val:ifNotNullVal);
|
||||
};
|
@ -1,472 +0,0 @@
|
||||
/*=====================================================================
|
||||
*
|
||||
* File Export 도구 Script
|
||||
* -XitFileExportUtil.exportExcel() 기능을 사용하기 위해선 "xlsx.full.min.js"와 "Filesaver.min.js" 라이브러리가 반드시 필요 하다.
|
||||
* @date 2020.02.27
|
||||
* @author 박민규
|
||||
*
|
||||
=====================================================================*/
|
||||
/**
|
||||
* Xit 파일 Export 도구
|
||||
* @author 박민규
|
||||
* @date 2020.05.29.
|
||||
*/
|
||||
var XitFileExportUtil = function(fileName, dataType, dataSet, ext){
|
||||
this._fileName = fileName; //파일명
|
||||
this._dataType = dataType; //Data 타입(table, json, array)
|
||||
this._dataSet = dataSet; //DataSet( Object 또는 Array<Object> )
|
||||
}
|
||||
XitFileExportUtil.prototype.setFileName = function(fileName){ this._fileName = fileName; }
|
||||
XitFileExportUtil.prototype.setDataType = function(dataType){ this._dataType = dataType; }
|
||||
XitFileExportUtil.prototype.setDataSet = function(arrDataSet){ this._dataSet = dataSet; }
|
||||
XitFileExportUtil.prototype.exportExcel = function(){
|
||||
// 변수 declare
|
||||
var _fileName = fnIsEmpty(this._fileName)?'noname':this._fileName;
|
||||
var _dataType = this._dataType;
|
||||
var _dataSet = this._dataSet;
|
||||
var _isMultiSheet = this._dataSet instanceof Array;
|
||||
var _sheetName = 'Sheet';
|
||||
|
||||
|
||||
|
||||
// step 1. workbook 생성
|
||||
var wb = XLSX.utils.book_new();
|
||||
if(_isMultiSheet){
|
||||
_dataSet.forEach(function(data, idx){
|
||||
// step 2. 시트 만들기
|
||||
var worksheet = createWorkSheet(data);
|
||||
// step 3. workbook에 새로만든 워크시트에 이름을 주고 붙인다.
|
||||
XLSX.utils.book_append_sheet(wb, worksheet, _sheetName+(idx+1));
|
||||
});
|
||||
}else{
|
||||
// step 2. 시트 만들기
|
||||
var worksheet = createWorkSheet(_dataSet);
|
||||
// step 3. workbook에 새로만든 워크시트에 이름을 주고 붙인다.
|
||||
XLSX.utils.book_append_sheet(wb, worksheet, _sheetName+'1');
|
||||
}
|
||||
// step 4. 엑셀 파일 만들기
|
||||
var wbout = XLSX.write(wb, {bookType:'xlsx', type: 'binary'});
|
||||
// step 5. 엑셀 파일 내보내기
|
||||
saveAs(new Blob([s2ab(wbout)],{type:"application/octet-stream"}), _fileName+'.xlsx');
|
||||
|
||||
|
||||
|
||||
|
||||
// function Declare
|
||||
function fnIsEmpty(val){
|
||||
if(val==undefined||val==null||val==''||val=={}||val==[])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
function createWorkSheet(data){
|
||||
var result;
|
||||
|
||||
switch (_dataType) {
|
||||
case 'table':
|
||||
result = XLSX.utils.table_to_sheet(data);//table타입 data( ex: <table>...</table> )
|
||||
break;
|
||||
case 'json':
|
||||
result = XLSX.utils.json_to_sheet(data);//json타입 data( ex: [{'이름':'홍길동', '나이':'18세', '출생연도':'1443'}, ... ] )
|
||||
break;
|
||||
case 'array':
|
||||
result = XLSX.utils.aoa_to_sheet(data);//배열타입 data( ex: [['이름', '나이', '출생연도'],['홍길동', '18세', '1443'], ... ] )
|
||||
break;
|
||||
default:
|
||||
result = '';
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
function s2ab(s) {
|
||||
var buf = new ArrayBuffer(s.length); //convert s to arrayBuffer
|
||||
var view = new Uint8Array(buf); //create uint8array as viewer
|
||||
for (var i=0; i<s.length; i++) view[i] = s.charCodeAt(i) & 0xFF; //convert to octet
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// /* JSON 데이터 만들기 */
|
||||
// var arr = new Array();
|
||||
// var data = new Object();
|
||||
// data['하하']='123';
|
||||
// data['호호']='123';
|
||||
// arr.push(data);
|
||||
// data = new Object();
|
||||
// data['하하']='abc';
|
||||
// data['호호']='abc';
|
||||
// arr.push(data);
|
||||
// console.log(JSON.stringify(arr));
|
||||
// return arr;
|
||||
|
||||
|
||||
function exportExcel(includeEntireTableId, type, type_case, fileName){
|
||||
if(includeEntireTableId==undefined||includeEntireTableId==null||includeEntireTableId=='')
|
||||
includeEntireTableId = excelHandler.getTableDataId();
|
||||
var excelData = '';
|
||||
switch (type) {
|
||||
case 'table':
|
||||
//checked checkbox의 nocheck 이슈 처리
|
||||
$('#'+includeEntireTableId+' table input[type="checkbox"]:checked').attr('checked','checked');
|
||||
$('#'+includeEntireTableId+' table input[type="checkbox"]:not(:checked)').removeAttr('checked');
|
||||
//서비스 분기
|
||||
switch (type_case) {
|
||||
case 'case1': //전체 테이블 영역 내 하나의 테이블을 n개로 분할한 경우
|
||||
excelData = excelTableDataCreateByCase.case1(includeEntireTableId);
|
||||
break;
|
||||
case 'case2': //전체 테이블 영역 내 테이블이 n개 인 경우
|
||||
excelData = excelTableDataCreateByCase.case2(includeEntireTableId);
|
||||
break;
|
||||
default:
|
||||
excelData = excelTableDataCreateByCase.case1(includeEntireTableId);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'json':
|
||||
break;
|
||||
case 'array':
|
||||
break;
|
||||
default:
|
||||
alert('유효하지 않은 요청 타입 입니다.');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* export Excel */
|
||||
var fileUtil = new XitFileExportUtil(fileName, type, excelData);
|
||||
fileUtil.exportExcel();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 테이블 유형별 table타입 엑셀데이터 생성
|
||||
*/
|
||||
var excelTableDataCreateByCase = {
|
||||
/*
|
||||
* case1. 전체 테이블 영역 내 하나의 테이블을 n개로 분할한 경우
|
||||
* @date 2020.02.27
|
||||
* @author 박민규
|
||||
*/
|
||||
case1 : function(includeEntireTableId){
|
||||
/*===================
|
||||
* DATA 생성
|
||||
===================*/
|
||||
//head 데이터 설정
|
||||
var arrHead = new Array();
|
||||
$('#'+includeEntireTableId+' table thead').each(function(){
|
||||
$(this).children('tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrHead[rowidx]==undefined) arrHead[rowidx] = row.innerHTML;
|
||||
// else arrHead[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrHead[rowidx]==undefined) arrHead[rowidx] = cell.outerHTML;
|
||||
else arrHead[rowidx] += cell.outerHTML;
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
// console.log(arrHead);
|
||||
//body 데이터 설정
|
||||
var arrBody = new Array();
|
||||
$('#'+includeEntireTableId+' table tbody').each(function(){
|
||||
$(this).children('tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrBody[rowidx]==undefined) arrBody[rowidx] = row.innerHTML;
|
||||
// else arrBody[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrBody[rowidx]==undefined) arrBody[rowidx] = cell.outerHTML;
|
||||
else arrBody[rowidx] += cell.outerHTML;
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
// console.log(arrBody);
|
||||
//foot 데이터 설정
|
||||
var arrFoot = new Array();
|
||||
$('#'+includeEntireTableId+' table tfoot').each(function(){
|
||||
$(this).children('tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrFoot[rowidx]==undefined) arrFoot[rowidx] = row.innerHTML;
|
||||
// else arrFoot[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrFoot[rowidx]==undefined) arrFoot[rowidx] = cell.outerHTML;
|
||||
else arrFoot[rowidx] += cell.outerHTML;
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
// console.log(arrBody);
|
||||
|
||||
|
||||
/*===================
|
||||
* TABLE 그리기
|
||||
===================*/
|
||||
//table draw
|
||||
var table = document.createElement('table');
|
||||
//table>thead draw
|
||||
var thead = document.createElement('thead');
|
||||
for(var i=0; i<arrHead.length; i++){
|
||||
thead.insertAdjacentHTML('beforeend','<tr>'+arrHead[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(thead);
|
||||
//table>tbody draw
|
||||
var tbody = document.createElement('tbody');
|
||||
for(var i=0; i<arrBody.length; i++){
|
||||
tbody.insertAdjacentHTML('beforeend','<tr>'+arrBody[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(tbody);
|
||||
//table>tfoot draw
|
||||
var tfoot = document.createElement('tfoot');
|
||||
for(var i=0; i<arrFoot.length; i++){
|
||||
tfoot.insertAdjacentHTML('beforeend','<tr>'+arrFoot[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(tfoot);
|
||||
//전체 테이블영역에 append
|
||||
var div = document.createElement('div');
|
||||
div.appendChild(table);
|
||||
|
||||
|
||||
/*===================
|
||||
* After 처리
|
||||
===================*/
|
||||
div = this.afterProc(div);
|
||||
|
||||
|
||||
return div;
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
* case2. 전체 테이블 영역 내 테이블이 n개 인 경우
|
||||
* @date 2020.02.27
|
||||
* @author 박민규
|
||||
*/
|
||||
case2 : function(includeEntireTableId){
|
||||
/*===================
|
||||
* DATA 생성
|
||||
===================*/
|
||||
var arrTable = new Array();
|
||||
$('#'+includeEntireTableId+' table').each(function(tableidx, table){
|
||||
//head 데이터 설정
|
||||
var arrHead = new Array();
|
||||
$(table).find('thead > tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrHead[rowidx]==undefined) arrHead[rowidx] = row.innerHTML;
|
||||
// else arrHead[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrHead[rowidx]==undefined) arrHead[rowidx] = cell.outerHTML;
|
||||
else arrHead[rowidx] += cell.outerHTML;
|
||||
});
|
||||
});
|
||||
// console.log(arrHead);
|
||||
//body 데이터 설정
|
||||
var arrBody = new Array();
|
||||
$(table).find('tbody > tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrBody[rowidx]==undefined) arrBody[rowidx] = row.innerHTML;
|
||||
// else arrBody[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrBody[rowidx]==undefined) arrBody[rowidx] = cell.outerHTML;
|
||||
else arrBody[rowidx] += cell.outerHTML;
|
||||
});
|
||||
});
|
||||
// console.log(arrBody);
|
||||
//body 데이터 설정
|
||||
var arrFoot = new Array();
|
||||
$(table).find('tfoot > tr').each(function(rowidx, row){
|
||||
/* 주석처리사유: tr 영역 내 input[type="hidden"] 과 같은 엘리먼트가 포함되어 있을 경우 레이아웃이 틀어 짐*/
|
||||
// if(arrFoot[rowidx]==undefined) arrFoot[rowidx] = row.innerHTML;
|
||||
// else arrFoot[rowidx] += row.innerHTML;
|
||||
$(row).find('th, td').each(function(cellidx, cell){
|
||||
if(arrFoot[rowidx]==undefined) arrFoot[rowidx] = cell.outerHTML;
|
||||
else arrFoot[rowidx] += cell.outerHTML;
|
||||
});
|
||||
});
|
||||
// console.log(arrBody);
|
||||
//table 데이터 설정
|
||||
var tableData = new Object();
|
||||
tableData['thead'] = arrHead;
|
||||
tableData['tbody'] = arrBody;
|
||||
tableData['tfoot'] = arrFoot;
|
||||
arrTable[tableidx] = tableData;
|
||||
});
|
||||
// console.log(arrTable);
|
||||
|
||||
|
||||
/*===================
|
||||
* TABLE 그리기
|
||||
===================*/
|
||||
//div draw
|
||||
var div = document.createElement('div');
|
||||
arrTable.forEach(function(table, tableidx){
|
||||
var arrHead = arrTable[tableidx].thead;
|
||||
var arrBody = arrTable[tableidx].tbody;
|
||||
var arrFoot = arrTable[tableidx].tfoot;
|
||||
|
||||
//table draw
|
||||
var table = document.createElement('table');
|
||||
//table>thead draw
|
||||
var thead = document.createElement('thead');
|
||||
for(var i=0; i<arrHead.length; i++){
|
||||
thead.insertAdjacentHTML('beforeend', '<tr>'+arrHead[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(thead);
|
||||
//table>tbody draw
|
||||
var tbody = document.createElement('tbody');
|
||||
for(var i=0; i<arrBody.length; i++){
|
||||
tbody.insertAdjacentHTML('beforeend', '<tr>'+arrBody[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(tbody);
|
||||
//table>tfoot draw
|
||||
var tfoot = document.createElement('tfoot');
|
||||
for(var i=0; i<arrFoot.length; i++){
|
||||
tfoot.insertAdjacentHTML('beforeend', '<tr>'+arrFoot[i]+'</tr>');
|
||||
}
|
||||
table.appendChild(tfoot);
|
||||
//전체 테이블영역에 append
|
||||
div.appendChild(table);
|
||||
});
|
||||
|
||||
|
||||
/*===================
|
||||
* After 처리
|
||||
===================*/
|
||||
div = this.afterProc(div);
|
||||
|
||||
|
||||
return div;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 완료된 Table Data에 대한 후처리
|
||||
* @date 2020.02.27
|
||||
* @author 박민규
|
||||
*/
|
||||
afterProc : function(div){
|
||||
//checkbox 처리
|
||||
$(div).find('table tr > td > input[type="checkbox"]').each(function(cellidx, cell){
|
||||
if($(cell).is(':checked'))
|
||||
$(cell).parent().html('?');
|
||||
else
|
||||
$(cell).parent().html('?');
|
||||
});
|
||||
//selectbox 처리
|
||||
$(div).find('table tr > td > select').each(function(cellidx, cell){
|
||||
$(cell).parent().html(cell.options[cell.selectedIndex].text);
|
||||
});
|
||||
//특정 단어가 포함된 열(col) index 설정
|
||||
var arrCellsOfOwnerNo = new Array();
|
||||
var arrCellOfAdres = new Array();
|
||||
$(div).find('table thead tr th').each(function(){
|
||||
if(this.innerHTML.indexOf('주민번호')>-1
|
||||
||this.innerHTML.indexOf('주민등록번호')>-1
|
||||
||this.innerHTML.indexOf('소유자번호')>-1
|
||||
||this.innerHTML.indexOf('소유자주민번호')>-1
|
||||
||this.innerHTML.indexOf('주민/법인번호')>-1
|
||||
)
|
||||
arrCellsOfOwnerNo.push(this.cellIndex);
|
||||
|
||||
if(this.innerHTML.indexOf('주소')>-1||this.innerHTML.indexOf('번호')>-1)
|
||||
arrCellOfAdres.push(this.cellIndex);
|
||||
});
|
||||
//소유자번호 마스킹 처리
|
||||
if(arrCellsOfOwnerNo.length>0){
|
||||
var isMask = confirm('개인정보를 마스킹처리 하시겠습니까?\n -[확인] 선택 시 마스킹 처리\n -[취소] 선택 시 전체 노출');
|
||||
|
||||
arrCellsOfOwnerNo.forEach(function(value){
|
||||
$(div).find('table tbody tr td:nth-child('+(Number(value)+1)+')').each(function(cellidx, cell){
|
||||
cell.innerHTML = fmtOwnerNo(cell.innerHTML, isMask);
|
||||
});
|
||||
});
|
||||
}
|
||||
//일부 주소데이터의 날짜 타입변환 방지 처리(case는 아래주석 참조)
|
||||
//case1. 서울 종로구 홍지문길 84-5 -> (as-is)1984-05-01 -> (to-be)서울 종로구 홍지문길 84 - 5
|
||||
//case2. 서울 종로구 창신길 33-4 -> (as-is)2033-04-01 -> (to-be)서울 종로구 창신길 33 - 4
|
||||
if(arrCellOfAdres.length>0){
|
||||
arrCellOfAdres.forEach(function(value){
|
||||
$(div).find('table tbody tr td:nth-child('+(Number(value)+1)+')').each(function(cellidx, cell){
|
||||
cell.innerHTML = cell.innerHTML.replace(/[-]/gi, ' - ');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// console.log(div);
|
||||
return div;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 테이블 유형별 json타입 엑셀데이터 생성
|
||||
*/
|
||||
var excelJsonDataCreateByCase;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 테이블 유형별 배열(array)타입 엑셀데이터 생성
|
||||
*/
|
||||
var excelArrayDataCreateByCase;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 소유자번호 포맷설정 및 마스킹 처리
|
||||
* @param ownerNo 소유자번호
|
||||
* @param isMask 마스킹처리여부
|
||||
* @returns
|
||||
* @date 2020.02.27.
|
||||
* @author 박민규
|
||||
*/
|
||||
function fmtOwnerNo(ownerNo, isMask){
|
||||
if(ownerNo==null||ownerNo==undefined||ownerNo=='')
|
||||
return ownerNo;
|
||||
if(isMask==null||isMask==undefined||isMask=='')
|
||||
isMask=false;
|
||||
|
||||
|
||||
var value = ownerNo.replace(/[-]/gi,'');
|
||||
if(value.length == 13) //주민번호
|
||||
if(isMask)
|
||||
value = value.substring(0, 6) + '-' +'*******';
|
||||
else
|
||||
value = value.substring(0, 6) + '-' +value.substring(6, 13);
|
||||
else if(value.length == 10) //사업자번호
|
||||
value = value.substring(0, 3) + '-' +value.substring(3, 5) + '-' + value.substring(5, 10);
|
||||
|
||||
|
||||
return value;
|
||||
}
|
@ -1,328 +0,0 @@
|
||||
function deepCopy(obj) {
|
||||
if(typeof obj !== 'object' || obj === null) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if(obj instanceof Date) {
|
||||
return new Date(obj.getTime());
|
||||
}
|
||||
|
||||
if(obj instanceof Array) {
|
||||
return obj.reduce((arr, item, i) => {
|
||||
arr[i] = deepCopy(item);
|
||||
return arr;
|
||||
}, []);
|
||||
}
|
||||
|
||||
if(obj instanceof Object) {
|
||||
return Object.keys(obj).reduce((newObj, key) => {
|
||||
newObj[key] = deepCopy(obj[key]);
|
||||
return newObj;
|
||||
}, {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).keydown(function(event){
|
||||
let code;
|
||||
if (event.keyCode) code = event.keyCode;
|
||||
else if (event.which) code = event.which;
|
||||
if(code==8){
|
||||
const targetNode = event.target.nodeName;
|
||||
const readonly = event.target.readOnly;
|
||||
const disabled = event.target.disabled;
|
||||
const type = event.target.type;
|
||||
//type이 password나 text인 input와 textarea를 제외한 모든 엘리먼트에서 백스페이스기능을 제한함
|
||||
if( !( ((targetNode=="INPUT"&&(type=="text"||type=="password"))||targetNode=="TEXTAREA")&&(!readonly&&!disabled))) {
|
||||
if(event.preventDefault){
|
||||
event.preventDefault();
|
||||
}else{
|
||||
event.returnValue = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* cmmClearForm(tagElementId)
|
||||
* tagElement의 하위 input tag 클리어 시 사용.
|
||||
* resetForm()은 input tag의 action 이전 값을 기억.
|
||||
* clearForm()은 input tag의 모든값을 nullString 로 세팅.
|
||||
* @param targetId : 초기화 하고자하는 상위 targetId
|
||||
* @param notClearNameArr : 폼안에 검색조건이 있는 경우 clear하지 않을 이름.
|
||||
*/
|
||||
window.cmmClearForm = function (targetId, notClearNameArr) {
|
||||
$("#"+targetId+" :input").each(function() {
|
||||
if ( $.inArray(this.name, notClearNameArr) > -1 ) {
|
||||
return true; //=>continue
|
||||
}
|
||||
switch(this.type) {
|
||||
case 'password':
|
||||
case 'select-multiple':
|
||||
case 'text':
|
||||
case 'textarea':
|
||||
$(this).val('');
|
||||
break;
|
||||
case 'select-one':
|
||||
$(this).val($(this).find("option:first").val());
|
||||
break;
|
||||
case 'checkbox':
|
||||
case 'radio':
|
||||
this.checked = false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* hidden 을 포함한 form 의 모든 항목 초기화
|
||||
* @param targetId : 초기화 하고자하는 상위 targetId
|
||||
* @param notClearNameArr : 폼안에 검색조건이 있는 경우 clear하지 않을 이름.
|
||||
*/
|
||||
window.cmmClearFormAll = function (targetId, notClearNameArr) {
|
||||
$("#"+targetId+" :input").each(function() {
|
||||
if ( $.inArray(this.name, notClearNameArr) > -1 ) {
|
||||
return true; //=>continue
|
||||
}
|
||||
switch(this.type) {
|
||||
case 'password':
|
||||
case 'select-multiple':
|
||||
case 'text':
|
||||
case 'hidden':
|
||||
case 'textarea':
|
||||
$(this).val('');
|
||||
break;
|
||||
case 'select-one':
|
||||
$(this).val($(this).find("option:first").val());
|
||||
break;
|
||||
case 'checkbox':
|
||||
case 'radio':
|
||||
this.checked = false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* setTimeCombo(objectId, timeDiv)
|
||||
* objectI에 시간 또는 분 combobox 생성
|
||||
* timeDiv가 'H'이면 시간, 'M'이면 분
|
||||
* @param id : 콤보박스를 생성할 element ID
|
||||
* @param timeDiv : 'H'-시간, 'M'-분
|
||||
*/
|
||||
window.setTimeCombo = function(id, timeDiv){
|
||||
var hh;
|
||||
|
||||
if(timeDiv == 'H'){
|
||||
for (var i=0; i<24; i++){
|
||||
|
||||
if(i < 10) hh = '0'+i;
|
||||
else hh = i+'';
|
||||
|
||||
var option = document.createElement('option');
|
||||
var txt = document.createTextNode(hh);
|
||||
option.setAttribute("value", hh);
|
||||
option.appendChild(txt);
|
||||
$("#"+id).append(option);
|
||||
}
|
||||
|
||||
}else{
|
||||
for (var i=0; i<60; i++){
|
||||
|
||||
if(i < 10) hh = '0'+i;
|
||||
else hh = i+'';
|
||||
|
||||
var option = document.createElement('option');
|
||||
var txt = document.createTextNode(hh);
|
||||
option.setAttribute("value", hh);
|
||||
option.appendChild(txt);
|
||||
$("#"+id).append(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* [downloadImage]
|
||||
* @param {[string]} img [base64encoded image data]
|
||||
* @param {[string]} fileName [new file name]
|
||||
* @return [image file]
|
||||
* </pre>
|
||||
*/
|
||||
function downloadImage(img, fileName) {
|
||||
var imgData = atob(img.split(',')[1]),
|
||||
len = imgData.length,
|
||||
buf = new ArrayBuffer(len),
|
||||
view = new Uint8Array(buf),
|
||||
blob,
|
||||
i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
view[i] = imgData.charCodeAt(i) & 0xff; // masking
|
||||
}
|
||||
|
||||
blob = new Blob([view], {
|
||||
type: 'application/octet-stream',
|
||||
});
|
||||
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
window.navigator.msSaveOrOpenBlob(blob, fileName);
|
||||
} else {
|
||||
//var url = URL.createObjectURL(blob);
|
||||
var a = document.createElement('a');
|
||||
a.style = 'display: none';
|
||||
a.href = URL.createObjectURL(blob);;
|
||||
//a.href = img.src;
|
||||
a.download = fileName;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
|
||||
setTimeout(function () {
|
||||
document.body.removeChild(a);
|
||||
//URL.revokeObjectURL(url);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
var readBlob = async () => {
|
||||
const data = await fetch('https://play-lh.googleusercontent.com/hYdIazwJBlPhmN74Yz3m_jU9nA6t02U7ZARfKunt6dauUAB6O3nLHp0v5ypisNt9OJk');
|
||||
const blob = await data.blob();
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
const base64data = reader.result;
|
||||
console.log(base64data)
|
||||
}
|
||||
reader.readAsDataURL(blob);
|
||||
|
||||
fetch('https://www.business2community.com/wp-content/uploads/2014/04/Free.jpg')
|
||||
.then((response) => response.blob())
|
||||
.then((blob) => {
|
||||
const url = URL.createObjectURL(blob);
|
||||
document.querySelector('img').src = url;
|
||||
document.querySelector('a').href = url;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param b64Data
|
||||
* @param contentType
|
||||
* @param sliceSize
|
||||
* @returns {Blob}
|
||||
*/
|
||||
// bas64를 blob으로 변환해주는 함수
|
||||
function b64toBlob(b64Data, contentType = '', sliceSize = 512) {
|
||||
const image_data = atob(b64Data.split(',')[1]); // data:image/gif;base64 필요없으니 떼주고, base64 인코딩을 풀어준다
|
||||
|
||||
const arraybuffer = new ArrayBuffer(image_data.length);
|
||||
const view = new Uint8Array(arraybuffer);
|
||||
|
||||
for (let i = 0; i < image_data.length; i++) {
|
||||
view[i] = image_data.charCodeAt(i) & 0xff;
|
||||
// charCodeAt() 메서드는 주어진 인덱스에 대한 UTF-16 코드를 나타내는 0부터 65535 사이의 정수를 반환
|
||||
// 비트연산자 & 와 0xff(255) 값은 숫자를 양수로 표현하기 위한 설정
|
||||
}
|
||||
|
||||
return new Blob([arraybuffer], { type: contentType });
|
||||
|
||||
/*
|
||||
const contentType = 'image/png';
|
||||
const b64Data =
|
||||
'data:image/gif;base64,R0lGODlhAAEAAcQAALe9v9ve3/b393mDiJScoO3u74KMkMnNz4uUmKatsOTm552kqK+1uNLW18DFx3B7gP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjAxODAxMTc0MDcyMDY4MTE5QjEwQjYyNTc4MkUxRURBIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjEzN0VEMDZBQjMyNzExRTE4REMzRUZGMkFCOTM1NkZBIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjEzN0VEMDY5QjMyNzExRTE4REMzRUZGMkFCOTM1NkZBIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzUgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDI4MDExNzQwNzIwNjgxMTlCMTBCNjI1NzgyRTFFREEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDE4MDExNzQwNzIwNjgxMTlCMTBCNjI1NzgyRTFFREEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4B//79/Pv6+fj39vX08/Lx8O/u7ezr6uno5+bl5OPi4eDf3t3c29rZ2NfW1dTT0tHQz87NzMvKycjHxsXEw8LBwL++vby7urm4t7a1tLOysbCvrq2sq6qpqKempaSjoqGgn56dnJuamZiXlpWUk5KRkI+OjYyLiomIh4aFhIOCgYB/fn18e3p5eHd2dXRzcnFwb25tbGtqaWhnZmVkY2JhYF9eXVxbWllYV1ZVVFNSUVBPTk1MS0pJSEdGRURDQkFAPz49PDs6OTg3NjU0MzIxMC8uLSwrKikoJyYlJCMiISAfHh0cGxoZGBcWFRQTEhEQDw4NDAsKCQgHBgUEAwIBAAAh+QQAAAAAACwAAAAAAAEAAQAF/yAkjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgsGo/IpHLJbDqf0Kh0Sq1ar9isdsvter/gsHhMLpvP6LR6zW673/C4fE6v2+/4vH7P7/v/gIGCg4SFhoeIiYptBQEADAQED5OUlQ8DkQwAAQKLni0KDgsDlqWmpQYLDgqfrSINCQans7SWBgkNrogFDKS1v8APBgwFuoIBksHKwQsBxn3Iy9LKBM7PdwXJ09vAC8XXcwDc48EDAOBwCgjk7MAI3+hqB77t9bMDufFoDPb9tef6yiTwR3BWgoBiBKwryLDUQYRftDWcOOkhxC0DKWqseFGLuI0gHXS80gCkyQfWRv9KKUDvJMUBnVRGkeiS4gKZUA7UPJkP5xIBLXdSNOCTyUehIAEWPQIUqUmYS48cdbrxQFQjsqiCJHp1SEmtJlN2/ZER7EaLY30ENdtwQNofAdiaZPWWx1S5E0XW3UETL8Obe3Ws9UuQa+AbAghvPIwjrmKKYhnLcPy4YWTJMBxUntgTc4y7m/sp9QwDdOh6o0m7MH2aXWrVLFi3HmcV9ouvs+1dtp2Ccu52u3mfKPDbXkzhLIrXQ+5ioXJuBJi34PecGwPpLHRW39YZ+4nE26cd947CeXhg0cmr0Hw+WG31JQQ4AFC2fS1NB8aTVzDY/q8BdJHXlH/bQEUeewRuo5f/d30lGEx63jnIjVvkSciNehZug2GG0mzIoTIefgiMelmJWAuE2DVooiUoSkfdirO8hpx2MJ7yHnYK1DgLPN71B6Nh5NWn4yTXwefbkA8ESCKSkyAA3wg0DnkjfCXW6OSTIxy5YnBB6lgkliMoBCMC+oHJkolkgjmceRKmqeZ3APi4nTlvriDAAQCo+BsBADRQZp0o4LYdl4CiIOdpQBY6XXhfKgpKeDw6ygKbubUo6QpR/jblpSscqliinK4gW2UyhooCcb8ZaGoLQoaG1qoroDpbpLCq0Opjr9aqgqyh0aprCrf6Veqv33lKlarExrbZgsm2UCVeVzbrgpZsESqt/wkLEJbrtSqMihSz3K5ArVbWhjsCr2z9ae4JhK3bHF6WunuCnkIBJq8KL5o17L0ieFvTvvz661J3/JYwLlLlynuwUAm7u/BODa/7cE0RmzuxSxWHe/FJGXO7cVgFp5ApuSGjIPBJAN8bLFKNljzCs1pF67II6JqlbsCEgRvygHghW7CYirlZsDqbvVNwA8ZqhY+8BWSb2wI36xqncnRKewDMvxmwqalX+1cNrF07+PWlYWeodaHyYW2hAQ5EjRwvSSc4ADHqBeA0k5Qk0PFYd6qNt9Zuv6VAAnEPOUACSu51J6V4/0LA1lENXnjjlhyeOE6LU24PAvnhFMDKmo9z+P/euzjgd+j1sO2rKw3cjfpGCxC8CNyv72QAAKsTUgDotYOUQO6AnNz7RinrUQDjwyMlNCD8Jd/z5XsEMLnzGwH4x8fUu2Q9H81nT9j2eZzpvWI+0wH0+EHnwTv6WrUsh6DsK0Z6GDzH/2ng+9gfWvFm1Ky/XwMAHhrW9z+t8G8M4ClgZconDwWGBnJocJ0DCWOvNkxwMxRixAU3g78wYG+DFHOD8EBYE53lj4SEOWBEUEiYeJ3hdCwUiszUEMN2sSFHNcSLAMMAvxySbA0j9KFGVMgFAgoRJO4zA72OeBIXkmF6TCwIqMqQwChSZQ0ftCJD5leFkWmxJrIbQxC/SBD/ImZBgmR0ybbGsMQ0TsSJYXAjUjLYPzkipYNayKId68FFKSBojyeB4BfGCEjXoKGNhfRHBcmAvEQyBI5ecKRLzoBDSYJkh3m0JMjKQEhNTsOEX8iXJxtiRiogcpTkgOQWYIhKdswwjq2kSBn0GEtlQK8LPaxlP/rYhE7q8heljMIff9kPUHLBf8RkByaxgMZkjmOR9GOlM39hADxigWjT5AYCbkm/ZmazFlBjA9K+CYyluUEAUyOnKcxhzYSYTp2UYFs7zdA6csaOD3fypicX0DlACAAW0iTjLfxUugUENIepcMAyBVGAA0DCigRgwAEWqggF4IkAB82eAfh0AG5eaCQAeFrAKSlHgAUA4AC8DIgAAtCAR0QCb5noEyfgo4AAOMKlBGhkaxAQ000EwKOSqqlN8QSAooo0EpHQKTl4itSSFrWoKLUpUGdG1apa9apYzapWt8rVrnr1q2ANq1jHStaymvWseggBADs=';
|
||||
|
||||
const blob = b64toBlob(b64Data, contentType); // base64 -> blob
|
||||
const blobUrl = URL.createObjectURL(blob); // object url 생성
|
||||
|
||||
const img = document.createElement('img');
|
||||
img.src = blobUrl;
|
||||
document.body.appendChild(img);
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 전달받은 이미지를 base64로 인코딩한다
|
||||
* @param file - 이미지 파일 또는 이미지 URL
|
||||
* @param maxWidth - 인코딩 시의 이미지 max width 사이즈
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
var readImage = () => {
|
||||
let image = this.$refs.image.src
|
||||
this.toBlob(image)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
this.image = {
|
||||
filename: res.name,
|
||||
size: res.size,
|
||||
type: res.type,
|
||||
lastModified: res.lastModified
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
/**
|
||||
* 이미지 url을 blob 파일로 변환하여 전달한다
|
||||
* @param url
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
var toBlob = (url) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.base64Encode(url)
|
||||
.then(res => {
|
||||
let byteString = atob(res.dataUrl)
|
||||
let ab = new ArrayBuffer(byteString.length)
|
||||
let ia = new Uint8Array(ab)
|
||||
|
||||
for (let i = 0; i < byteString.length; i++) {
|
||||
ia[i] = byteString.charCodeAt(i)
|
||||
}
|
||||
|
||||
// write the array buffer to blob
|
||||
let blob = new Blob([ab], {type: 'image/' + res.type})
|
||||
|
||||
let formData = new FormData()
|
||||
formData.append('file', blob, res.name)
|
||||
resolve(formData.get('file'))
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
/**
|
||||
* 전달받은 이미지를 base64로 인코딩한다
|
||||
*/
|
||||
var base64Encode = (url) => {
|
||||
const re = new RegExp('.(gif|jpg|jpeg|tiff|png|ico)$', 'i')
|
||||
let name = (/[^(/|\\)]*$/).exec(url)[0]
|
||||
let type = re.test(name) ? re.exec(name)[0].replace('.', '') : 'jpg'
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let image = new Image()
|
||||
|
||||
image.onload = function (event) {
|
||||
let canvas = document.createElement('canvas')
|
||||
// draw canvas
|
||||
canvas.width = image.naturalWidth
|
||||
canvas.height = image.naturalHeight
|
||||
canvas.getContext('2d').drawImage(image, 0, 0)
|
||||
|
||||
let dataUrl = canvas.toDataURL('image/' + type)
|
||||
resolve({
|
||||
name: name,
|
||||
type: type,
|
||||
dataUrl: dataUrl.split(',')[1]
|
||||
})
|
||||
}
|
||||
image.onerror = function () {
|
||||
let msg = `"${file}"을 로딩하는 데 오류가 발생하였습니다. 이미지 파일을 확인해주세요.`
|
||||
alert(msg)
|
||||
console.error(msg)
|
||||
}
|
||||
image.crossOrigin = 'anonymous';
|
||||
image.src = url
|
||||
})
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
|
||||
/*
|
||||
* 단축키 Event
|
||||
*/
|
||||
document.onkeydown=function(e) {
|
||||
if (e.key == "F1" && e.ctrlKey == true) {
|
||||
if ( self !== top ) {
|
||||
$(top.document.getElementById("favorites")).trigger("click");
|
||||
} else {
|
||||
$("#favorites").trigger("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue