CSS, JS 소스 정리

dev
이범준 5 months ago
parent ce14550080
commit 51eba3d863

@ -28,18 +28,15 @@
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/fonts/flag-icons.css"/>" /> <link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/fonts/flag-icons.css"/>" />
<!-- Core CSS --> <!-- Core CSS -->
<!-- <!-- Core CSS -->
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/core.css"/>" class="template-customizer-core-css" /> <link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/core.css"/>" class="template-customizer-core-css" />
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/theme-default.css"/>" class="template-customizer-theme-css" /> <link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/theme-default.css"/>" class="template-customizer-theme-css" />
--> <link rel="stylesheet" href="<c:url value="/webjars/css/styles.css"/>" />
<link rel="stylesheet" href="<c:url value="/resources/css/xit-core.css"/>" class="template-customizer-core-css" />
<link rel="stylesheet" href="<c:url value="/resources/css/xit-layout.css"/>"/>
<link rel="stylesheet" href="<c:url value="/resources/css/xit-extend.css"/>" class="template-customizer-core-css" />
<link rel="stylesheet" href="<c:url value="/webjars/applib/css/overwrite.css?${ver}"/>" />
<link rel="stylesheet" href="<c:url value="/webjars/applib/css/applib.css?${ver}"/>" />
-->
<%--link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/demo.css" /--%> <%--link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/demo.css" /--%>
<!-- Vendors CSS --> <!-- Vendors CSS -->
@ -51,6 +48,4 @@
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/libs/datatables-responsive-bs5/responsive.bootstrap5.css"/>" /> <link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/libs/datatables-responsive-bs5/responsive.bootstrap5.css"/>" />
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/libs/flatpickr/flatpickr.css"/>" /--%> <link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/libs/flatpickr/flatpickr.css"/>" /--%>
<link rel="stylesheet" href="<c:url value="/webjars/css/styles.css"/>" />
</head> </head>

@ -34,27 +34,16 @@
<!-- 전체화면 비활성화 --> <!-- 전체화면 비활성화 -->
<script src="<c:url value="/webjars/3rd-party/sneat/libs/block-ui/block-ui.js"/>"></script> <script src="<c:url value="/webjars/3rd-party/sneat/libs/block-ui/block-ui.js"/>"></script>
<script src="<c:url value="/resources/js/base/base-fims.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/base/fimsFormFields.js?${ver}"/>"></script>
<!-- 공통 유틸 --> <!-- 공통 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/cmmnUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/cmmnUtil.js?${ver}"/>"></script>
<!-- 날짜 관련 유틸 --> <!-- 날짜 관련 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/cmmnDateUtil.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/cmmnDateUtil.js?${ver}"/>"></script>
<!-- 업무별 기능 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/taskUtil.js?${ver}"/>"></script>
<!-- 초기화 유틸 --> <!-- 초기화 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/initAfterPageLoad.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/initAfterPageLoad.js?${ver}"/>"></script>
<!-- 검색 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/searchUtil.js?${ver}"/>"></script>
<!-- 그리드 열 너비 유틸 -->
<script src="<c:url value="/resources/js/fims/cmmn/downsize.js?${ver}"/>"></script>
<!-- 단축키 설정 -->
<script src="<c:url value="/resources/js/fims/cmmn/shortcutKey.js?${ver}"/>"></script>
<!-- 버튼 설정 -->
<script src="<c:url value="/resources/js/fims/cmmn/button.js?${ver}"/>"></script>
<!-- 커스텀UI --> <!-- 커스텀UI -->
<script src="<c:url value="/resources/js/fims/cmmn/componentization.js?${ver}"/>"></script> <script src="<c:url value="/webjars/applib/js/componentization.js?${ver}"/>"></script>
<!-- endbuild --> <!-- endbuild -->

File diff suppressed because it is too large Load Diff

@ -1,626 +0,0 @@
@charset "UTF-8";
select {
--pdf-red : rgb(255,0,0);
--pdf-green : rgb(0,255,0);
--pdf-blue : rgb(0,0,255);
--pdf-yellow : rgb(255,255,0);
--pdf-orange : rgb(255,128,0);
--pdf-yellow-green : rgb(128,255,0);
--pdf-cyan : rgb(0,255,255);
--pdf-green-cyan : rgb(0,255,128);
--pdf-cyan-blue : rgb(0,128,255);
--pdf-magenta : rgb(255,0,255);
--pdf-violet : rgb(128,0,255);
--pdf-deep-pink : rgb(255,0,128);
--pdf-white : rgb(255,255,255);
--pdf-light-grey : rgb(192,192,192);
--pdf-grey : rgb(160,160,160);
--pdf-dark-grey : rgb(96,96,96);
--pdf-black : rgb(0,0,0);
}
.task-theme-pvs { background : rgba(66,76,157,0.4) !important; }
.task-theme-bpv { background : rgba(117,123,74,0.4) !important; }
.task-theme-eca { background : rgba(173,215,115,0.4) !important; }
.task-theme-dpv { background : rgba(238,199,177,0.4) !important; }
.task-theme-pes { background : rgba(239,122,115,0.4) !important }
.task-theme-dvs { background : rgba(162,225,221,0.4) !important }
.fieldset-legend .fieldset-legend-content {
padding: 1.5rem;
font-size: .875rem;
background-color: #fff;
border: 1px solid #bcc5cd;
position: relative
}
.fieldset-legend .fieldset-legend-content::before {
content: attr(data-label);
display: block;
position: absolute;
top: -8px;
left: 12px;
font-size : 15px!important;
font-weight: 600;
text-transform: uppercase;
background-color: inherit;
color: #a1acb8;
padding: 0 5px
}
#main-tab-content {
padding-bottom: 0px;
}
.wrapper-dashboard {
display: flex;
flex-flow: row wrap;
justify-content:center;
max-width:1400px;
padding: 0px;
}
.wrapper-dashboard .card {
font-weight: bold;
padding : 7px;
margin : 7px;
flex-grow: 1;
flex-shrink: 1;
}
.wrapper-dashboard .card-header {
margin: 0;
padding: 3px;
}
.wrapper-dashboard .card-body {
margin: 0;
padding: 3px;
padding-bottom: 20px;
}
.wrapper-dashboard .card-footer {
border-top: 1px solid #d9dee3;
padding: 3px;
}
.dashboard-total {
min-width : 300px;
max-width : 400px;
max-height : 150px;
}
.dashboard-chart {
min-width : 500px;
max-width : 650px;
}
@keyframes skeleton-loading-fill {
0% { fill: #f2f2f2; }
25% { fill: #c1c1c1; }
50% { fill: #a1a1a1; }
75% { fill: #c1c1c1; }
100% { fill: #f2f2f2; }
}
@keyframes skeleton-loading-color {
0% { color: #f2f2f2; }
25% { color: #c1c1c1; }
50% { color: #a1a1a1; }
75% { color: #c1c1c1; }
100% { color: #f2f2f2; }
}
svg.skeleton {
fill: rgba(0, 0, 0, 1);
}
svg.skeleton, path.skeleton {
animation: skeleton-loading-fill 1s infinite;
}
span.skeleton {
animation: skeleton-loading-color 1s infinite;
}
@keyframes highlight {
0% { background-color: #ffff99; }
100% { background-color: #ffffff; }
}
.highlight-once {
animation: highlight 0.4s;
}
.wrapper-list {
min-height: 760px;
overflow-y: auto;
padding: 10px;
}
.wrapper-pop {
padding: 5px 20px 5px 20px;
}
/* 조회조건 영역 */
.container-search {
clear: both;
position: relative;
padding: 10px 15px;
background-color: var(--bs-nav-link-color);
border: 1px solid #d0d0d0;
box-shadow: rgb(0 0 0 / 15%) 1.95px 1.95px 2.6px;
line-height: 24px;
}
.container-search-detail {
background-color: #f2f2f2;
}
.form-search-title {
display: inline-block;
min-width: 6.25rem;
}
.form-search-linebox {
display: inline-block;
width: max-content;
}
/* 날짜입력 */
.form-date, .form-time {
width: 7.5rem;
color: #515151;
border: 1px solid #a9a9a9;
text-align: center;
}
/* 탭,내비게이션 */
.nav-link-closeable{
padding-right: calc(0.8em + (0.5em * 2));
}
.nav-link-closeable + .btn-close{
font-size: 16px;
margin-left: calc((0.8em + (0.5em * 2)) * -1);
height: 100%;
}
.nav-tabs.nav-tabs-ifr{
--bs-nav-tabs-padding-top : .3em;
--bs-nav-tabs-padding-left : .3em;
--bs-nav-tabs-border-radius: 0.1875rem;
--bs-nav-tabs-bg-image: linear-gradient(#8AB9DB,whitesmoke);
--bs-nav-link-color: #2e6e9e;
--bs-nav-link-bg-image: linear-gradient(#dfeffc,white);
--bs-nav-tabs-link-active-color: #e17009;
--bs-nav-tabs-link-active-bg : #fff;
}
/* 버튼 */
.btn-red {
--bs-btn-color: #fff;
--bs-btn-bg:#e60012;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#e60012;
}
.btn-green {
--bs-btn-color: #fff;
--bs-btn-bg: #107c41;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#107c41;
}
.btn-blue {
--bs-btn-color : #fff;
--bs-btn-bg : #1a71ff;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#1a71ff;
}
.btn-lightgray {
--bs-btn-color:#474747;
--bs-btn-bg: #eee;
--bs-btn-hover-color: #474747;
--bs-btn-hover-bg:#eee;
}
.btn-darkgray {
--bs-btn-color: #fff;
--bs-btn-bg: #676767;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#676767;
}
.btn-square {
aspect-ratio: 1 / 1 !important;
}
.btn-search {
--bs-btn-color: #fff;
--bs-btn-bg: #44539e;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#44539e;
}
.btn-excel {
--bs-btn-color: #fff;
--bs-btn-bg: #217346;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#217346;
}
.btn-open-detail {
--bs-btn-color: #fff;
--bs-btn-bg: #44539e;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg:#44539e;
float:right;
}
.btn-pagination {
border:1px solid #e1e1e1;
line-height: 0px;
border-radius: 7px;
background:#F5F5F5;
--bs-btn-disabled-bg: #F5F5F5;
}
/* 버튼영역 */
.container-page-btn {
min-height : 30px;
margin:8px 0;
clear: both;
position: relative;
overflow: hidden;
display: flex;
justify-content: space-between;
align-items: center;
}
.container-page-btn .btn{
margin:0 3px;
}
.container-window-btn-right {
display: flex;
align-items: center;
margin-left: auto;
column-gap: 3px;
}
.btns .btn {
margin:0 3px;
}
.w-form-select {
width: max-content !important;
min-width: 6.25rem !important;
max-width: 16.25rem !important;
}
.w-form-date {
width: 7.5rem !important;
}
.w-automin {
min-width: auto !important;
}
.resize-handle {
position: absolute;
top: 0; width: 7px; height: 40px;
background: transparent;
cursor: col-resize;
}
/* 배경색, 외곽선 */
.traffic {
}
.cleanparking {
--program-border : 1px solid #B5B9BB;
--program-border-shadow : 0 0 0 1px inset #FCFFFF;
--program-bg : #E3E6E8;
--program-title-bg : #EEC575;
--program-btn-bg : #F0F0F0;
--program-popup-bg : #E2E6E9;
}
.cleanparking.green {
--program-title-bg : #ADD773;
}
.border-program {
box-shadow: var(--program-border-shadow) !important;
border : var(--program-border) !important;
}
.bg-program {
background-color: var(--program-bg) !important;
}
.bg-program-btn {
background-color: var(--program-btn-bg) !important;
}
.bg-program-popup {
background-color: var(--program-popup-bg)!important;
}
.bg-program-title {
background-color: var(--program-title-bg) !important;
}
.no-bgi {
background-image: none !important;
}
/* pdf출력 설정 */
select.option-style-select[data-option-style='FILL_STROKE']{ font-weight: bold; }
select.option-style-select > option[value='FILL_STROKE']{ font-weight: bold; }
select.option-style-select[data-option-style='gulimche']{ font-family: gulimche; }
select.option-style-select[data-option-style='gulim']{ font-family: gulim; }
select.option-style-select[data-option-style='batangche']{ font-family: batangche; }
select.option-style-select[data-option-style='batang']{ font-family: batang; }
select.option-style-select[data-option-style='dotumche']{ font-family: dotumche; }
select.option-style-select[data-option-style='dotum']{ font-family: dotum; }
select.option-style-select[data-option-style='gungsuhche']{ font-family: gungsuhche; }
select.option-style-select[data-option-style='gungsuh']{ font-family: gungsuh; }
select.option-style-select > option[value='gulimche']{ font-family: gulimche; }
select.option-style-select > option[value='gulim']{ font-family: gulim; }
select.option-style-select > option[value='batangche']{ font-family: batangche; }
select.option-style-select > option[value='batang']{ font-family: batang; }
select.option-style-select > option[value='dotumche']{ font-family: dotumche; }
select.option-style-select > option[value='dotum']{ font-family: dotum; }
select.option-style-select > option[value='gungsuhche']{ font-family: gungsuhche; }
select.option-style-select > option[value='gungsuh']{ font-family: gungsuh; }
select.option-style-select[data-option-style='RED']{ color: var(--pdf-red);background-color: var(--pdf-red); }
select.option-style-select[data-option-style='GREEN']{ color: var(--pdf-green);background-color: var(--pdf-green); }
select.option-style-select[data-option-style='BLUE']{ color: var(--pdf-blue);background-color: var(--pdf-blue); }
select.option-style-select[data-option-style='YELLOW']{ color: var(--pdf-yellow);background-color: var(--pdf-yellow); }
select.option-style-select[data-option-style='ORANGE']{ color: var(--pdf-orange);background-color: var(--pdf-orange); }
select.option-style-select[data-option-style='YELLOW_GREEN']{ color: var(--pdf-yellow-green);background-color: var(--pdf-yellow-green); }
select.option-style-select[data-option-style='CYAN']{ color: var(--pdf-cyan);background-color: var(--pdf-cyan); }
select.option-style-select[data-option-style='GREEN_CYAN']{ color: var(--pdf-green-cyan);background-color: var(--pdf-green-cyan); }
select.option-style-select[data-option-style='CYAN_BLUE']{ color: var(--pdf-cyan-blue);background-color: var(--pdf-cyan-blue); }
select.option-style-select[data-option-style='MAGENTA']{ color: var(--pdf-magenta);background-color: var(--pdf-magenta); }
select.option-style-select[data-option-style='VIOLET']{ color: var(--pdf-violet);background-color: var(--pdf-violet); }
select.option-style-select[data-option-style='DEEP_PINK']{ color: var(--pdf-deep-pink);background-color: var(--pdf-deep-pink); }
select.option-style-select[data-option-style='WHITE']{ color: var(--pdf-white);background-color: var(--pdf-white); }
select.option-style-select[data-option-style='LIGHT_GREY']{ color: var(--pdf-light-grey);background-color: var(--pdf-light-grey); }
select.option-style-select[data-option-style='GREY']{ color: var(--pdf-grey);background-color: var(--pdf-grey); }
select.option-style-select[data-option-style='DARK_GREY']{ color: var(--pdf-dark-grey);background-color: var(--pdf-dark-grey); }
select.option-style-select[data-option-style='BLACK']{ color: var(--pdf-black);background-color: var(--pdf-black); }
select.option-style-select > option[value='RED']{ color: var(--pdf-red);background-color: var(--pdf-red); }
select.option-style-select > option[value='GREEN']{ color: var(--pdf-green);background-color: var(--pdf-green); }
select.option-style-select > option[value='BLUE']{ color: var(--pdf-blue);background-color: var(--pdf-blue); }
select.option-style-select > option[value='YELLOW']{ color: var(--pdf-yellow);background-color: var(--pdf-yellow); }
select.option-style-select > option[value='ORANGE']{ color: var(--pdf-orange);background-color: var(--pdf-orange); }
select.option-style-select > option[value='YELLOW_GREEN']{ color: var(--pdf-yellow-green);background-color: var(--pdf-yellow-green); }
select.option-style-select > option[value='CYAN']{ color: var(--pdf-cyan);background-color: var(--pdf-cyan); }
select.option-style-select > option[value='GREEN_CYAN']{ color: var(--pdf-green-cyan);background-color: var(--pdf-green-cyan); }
select.option-style-select > option[value='CYAN_BLUE']{ color: var(--pdf-cyan-blue);background-color: var(--pdf-cyan-blue); }
select.option-style-select > option[value='MAGENTA']{ color: var(--pdf-magenta);background-color: var(--pdf-magenta); }
select.option-style-select > option[value='VIOLET']{ color: var(--pdf-violet);background-color: var(--pdf-violet); }
select.option-style-select > option[value='DEEP_PINK']{ color: var(--pdf-deep-pink);background-color: var(--pdf-deep-pink); }
select.option-style-select > option[value='WHITE']{ color: var(--pdf-white);background-color: var(--pdf-white); }
select.option-style-select > option[value='LIGHT_GREY']{ color: var(--pdf-light-grey);background-color: var(--pdf-light-grey); }
select.option-style-select > option[value='GREY']{ color: var(--pdf-grey);background-color: var(--pdf-grey); }
select.option-style-select > option[value='DARK_GREY']{ color: var(--pdf-dark-grey);background-color: var(--pdf-dark-grey); }
select.option-style-select > option[value='BLACK']{ color: var(--pdf-black);background-color: var(--pdf-black); }
.min-w-max-c {
min-width: max-content;
}
#divdashboard {
max-height: 800px;
overflow-y:auto;
}
.modal-body-min {
min-height:10em;
min-width:30%;
}
.ox-auto {
overflow-x: auto;
}
.oy-auto {
overflow-y: auto;
}
.ox-scroll {
overflow-x: scroll;
}
.oy-scroll {
overflow-y: scroll;
}
.min-w-px-50 {
min-width: 50px;
}
.min-w-px-300 {
min-width: 300px;
}
.min-w-px-320 {
min-width: 320px;
}
.min-w-px-350 {
min-width: 350px;
}
.min-w-px-400 {
min-width: 400px;
}
.min-w-px-550 {
min-width: 550px;
}
.min-w-px-700 {
min-width: 700px;
}
.min-w-px-1400 {
min-width: 1400px;
}
.mw-px-50 {
max-width: 50px;
}
.mw-px-100 {
max-width: 100px;
}
.mw-px-150 {
max-width: 150px;
}
.mw-px-250 {
max-width: 250px;
}
.mw-px-300 {
max-width: 300px;
}
.mw-px-1000 {
max-width: 1000px;
}
.mw-px-1100 {
max-width: 1100px;
}
.mw-px-1200 {
max-width: 1200px;
}
.mh-px-100 {
max-height: 100px;
}
.mh-px-150 {
max-height: 150px;
}
.mh-px-200 {
max-height: 200px;
}
.mh-px-250 {
max-height: 250px;
}
.mh-px-300 {
max-height: 300px;
}
.mh-px-350 {
max-height: 350px;
}
.mh-px-400 {
max-height: 400px;
}
.mh-px-450 {
max-height: 450px;
}
.mh-px-500 {
max-height: 500px;
}
.mh-px-550 {
max-height: 550px;
}
.mh-px-580 {
max-height: 580px;
}
.mh-px-600 {
max-height: 600px;
}
.mh-px-650 {
max-height: 650px;
}
.mh-px-700 {
max-height: 700px;
}
.mh-px-750 {
max-height: 750px;
}
.mh-px-800 {
max-height: 800px;
}
.border-separator-y {
border-top:1px solid #dfdfdf;
border-bottom:1px solid #dfdfdf;
}
.border-separator-t {
border-top:1px solid #dfdfdf;
}
.border-separator-b {
border-bottom:1px solid #dfdfdf;
}
.fit-contain {
object-fit: contain;
}
body:not(.root-privacy-on) td.privacy-cell span:nth-child(1){
display:block;
}
body:not(.root-privacy-on) td.privacy-cell span:nth-child(2){
display:none;
}
body.root-privacy-on td.privacy-cell span:nth-child(1){
display:none;
}
body.root-privacy-on td.privacy-cell span:nth-child(2){
display:block;
}

File diff suppressed because it is too large Load Diff

@ -1,667 +0,0 @@
/**************************************************************************
* 동기식 대화상자
**************************************************************************/
async function confirm2(msg){
return await dialog2(msg, "confirm");
}
async function alert2(msg){
return await dialog2(msg, "alert");
}
async function prompt2(msg){
return await dialog2(msg, "prompt");
}
async function dialog2(msg, type, buttons){
var dlgId = "dlg-" + uuid();
var resp = await fetch(wctx.url("/webjars/html/dialog.html"));
var template = await resp.text();
var container = "<div class='container-fluid text-center fs-4'>{content}</div>";
if(type == "prompt"){
var rsn = '<br/><textarea type="text" id="rsn" class="form-control w-100"></textarea>';
content = container.replace(/{content}/g, msg + rsn);
} else {
content = container.replace(/{content}/g, msg);
}
var backdropID = dlgId + "-backdrop";
var tmpl = template.replace(/{id}/g, dlgId).replace(/{title}/g, "").replace(/{size}/, "").replace("","");
tmpl = tmpl.replace("modal-dialog", "modal-dialog-centered modal-dialog");
tmpl = tmpl.replace("data-bs-backdrop=\"static\"", "data-bs-backdrop=\"static\" data-bs-keyboard=\"false\"");
tmpl = tmpl.replace("text-end hidden","text-end");
tmpl = tmpl.replace("btn-primary","btn-primary btn-ok");
var dlg = $(tmpl).appendTo("body");
if(type == "confirm" || type == "alert" || type == "prompt"){
if(type == "confirm" || type == "prompt"){
dlg.find(".modal-footer").append('<button type="button" class="btn btn-primary btn-cancel">취소</button>');
}
} else {
dlg.find(".modal-footer").find(".btn-ok").remove();
for(var i=0; i < buttons.length; i++){
dlg.find(".modal-footer").append(
'<button type="button" class="btn btn-primary btn-custom" data-key="'+buttons[i].key+'" >'
+buttons[i].value
+'</button>');
}
}
dlg.find(".modal-header").remove();
dlg.find(".modal-body").html(content).fadeIn();
dlg.on("hidden.bs.modal", function() {
$("#" + dlgId +",#" + backdropID).remove();
});
dlg.modal("show");
$(".modal-backdrop").each(function() {
var backdrop = $(this);
if (!backdrop.prop("id")){
backdrop.prop("id", backdropID);
}
});
setDialogZindex();
return new Promise(resolve => {
if(type == "confirm" || type == "alert" || type == "prompt"){
if(type == "prompt"){
dlg[0].querySelector(".btn-ok").addEventListener("click", () => {
dlg.modal("hide");
resolve($("#rsn").val());
});
} else {
dlg[0].querySelector(".btn-ok").addEventListener("click", () => {
dlg.modal("hide");
resolve(true);
});
}
if(type == "confirm"){
dlg[0].querySelector(".btn-cancel").addEventListener("click", () => {
dlg.modal("hide");
resolve(false);
});
}
if(type == "prompt"){
dlg[0].querySelector(".btn-cancel").addEventListener("click", () => {
dlg.modal("hide");
resolve(null);
});
}
} else {
dlg.find(".btn-custom").each(function(){
this.addEventListener("click", () => {
dlg.modal("hide");
resolve(this.dataset.key);
});
});
}
});
}
/**************************************************************************
* 모달창 z-index 초기화
**************************************************************************/
function setDialogZindex(){
var parentDialog = getLastOpenDialog();
var childDialog = getLastDialog();
if($(parentDialog).length == 0 || parentDialog == childDialog){
return;
}
var parentZ = $(parentDialog).css("z-index");
$(childDialog).css("z-index", Number(parentZ)+10);
var backdrop = $(childDialog).next();
if(backdrop.hasClass("modal-backdrop")){
backdrop.css("z-index", Number(parentZ)+9);
};
}
/**************************************************************************
* 모달창 닫기 버튼 포커스
**************************************************************************/
function focusClose() {
$(document).find("div.modal").last().on('shown.bs.modal', function () {
$(this).find(".btn-close").trigger('focus');
});
}
/**************************************************************************
* 모달창 확인 버튼 포커스
**************************************************************************/
function focusOK() {
$(document).find("div.modal").last().on('shown.bs.modal', function () {
$(this).find(".modal-footer").find("button").each(function(){
if($(this).text() == "확인"){
$(this).trigger('focus');
}
});
});
}
/**************************************************************************
* pdf파일 미리보기
**************************************************************************/
function openPDF(blob, windowName){
var popup = window.open(
wctx.url("/resources/html/pdf.html")
,windowName
,'top=10, left=10'
);
popup.onload = () => {
popup.makePdfFromBlob(blob);
};
}
/**************************************************************************
* validation
**************************************************************************/
function customValidate(targetArr) {
var handler = validationFailureHandler();
for(var i=0;i<targetArr.length;i++){
var input = targetArr[i];
if(!validInput(input)){
return false;
}
if(!input.required && input.value == ""){
continue;
}
//입력값의 최대 바이트 수 체크
if(input.dataset.maxlengthb){
if(!isMaxByte(input.value, input.dataset.maxlengthb)){
handler.tooLong(input);
return false;
}
}
//입력값의 포맷형식 체크
if(input.dataset.fmtType){
if(input.dataset.fmtType == "day"){
if(!isDate(input.value)){
handler.typeMismatch(input);
return false;
}
}
if(input.dataset.fmtType == "time"){
if(!isTime(input.value)){
handler.typeMismatch(input);
return false;
}
}
if(input.dataset.fmtType == "zeroLpadNumber"){
if(!isDigitString(input.value)){
handler.typeMismatch(input);
return false;
}
}
}
}
return true;
}
/**
* 문자열이 숫자형인지의 여부를 반환한다.
* @param exceptChar - 추가 허용할 문자
* @return 숫자형여부
*/
function isNumber(str, exceptChar) {
return (/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/).test(str.replaceAll(exceptChar,"")) ? true : false;
};
/**
* 문자열이 숫자형문자 인지의 여부를 반환한다.(0~9 허용)
* @param
* @return 숫자형문자 여부
*/
function isDigitString(str) {
return (/^[0-9]+$/).test(str) ? true : false;
};
// 시간체크
function isTime(str) {
str = str.replaceAll(":","");
if(str.length != 6){
return false;
}
if (!isNumber(str, "")) {
return false;
}
var hour = str.substring(0,2);
var minute = str.substring(2,4);
var second = str.substring(4,6);
if(hour>="00" && hour<="23"){
if(minute>="00" && minute<="59"){
if(second>="00" && second<="59"){
return true;
}
}
}
return false;
}
// 날짜체크
function isDate(str) {
str = str.replaceAll("-","");
if(str.length != 8){
return false;
}
if (!isNumber(str, "")) {
return false;
}
// 숫자, length 확인
var year = str.substring(0,4);
var month = str.substring(4,6);
var day = str.substring(6,8);
// 유효날짜 확인
if (year>="0001" && year<="9999" && month>="01" && month<="12") {
febDays = "29";
if ((parseInt(year,10) % 4) == 0) {
if ((parseInt(year,10) % 100) == 0 && (parseInt(year,10) % 400) != 0){
febDays = "28";
}
}else{
febDays = "28";
}
if (month=="01" && day>="01" && day<="31") return true;
if (month=="02" && day>="01" && day<=febDays) return true;
if (month=="03" && day>="01" && day<="31") return true;
if (month=="04" && day>="01" && day<="30") return true;
if (month=="05" && day>="01" && day<="31") return true;
if (month=="06" && day>="01" && day<="30") return true;
if (month=="07" && day>="01" && day<="31") return true;
if (month=="08" && day>="01" && day<="31") return true;
if (month=="09" && day>="01" && day<="30") return true;
if (month=="10" && day>="01" && day<="31") return true;
if (month=="11" && day>="01" && day<="30") return true;
if (month=="12" && day>="01" && day<="31") return true;
return false;
}
return false;
}
/**
* 문자열이 지정한 최소길이 이상인지의 여부를 반환한다.
* @param minLen - 최소길이
* @return 최소길이 이상인지의 여부
*/
function isMin(str, minLen) {
return str.length >= minLen;
};
/**
* 문자열이 지정한 최대길이 이하인지의 여부를 반환한다.
* @param maxLen - 최대길이
* @return 최대길이 이하인지의 여부
*/
function isMax(str, maxLen) {
return str.length <= maxLen;
};
/**
* 문자열이 지정한 최소바이트수 이상인지의 여부를 반환한다.
* @param minByte - 최소바이트수
* @return 최소바이트수 이상인지의 여부
*/
function isMinByte(str, minByte) {
return getByte(str) >= minByte;
};
/**
* 문자열이 지정한 최대바이트수 이하인지의 여부를 반환한다.
* @param maxByte - 최대바이트수
* @return 최대바이트수 이하인지의 여부
*/
function isMaxByte(str, maxByte) {
return getByte(str) <= maxByte;
};
/**
* 문자열이 영어만으로 구성되어 있는지의 여부를 반환한다.
* @param exceptChar - 추가 허용할 문자
* @return 영어만으로 구성되어 있는지의 여부
*/
function isEng(str, exceptChar) {
return (/^[a-zA-Z]+$/).test(str.replaceAll(exceptChar,"")) ? true : false;
};
/**
* 문자열이 숫자와 영어만으로 구성되어 있는지의 여부를 반환한다.
* @param exceptChar - 추가 허용할 문자
* @return 숫자와 영어만으로 구성되어 있는지의 여부
*/
function isEngNum(str, exceptChar) {
return (/^[0-9a-zA-Z]+$/).test(str.replaceAll(exceptChar,"")) ? true : false;
};
/**
* 이메일 주소의 유효성 여부를 반환한다.
* @return 유효성 여부
*/
function isEmail(str) {
return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(str);
};
/**************************************************************************
* 엑셀 파일 작성 정보 생성
**************************************************************************/
function getCellDefs($th, $td){
var cellDefs = [];
for(var i=0; i < $th.length; i++){
var label = $th.eq(i).text();
label = label.replace("\n", "");
label = label.replace("\t", "");
label = label.replace(" ", "");
if(label != ""){
var width = $th.eq(i).outerWidth();
width = Math.ceil(width/10) + 2;
var field = "";
if($td.eq(i).hasClass("privacy-cell")){
field = $td.eq(i).find("span:eq(0)").text();
} else {
field = $td.eq(i).text();
}
field = field.replace("{", "");
field = field.replace("}", "");
field = field.replace("\n", "");
field = field.replace("\t", "");
field = field.replace(" ", "");
var cellDef = {
label : label,
width : width,
field : field
};
cellDefs.push(cellDef);
}
}
return JSON.stringify(cellDefs);
}
/**************************************************************************
* UI요소 세팅
**************************************************************************/
$.fn.set = function(value) {
return this.each(function(){
if($(this).hasClass('form-date')){
if(value != null && value.length == 8 && value.indexOf("-") == -1){
value = value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6,8);
}
$(this).datepicker("setDate", value);
} else if($(this).hasClass('option-style-select')){
$(this).val(value);
this.changeUI();
} else if(this.type == "checkbox" || this.type == "radio"){
if(this.value == value){
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
} else {
if(this.dataset.fmtType == "number"){
$(this).val(numberFormat.format(value));
} else {
$(this).val(value);
}
}
});
}
/**************************************************************************
* FimsFormFields
**************************************************************************/
class FimsFormFields extends FormFields {
/**
* form json data set
* element tag에 data-fmt-type 으로 데이타 format이 지정된 경우 해당 포맷으로 출력
* @param {object} formObj document.querySelector('form')
* @param {object} jsonData json type data
*/
set(ctrl,obj){
document.querySelectorAll(this.children).forEach(input => {
let prop = input.getAttribute("data-map")
|| input.name
|| input.id;
if (!prop) return;
let dataItem = obj instanceof DataItem,
value = dataItem ? obj.getValue(prop) : obj[prop];
if ("radio" == input.type) {
if (value && value == input.value)
input.checked = true;
} else if("checkbox" == input.type) {
if (value && value == input.value)
input.checked = ("Y" === value);
} else if(input.tagName == "SELECT") {
for(let option of input.options) {
if(option.value == value){
option.selected = true;
} else {
option.selected = false;
}
}
} else {
if(value == null){
value = "";
}
// element data-fmt-type에 정의된 format 적용
// dt - yyyy-mm-dd HH:mm:ss, day - yyyy-mm-dd, time - HH:mm:ss, number - #,###
if(input.dataset.fmtType){
const fmtType = input.dataset.fmtType;
switch (fmtType) {
case 'dt' :
value = datetimeFormat.format(value);
break;
case 'day' :
value = dateFormat.format(value);
break;
case 'time' :
value = timeFormat.format(value);
break;
case 'number' :
value = numberFormat.format(value);
break;
default:
break;
}
}
if(input.name){
if($(input).hasClass('form-date')){
$(input).datepicker("setDate", value);
} else {
input.value = value;
}
//보안모드 마스킹 항목
if(input.tagName === 'INPUT' && input.id && input.classList.contains("privacy")){
let maskVal = value.replace(/./g, "*");
document.getElementById("mask-"+input.id).value = maskVal;
}
}
}
});
}
get() {
let obj = {};
document.querySelectorAll(this.children).forEach(input => {
let property = input.name || input.id;
let value = input.value;
if("radio" == input.type) {
if(input.checked)
obj[property] = value;
} else if("checkbox" == input.type) {
if(input.checked){
if(obj[property]){
obj[property] += ","+value;
} else {
obj[property] = value;
}
}
} else {
if(input.dataset.fmtType){
const fmtType = input.dataset.fmtType;
switch (fmtType) {
case 'dt' :
value = value.replaceAll("-","").replaceAll(":","").replaceAll(" ","");
break;
case 'day' :
value = value.replaceAll("-","");
break;
case 'time' :
value = value.replaceAll(":","");
break;
case 'number' :
value = value.replaceAll(",","");
break;
default:
break;
}
}
obj[property] = value;
}
});
return obj;
}
}
const Apply = {
fromDataset : {
gridCheckbox : function(dataset, tbody, colIndex, checkedArr){
var keys = checkedArr.map(item => dataset.getKey(item));
$(tbody).find("tr").each(function() {
var cb = $(this).find("td").eq(colIndex).find(":checkbox");
cb.prop("checked", keys.includes(cb.val()));
});
},
gridButton : function(dataset, button, checkedArr){
var keys = checkedArr.map(item => dataset.getKey(item));
$(button).prop("disabled", keys.length < 1);
},
currentRow : function(dataset, dataItem, tbody){
if(!dataItem){
return;
}
$(tbody).setCurrentRow(dataset.getKey(dataItem));
},
paging : function(dataset, resp, navId){
$("#"+navId).setPagingInfo({
list : dataset,
prefix : navId,
totalSize : resp["Total"]
});
},
getTbody : function(dataset, found, notFound, replacer){
var empty = dataset.empty;
var trs = empty ? notFound : dataset.inStrings(found, replacer);
return trs.join();
}
},
toDataset : {
current : function(dataset, dataKey){
dataset.setCurrent(dataKey, false);
},
selection : function(dataset, checkbox, bool){
var parentEl = $(checkbox).parent()[0];
var isTH = parentEl.tagName == "TH" ? true : false;
if(isTH) {
var dataItems = dataset.getDataset("item");
for(var i=0; i < dataItems.length; i++){
dataItems[i].select(bool);
}
} else {
var dataItem = dataset.getData(checkbox.value, "item");
dataItem.select(bool);
}
},
set : function(dataset, resp){
dataset._byKeys = {};
dataset._current = null;
var data = dataset._getDataItems(resp = resp || {});
dataset._items = data.items;
dataset._byKeys = data.byKeys;
},
add : function(dataset, resp){
if (dataset.empty){
this.set(dataset, resp);
return;
}
var state = dataset.state;
var data = dataset._getDataItems(resp = resp || {});
dataset._items = this._items.concat(data.items);
dataset._byKeys = {
...this._byKeys,
...data.byKeys
};
}
},
fromDatasetControl : {
load : async function(control, pageNum){
return new Promise((resolve, reject) => {
control.query.pageNum = pageNum;
if (!control.query.pageNum){
control.query.pageNum = 1;
}
ajax.get({
url:control.urls.load,
data:control.query,
success:(resp) => {
resolve(resp);
}
});
});
}
}
};

@ -0,0 +1,128 @@
/**************************************************************************
* FimsFormFields
**************************************************************************/
class FimsFormFields extends FormFields {
/**
* form json data set
* element tag에 data-fmt-type 으로 데이타 format이 지정된 경우 해당 포맷으로 출력
* @param {object} formObj document.querySelector('form')
* @param {object} jsonData json type data
*/
set(ctrl,obj){
document.querySelectorAll(this.children).forEach(input => {
let prop = input.getAttribute("data-map")
|| input.name
|| input.id;
if (!prop) return;
let dataItem = obj instanceof DataItem,
value = dataItem ? obj.getValue(prop) : obj[prop];
if ("radio" == input.type) {
if (value && value == input.value)
input.checked = true;
} else if("checkbox" == input.type) {
if (value && value == input.value)
input.checked = ("Y" === value);
} else if(input.tagName == "SELECT") {
for(let option of input.options) {
if(option.value == value){
option.selected = true;
} else {
option.selected = false;
}
}
} else {
if(value == null){
value = "";
}
// element data-fmt-type에 정의된 format 적용
// dt - yyyy-mm-dd HH:mm:ss, day - yyyy-mm-dd, time - HH:mm:ss, number - #,###
if(input.dataset.fmtType){
const fmtType = input.dataset.fmtType;
switch (fmtType) {
case 'dt' :
value = datetimeFormat.format(value);
break;
case 'day' :
value = dateFormat.format(value);
break;
case 'time' :
value = timeFormat.format(value);
break;
case 'number' :
value = numberFormat.format(value);
break;
default:
break;
}
}
if(input.name){
if($(input).hasClass('form-date')){
$(input).datepicker("setDate", value);
} else {
input.value = value;
}
//보안모드 마스킹 항목
if(input.tagName === 'INPUT' && input.id && input.classList.contains("privacy")){
let maskVal = value.replace(/./g, "*");
document.getElementById("mask-"+input.id).value = maskVal;
}
}
}
});
}
get() {
let obj = {};
document.querySelectorAll(this.children).forEach(input => {
let property = input.name || input.id;
let value = input.value;
if("radio" == input.type) {
if(input.checked)
obj[property] = value;
} else if("checkbox" == input.type) {
if(input.checked){
if(obj[property]){
obj[property] += ","+value;
} else {
obj[property] = value;
}
}
} else {
if(input.dataset.fmtType){
const fmtType = input.dataset.fmtType;
switch (fmtType) {
case 'dt' :
value = value.replaceAll("-","").replaceAll(":","").replaceAll(" ","");
break;
case 'day' :
value = value.replaceAll("-","");
break;
case 'time' :
value = value.replaceAll(":","");
break;
case 'number' :
value = value.replaceAll(",","");
break;
default:
break;
}
}
obj[property] = value;
}
});
return obj;
}
}

@ -1,8 +0,0 @@
/**
* 버튼과 메뉴를 매핑한다.
*/
function mappingButtonAndMenu(buttonId, menuNm){
$("#"+buttonId).on( "click", function() {
$("#menus").find("div[data-i18n='"+menuNm+"']").parent("a").trigger("click");
});
}

@ -1,624 +0,0 @@
/*
* 현재날짜를 YYYY-MM-DD 포맷으로 반환
*/
function TODAY(){
return dateFormat.format(new Date());
}
function inputDateComparison(sndngYmd, sndngEndYmd) {
let startDate = inputDateSplit(sndngYmd); // 시작일
let endDate = inputDateSplit(sndngEndYmd); // 종료일
if (typeof startDate == "undefined" || startDate == null || startDate == "") {
alert("시작일이 입력되지 않았습니다.\n시작일을 입력해주세요.");
$("#sndngYmd").focus();
return false;
}
if (typeof endDate == "undefined" || endDate == null || endDate == "") {
alert("종료일이 입력되지 않았습니다.\n종료일을 입력해주세요.");
$("#sndngEndYmd").focus();
return false;
}
// 입력일을 확인하는 이유는 현재 작성한 일자가 시작일인지 종료일인지 확인하기 위해서이다.
if (startDate > endDate) {
alert("시작일이 종료일보다 이 후 일수는 없습니다.\n다시 선택하여 주시기 바랍니다.");
$("#sndngYmd").focus();
return false;
}
return true;
}
// 날짜형식에 "-"이 사용된 경우에 한하여 날짜값에서 "-" 기호를 제거한다.
function inputDateSplit(obj) {
if (obj == "") {
return obj;
} else {
let dateArray = obj.split("-");
return dateArray[0] + dateArray[1] + dateArray[2];
}
}
var DateUtil = {
/*============================
* 현재날짜로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addMonth가 0 이면 현재월
* -음의 숫자면 전월 (ex: -1 전월, -2 전전월, -3 ...)
* -양의 숫자면 차월 (ex: 1 차월, 2 차차월, 3 ...)
============================*/
getDate : function(){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0]);
break;
case 2:
result = calcDate(arguments[0], arguments[1]);
break;
default:
result = calcDate();
break;
}
return result;
//날짜 계산
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var date = new Date();
var yyyy = date.getFullYear();
var mm = ( date.getMonth() + (addMonth) );
var dd = date.getDate();
if(stdDay!=undefined){
stdDay = stdDay.replace(/[^0-9]/gi,'');
yyyy = stdDay.substring(0,4);
mm = stdDay.substring(4,6);
dd = stdDay.substring(6,8);
if(addMonth==13)
yyyy = Number(yyyy)+1;
}
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = dd>ago_last_dd?ago_last_dd:dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
//+ 한달 후 말일 계산
getAddMonth : function(stdDay){
//날짜 계산
var rtnVal = calcDate(0,stdDay);
return rtnVal;
function calcDate(addMonth, stdDay){
if(addMonth!=undefined)
addMonth = addMonth + 1;
addMonth = addMonth==undefined?1:addMonth;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
stdDay = stdDay.replace(/[^0-9]/gi,'');
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
mm = Number(mm)+addMonth;
if(addMonth==13)
yyyy = Number(yyyy)+1;
var isAfter = false;
if((addMonth*1)>0)
isAfter = true;
/*
* 유효성 처리
* -(year) 넘김 처리
* -말일(last day) 처리
*/
var newYear = DateUtil.getNewYear(isAfter, yyyy, mm);
yyyy = newYear.yyyy;
mm = newYear.mm;
var ago_last_dd = DateUtil.getEndOfMonthDay(yyyy, mm);
dd = ago_last_dd;
/*
* format 설정
*/
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+mm+dd;
obj.yyyy = ""+yyyy;
obj.mm = ""+mm;
obj.dd = ""+dd;
return obj;
}
},
/*============================
* 현재날짜(or 기준일)로부터 단위로 계산된 날짜(yyyymmdd) 반환
* -addDay가 0 이면 금일
* -음의 숫자면 전일 (ex: -1 작일, -2 재작일, -3 ...)
* -양의 숫자면 차일 (ex: 1 명일, 2 재명일, 3 ...)
============================*/
getDateDay: function(addDay){
var result = new Object();
switch (arguments.length) {
case 1:
result = calcDate(arguments[0], DateUtil.getDate().date);
break;
default:
result = calcDate(0, DateUtil.getDate().date);
break;
}
return result;
//날짜 계산
function calcDate(addDay, stdDay){
addDay = addDay==undefined||addDay==null?0:addDay*1;
/*
* 필수값 설정
* -날짜 설정
* -ago OR after 여부 설정
*/
var yyyy = stdDay.substring(0,4);
var mm = stdDay.substring(4,6);
var dd = stdDay.substring(6,8);
var dateObj = new Date(yyyy, (mm-1)*1, dd*1);
dateObj.setDate(dateObj.getDate()+(addDay));
yyyy = dateObj.getFullYear();
mm = dateObj.getMonth()+1;
dd = dateObj.getDate();
if( (''+mm).length == 1 )
mm = "0"+ mm;
if( (''+dd).length == 1 )
dd = "0"+ dd;
/*
* 결과 반환
*/
var obj = new Object();
obj.date = ""+yyyy+"-"+mm+"-"+dd;
obj.yyyy = yyyy;
obj.mm = mm;
obj.dd = dd;
return obj;
}
},
/*============================
* 달의 마지막 날짜(dd) 반환
============================*/
getEndOfMonthDay : function(yy, mm){
var max_days=0;
if(mm == 1 || mm == '01') {
max_days = 31 ;
} else if(mm == 2 || mm == '02') {
if ((( yy % 4 == 0) && (yy % 100 != 0)) || (yy % 400 == 0))
max_days = 29;
else
max_days = 28;
}
else if (mm == 3 || mm == '03') max_days = 31;
else if (mm == 4 || mm == '04') max_days = 30;
else if (mm == 5 || mm == '05') max_days = 31;
else if (mm == 6 || mm == '06') max_days = 30;
else if (mm == 7 || mm == '07') max_days = 31;
else if (mm == 8 || mm == '08') max_days = 31;
else if (mm == 9 || mm == '09') max_days = 30;
else if (mm == 10 || mm == '10') max_days = 31;
else if (mm == 11 || mm == '11') max_days = 30;
else if (mm == 12 || mm == '12') max_days = 31;
else return '';
return max_days;
},
/*============================
* (year) 넘김 처리
============================*/
getNewYear : function(isAfter, yyyy, mm){
/*
* (year) 넘김 처리
*/
if(isAfter){
if(mm>12){
var formula = Math.floor(mm/12);
yyyy = Number(yyyy)+(formula);
mm = mm - ((formula)*12);
}
}else{
if(mm<1){
var formula = Math.floor((mm*(-1))/12)+1;
yyyy = yyyy-(formula);
mm = mm + ((formula)*12);
}
}
/*
* 포맷 설정
* -(month) 두자리 설정
*/
if( (''+mm).length == 1 )
mm = "0"+ mm;
/*
* 결과 반환
*/
var obj = new Object();
obj.yyyy = ''+yyyy;
obj.mm = ''+mm;
return obj;
}
}
function getDateObject(dateStr){
var year = dateStr.substr(0,4);
var month = dateStr.substr(4,2) - 1;
var day = dateStr.substr(6,2);
return new Date(year,month,day);
}
function getDateString(dateObj) {
var result = "";
var dateFormat = "YYYYMMDD";
for (var i = 0; i < dateFormat.length; i++) {
result += dateFormat.indexOf("YYYY", i) == i ? (i+=3, dateObj.getFullYear() ) :
dateFormat.indexOf("MM", i) == i ? (i+=1, to2(dateObj.getMonth()+1) ) :
dateFormat.indexOf("DD", i) == i ? (i+=1, to2(dateObj.getDate()) ) :
(dateFormat.charAt(i) );
}
return result;
};
function to2(numberObj) {
return (numberObj > 9 ? "" : "0") + numberObj;
};
/**
* 입력일의 이전일 계산
*/
function getPrevDay(datestr, days) {
if ( days == "0")
return datestr;
datestr = datestr.replace(/-/g, "");
if (datestr == "")
return "";
var dateObj = window.getDateObject(datestr);
dateObj.setDate(dateObj.getDate() - parseInt(days, 10));
return window.getDateString(dateObj);
};
/**
* 입력일의 다음일 계산
*/
function getNextDay(datestr, days) {
if ( days == "0") return datestr;
datestr = datestr.replace(/-/g, "");
if (datestr == "") return "";
var dateObj = window.getDateObject(datestr);
dateObj.setDate(dateObj.getDate()+ parseInt(days, 10));
return window.getDateString(dateObj);
};
/**
* 해당월의 마지막날
*/
function getLastDay(datestr) {
datestr = datestr.replace(/-/g, "");
if (datestr == "") return "";
var strNextMonth = window.addMonth(datestr, 1);
strNextMonth = strNextMonth.replace(/-/g, "");
datestr = strNextMonth.substring(0, 6) + '01';
var strLastDay = window.addDate(datestr, -1);
strLastDay = strLastDay.replace(/-/g, "");
var dateObj = window.getDateObject(strLastDay);
return dateObj.getDate();
};
/**
* , , 일을 입력 받아 Date String으로 변환
*/
function getDatetime(nYear, nMonth, nDate){
var dateObj = null;
if (nYear.toString().trim().length >= 5) {
var sDate = new String(nYear);
var nYear = sDate.substr(0,4);
var nMonth = sDate.substr(4,2);
var nDate = ((sDate.substr(6,2) == "") ? 1 : sDate.substr(6,2));
var nHours = ((sDate.substr(8,2) == "") ? 0 : sDate.substr(8,2));
var nMinutes = ((sDate.substr(10,2) == "") ? 0 : sDate.substr(10,2));
var nSeconds = ((sDate.substr(12,2) == "") ? 0 : sDate.substr(12,2));
dateObj = new Date(parseInt(nYear), parseInt(nMonth)-1, parseInt(nDate), parseInt(nHours), parseInt(nMinutes), parseInt(nSeconds));
} else {
dateObj = new Date(parseInt(nYear), parseInt(nMonth)-1, parseInt(((nDate == null) ? 1 : nDate)));
}
var strYear = dateObj.getFullYear().toString();
var strMonth = (dateObj.getMonth() + 1).toString();
var strDate = dateObj.getDate().toString();
if (strMonth.length == 1) strMonth = "0" + strMonth;
if (strDate.length == 1) strDate = "0" + strDate;
return strYear + "-" + strMonth + "-" + strDate;
};
/**
* 계산
*/
function addYear(date, nOffSet){
date = date.replace(/-/g, "");
var nYear = parseInt(date.substr(0, 4), 10) + nOffSet;
var nMonth = parseInt(date.substr(4, 2), 10);
var nDate = parseInt(date.substr(6, 2), 10);
return window.getDatetime(nYear, nMonth, nDate);
};
/**
* 계산
*/
function addMonth(date, nOffSet) {
date = date.replace(/-/g, "");
var nYear = parseInt(date.substr(0, 4), 10);
var nMonth = parseInt(date.substr(4, 2), 10) + nOffSet;
var nDate = parseInt(date.substr(6, 2), 10);
return window.getDatetime(nYear, nMonth, nDate);
};
/**
* 계산
*/
function addDate(date, nOffSet) {
date = date.replace(/-/g, "");
var nYear = parseInt(date.substr(0, 4), 10);
var nMonth = parseInt(date.substr(4, 2), 10);
var nDate = parseInt(date.substr(6, 2), 10) + nOffSet;
return window.getDatetime(nYear, nMonth, nDate);
};
/**
* 이전해 계산
*/
function getPrevYear(datestr, year) {
if ( year == "0") return datestr;
datestr = datestr.replace(/-/g, "");
if (datestr == "") return "";
var dateObj = window.getDateObject(datestr);
dateObj.setYear(dateObj.getFullYear() - year);
return window.getDateString(dateObj);
};
/**
* 다음해 계산
*/
function getNextYear(datestr, year) {
if ( year == "0") return datestr;
datestr = datestr.replace(/-/g, "");
if (datestr == "") return "";
var dateObj = window.getDateObject(datestr);
dateObj.setYear(dateObj.getFullYear() + year);
return window.getDateString(dateObj);
};
/**
* select 연도
*/
function setYearCombo(id,isAll,isSelect,range){
var now = new Date();
var dayYear = now.getFullYear();
var str = "";
if(range == null || range <= 0){
range = 5;
}
if(isAll){
str += "<option value=''>선택</option>";
}
for(var year=dayYear-range; year<dayYear+range + 1 ; year++){
str += "<option value='"+year+"'>"+year+"</option>";
}
$("#"+id).append(str);
if(isSelect){
$("#"+id).val(dayYear).attr("selected", "selected");
}
};
/**
* select 연도(올해이후)
*/
function setYearComboNext(id,isAll,isSelect,range){
var now = new Date();
var dayYear = now.getFullYear();
var str = "";
if(range == null || range <= 0){
range = 5;
}
if(isAll){
str += "<option value=''>선택</option>";
}
for(var year=dayYear; year<dayYear+range + 1 ; year++){
str += "<option value='"+year+"'>"+year+"</option>";
}
$("#"+id).append(str);
if(isSelect){
$("#"+id).val(dayYear).attr("selected", "selected");
}
};
/**
* select 년월
*/
function setYearMonCombo(id,isAll,isSelect){
var day = new Date();
var dayYear = day.getFullYear().toString();
var now = day.getMonth()+1;
now = dayYear + (now < 10 ? "0" : "") + now;
var month = "";
var str = "";
if(isAll){
str += "<option value=''>선택</option>";
}
for(var i = 1; i <13 ; i++){
month = i < 10 ? "0" + i : "" + i;
str += "<option value='"+dayYear +"" + month +"'>"+ dayYear + "/" + month + "</option>";
}
$("#"+id).append(str);
if(isSelect){
$("#"+id).val(now).attr("selected", "selected");
}
};
/**
* 일자간의 일수 계산
* @param1 day1 : 일자 8자리 - 'YYYYMMDD', 'YYYY-MM-DD', 'YYYY/MM/DD', etc
* @param2 day2 : 일자 8자리 - 'YYYYMMDD', 'YYYY-MM-DD', 'YYYY/MM/DD', etc
* @return 일자간의 일수
*/
function calcDayCount(day1, day2) {
day1 = day1.replace(/-/g, "");
day2 = day2.replace(/-/g, "");
if (day1 == "" || day2 == "") return "";
var date1 = window.getDateObject(day1);
var date2 = window.getDateObject(day2);
if(date1 > date2) return ((date1.getTime() - date2.getTime()) / 1000 / 60 / 60 / 24) + 1;
else return ((date2.getTime() - date1.getTime()) / 1000 / 60 / 60 / 24) + 1;
};
/**
* Get 요일
*/
function getWeek(datestr, isConvert){
datestr = datestr.replace(/-/g, "");
var dateObj = window.getDateObject(datestr);
var week = dateObj.getDay() + 1;
if(!isConvert) return week;
if(week == 1) week = '일';
else if(week == 2) week = '월';
else if(week == 3) week = '화';
else if(week == 4) week = '수';
else if(week == 5) week = '목';
else if(week == 6) week = '금';
else if(week == 7) week = '토';
return week;
};
/**
* 날짜형식이 올바른지 검사
*
* @param astrValue 날짜포맷(yyyymmdd, yyyy/mm/dd, yyyy-mm-dd)
* @param astrNotNull: nn:not null, "": null 허용
* @return true/false
**/
function blnOkDate(astrValue, astrNotNull) {
var arrDate;
if (astrValue==''){
if (astrNotNull == "nn")
return false;
else
return true;
}
if (astrValue.indexOf("-") != -1){
arrDate = astrValue.split("-");
} else if (astrValue.indexOf("/") != -1){
arrDate = astrValue.split("/");
} else {
if (astrValue.length != 8) return false;
astrValue = astrValue.substring(0,4)+"/"+astrValue.substring(4,6)+"/" +astrValue.substring(6,8);
arrDate = astrValue.split("/");
}
if (arrDate.length != 3) return false;
var chkDate = new Date(arrDate[0] + "/" + arrDate[1] + "/" + arrDate[2]);
if (isNaN(chkDate) == true
|| (arrDate[1] != chkDate.getMonth() + 1 || arrDate[2] != chkDate.getDate())) {
return false;
}
return true;
}

@ -1,271 +0,0 @@
//메뉴얼 다운로드
function fnMenualDownload(){
var filenameInHeader = "";
fetch(wctx.url("/file/downloadMenual.do"))
.then((response) => {
var header = response.headers.get('Content-Disposition');
console.log(header);
var parts = header.split(';');
filenameInHeader = parts[1].split('=')[1];
if(filenameInHeader.startsWith("\"") && filenameInHeader.endsWith("\"")){
filenameInHeader = filenameInHeader.substring(1,filenameInHeader.length-1);
}
filenameInHeader = decodeURIComponent(filenameInHeader);
return response.blob();
})
.then((blob) => {
var URL = window.URL || window.webkitURL;
var downloadUrl = URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = downloadUrl;
a.download = filenameInHeader;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
});
}
//현재 활성화된 최상위 탭 영역을 반환한다.
function getActiveRootTabArea(){
return $("#main-tab-content").children(".active")[0];
}
//마지막으로 열린 다이얼로그 영역을 반환한다.
function getLastOpenDialog(){
return $("div.modal.show").last()[0];
}
//마지막으로 생성된 다이얼로그 영역을 반환환다.
function getLastDialog(){
return $("div.modal").last()[0];
}
//백드롭 영역 활성화 여부를 반환한다.
function isActiveBackdrop(){
if($("div.modal-backdrop").length < 1){
return false;
}
var isActiveYn = false;
$("div.modal-backdrop").each(function(){
if($(this).hasClass("show")){
isActiveYn = true;
};
});
return isActiveYn;
}
/**************************************************************************
* 지연
**************************************************************************/
function sleep(ms) {
return new Promise((r) => setTimeout(r, ms));
}
/**************************************************************************
* String util
**************************************************************************/
/**
* 문자열의 byte 길이를 반환한다.
* @return 문자열의 byte 길이
*/
function getByte(str) {
if ( str == null || str.length == 0 ) {
return 0;
}
var size = 0;
for ( var i=0, len=str.length ; i < len ;i++ ) {
var charCode = str.charCodeAt(i),
charSize = 0;
if ( charCode <= 0x00007F ) { //127
charSize = 1;
} else if ( charCode <= 0x0007FF) { //2047
charSize = 2;
} else if ( charCode <= 0x00FFFF) { //65535
charSize = 3;
} else {
charSize = 4;
}
size += charSize;
}
return size;
};
/**
* HTML 엔티티 문자코드를 특수문자로 치환한다.
* @return 치환된 문자열
*/
function escapeHTMLEntity(str) {
if(str == undefined || str == null){
return ""
}
var regex = /&(amp|lt|gt|quot|#39);/g;
var chars = {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#39;': "'"
};
if(regex.test(str)) {
return str.replace(regex, (matched) => chars[matched] || matched);
} else {
return str;
}
}
/**
* 스네이크 표기법을 카멜 표기법으로 변경한다.
* @return 치환된 문자열
*/
function snakeToCamel(text){
text = text.toLowerCase();
var arrUnderbar = text.match(/\_[a-zA-Z]/g);
if(arrUnderbar){
for(var j = 0; j < arrUnderbar.length; j++) {
text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", ""));
}
}
return text;
}
/**
* 카멜 표기법을 케밥 표기법으로 변경한다.
* @return 치환된 문자열
*/
function camelToKebab(text){
return text.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
}
/**
* jsonArray를 FormData형식의 키를 갖는 json으로 치환한다.
* @return FormData형식의 키를 갖는 json
*/
function fnJsonArrayToFormData(array, arrayName){
var newObj = {};
for(var i=0; i<array.length; i++){
var json = array[i];
var keys = Object.keys(json);
for(var j=0; j<keys.length; j++){
var key = keys[j];
newObj[arrayName+"["+i+"]."+key] = json[key];
}
}
return newObj;
}
/**
* json객체 안의 jsonArray를 FormData형식의 키로 치환한다.
* @return FormData형식의 키를 갖는 json
*/
function fnJsonToFormData(originalJson, arrayName){
if(originalJson[arrayName] == undefined){
return originalJson;
} else {
var newObj = {};
var array = originalJson[arrayName];
for(var i=0; i<array.length; i++){
var json = array[i];
var keys = Object.keys(json);
for(var j=0; j<keys.length; j++){
var key = keys[j];
newObj[arrayName+"["+i+"]."+key] = json[key];
}
}
delete originalJson[arrayName];
return {...originalJson, ...newObj};
}
}
const GRID = {
checkbox : {
sync : function(checkboxElement, bool){
var parentEl = $(checkboxElement).parent()[0];
var isTH = parentEl.tagName == "TH" ? true : false;
var tr = $(checkboxElement).parents("tr");
var siblingTag = isTH ? "TH" : "TD";
var siblings = tr.find(siblingTag);
var checkboxColIndex = siblings.index(parentEl);
var table = $(checkboxElement).parents("table");
var thead = table.find("thead");
var tbody = table.find("tbody");
var trs = tbody.find("tr");
if(isTH) {
trs.each(function(){
$(this).find("td").eq(checkboxColIndex).find(":checkbox").prop("checked", bool);
});
} else {
var allChecked = false;
var cbLength = 0;
var checkedLength = 0;
trs.each(function(){
var cb = $(this).find("td").eq(checkboxColIndex).find(":checkbox");
if(cb.length > 0){
cbLength++;
if(cb.is(":checked")){
checkedLength++;
};
}
});
if(cbLength == checkedLength){
allChecked = true;
}
if(allChecked){
thead.find(":checkbox").prop("checked", true);
} else {
thead.find(":checkbox").prop("checked", false);
}
}
},
countChecked : function(checkboxElement){
var parentEl = $(checkboxElement).parent()[0];
var tr = $(checkboxElement).parents("tr");
var siblings = tr.find("TD");
var checkboxColIndex = siblings.index(parentEl);
var table = $(checkboxElement).parents("table");
var tbody = table.find("tbody");
var trs = tbody.find("tr");
var count = 0;
trs.each(function(){
var cb = $(this).find("td").eq(checkboxColIndex).find(":checkbox");
if(cb.length > 0){
if(cb.is(":checked")) {
count++;
}
}
});
return count;
}
}
};

@ -1,411 +0,0 @@
/**************************************************************************
* 버튼으로 조작가능한 셀렉트박스
**************************************************************************/
function fnMakeSpinnerSelect(selectEl, prevBtnEl, nextBtnEl){
$(selectEl).on("animationend", function(){
$(selectEl).removeClass("highlight-once");
});
$(prevBtnEl).on("click", function(){
var selected = $(selectEl).find("option:selected");
var prev = selected.prev();
if(prev.length >= 1){
$(selectEl).val(prev.val());
} else {
$(selectEl).addClass("highlight-once");
}
});
$(nextBtnEl).on("click", function(){
var selected = $(selectEl).find("option:selected");
var next = selected.next();
if(next.length >= 1){
$(selectEl).val(next.val());
} else {
$(selectEl).addClass("highlight-once");
}
});
}
/**************************************************************************
* 선택된 옵션의 스타일이 적용된 셀렉트박스
**************************************************************************/
function fnMakeOptionStyleSelect(selectEl){
$(selectEl).addClass("option-style-select");
selectEl.changeUI = function(){
var selected = $(this).find("option:selected");
if(selected.length <= 0){
selectEl.dataset.optionStyle = "";
selectEl.title = "";
return;
}
selectEl.dataset.optionStyle = selected.val();
selectEl.title = selected[0].title;
};
$(selectEl).on("change", function(){
selectEl.changeUI();
});
selectEl.changeUI();
}
/**************************************************************************
* 위치 이동 가능한 테이블
**************************************************************************/
function getBrowserName() {
var agent = navigator.userAgent.toUpperCase();
if (agent.indexOf('TRIDENT') >= 0) {
return 'IE';
} else if (agent.indexOf('FIREFOX') >= 0) {
return 'FIREFOX';
} else if (agent.indexOf('EDG') >= 0) {
return 'EDGE';
} else if (agent.indexOf('CHROME') >= 0) {
return 'CHROME';
} else if (agent.indexOf('SAFARI') >= 0) {
return 'SAFARI';
} else {
return '';
}
}
const BROWSER_NAME = getBrowserName();
var VERTICAL_SCROLL_HEIGHT = 14;
switch(BROWSER_NAME){
case "EDGE" :
VERTICAL_SCROLL_HEIGHT = 14;
break;
case "FIREFOX" :
VERTICAL_SCROLL_HEIGHT = 15;
break;
case "CHROME" :
VERTICAL_SCROLL_HEIGHT = 15;
break;
}
function fnMakeRowSpinner(tableRowEl, upBtnEl, downBtnEl, scrollEl, validFunc){
if(validFunc != undefined && validFunc != null){
tableRowEl.validForComponent = validFunc;
} else {
tableRowEl.validForComponent = function(eventInfo){
return true;
};
}
$(upBtnEl).on("click", function(){
var tbody = $(tableRowEl).parent();
var theadHeight = $(scrollEl).find("thead").outerHeight();
var scrollElStart = $(scrollEl).offset().top + theadHeight;
var scrollElHeight = $(scrollEl).height() - theadHeight - VERTICAL_SCROLL_HEIGHT;
var scrollMiddle = scrollElStart + (scrollElHeight/2);
if($(tableRowEl).index() == 0){
return;
}
var beforeIndex = $(tableRowEl).index() - 1;
var beforeTr = $(tbody).find("tr").eq(beforeIndex);
var eventInfo = {
clickedButtonType : "up",
currentRow : tableRowEl,
siblingRow : beforeTr
};
if(!tableRowEl.validForComponent(eventInfo)){
return;
}
var rowStart = beforeTr.offset().top;
var rowHeight = beforeTr.outerHeight();
var rowMiddle = rowStart+(rowHeight/2);
beforeTr.before(tableRowEl);
if(rowMiddle < scrollMiddle){
var move = scrollMiddle - rowMiddle;
$(scrollEl).scrollTop($(scrollEl).scrollTop() - move);
}
$(tbody).find("tr").removeClass("current-row");
$(tableRowEl).addClass("current-row");
});
$(downBtnEl).on("click", function(){
var tbody = $(tableRowEl).parent();
var theadHeight = $(scrollEl).find("thead").outerHeight();
var scrollElStart = $(scrollEl).offset().top + theadHeight;
var scrollElHeight = $(scrollEl).height() - theadHeight - VERTICAL_SCROLL_HEIGHT;
var scrollMiddle = scrollElStart + (scrollElHeight/2);
if($(tableRowEl).index() == ($(tbody).children().length) - 1){
return;
}
var afterIndex = $(tableRowEl).index() + 1;
var afterTr = $(tbody).find("tr").eq(afterIndex);
var eventInfo = {
clickedButtonType : "down",
currentRow : tableRowEl,
siblingRow : afterTr
};
if(!tableRowEl.validForComponent(eventInfo)){
return;
}
var rowStart = afterTr.offset().top;
var rowHeight = afterTr.outerHeight();
var rowMiddle = rowStart+(rowHeight/2);
afterTr.after(tableRowEl);
if(rowMiddle > scrollMiddle){
var move = rowMiddle - scrollMiddle;
$(scrollEl).scrollTop($(scrollEl).scrollTop() + move);
}
$(tbody).find("tr").removeClass("current-row");
$(tableRowEl).addClass("current-row");
});
}
/**************************************************************************
* 번호 표시 테이블
**************************************************************************/
function fnMakeRowNumberingTable(tbody, markerFinder, markerSetter){
var moCallbackFunc = function(mutationList, observer){
var target = mutationList[0].target;
$(target).find("tr").each(function(idx, item){
markerSetter(markerFinder(item),idx+1);
});
};
var mo = new MutationObserver(moCallbackFunc);
mo.observe(tbody, {childList : true});
}
/**************************************************************************
* 스크롤 테이블
**************************************************************************/
function fnMakeScrollableTable(tableScrollEl, thisScrollendEvent){
tableScrollEl.thisScrollendEvent = thisScrollendEvent;
tableScrollEl.changeContent = function(content, initScrollPosition, noMore){
var beforeRender = this.scrollTop;
$(this).find("tbody").html(content);
this.scrollTop = 0;
var min = this.scrollTop;
this.scrollTop = this.scrollHeight;
var max = this.scrollTop;
var hasScroll = (min != max);
var more = document.createElement("tr");
if(hasScroll && !noMore){
more.classList.add("h-px-30");
$(this).find("tbody").append(more);
var ioCallbackFunc = function(entries, observer){
var entry = entries[0];
var target = entry.target;
if(entry.isIntersecting){
observer.unobserve(target);
tableScrollEl.thisScrollendEvent();
}
};
var io = new IntersectionObserver(ioCallbackFunc, {threshold : 0});
io.observe(more);
}
if(initScrollPosition){
this.scrollTop = 0;
} else {
var afterRender = this.scrollTop;
if(beforeRender < afterRender){
this.scrollTop = beforeRender;
}
}
};
}
/**************************************************************************
* 단일 업로드 이미지 뷰어
**************************************************************************/
function fnMakeSingleImageViewer(imgEl, fileInputEl, dataAttributeForFilePath, dataAttributeForFileName){
$(imgEl).on("click", function(){
$(fileInputEl).click();
});
$(fileInputEl).on("change", function(){
if(this.files != null && this.files.length > 0){
$(imgEl).attr("alt", this.files[0].name);
$(imgEl).attr("src", (window.URL || window.webkitURL).createObjectURL(this.files[0]));
} else {
var orgnName = $(imgEl).attr("data-"+dataAttributeForFileName);
var orgnPath = $(imgEl).attr("data-"+dataAttributeForFilePath);
if(orgnPath != undefined && orgnPath != null && orgnPath != ""){
$(imgEl).attr("alt", orgnName);
$(imgEl).attr("src", orgnPath);
} else {
$(imgEl).attr("alt", "파일이 없습니다.");
$(imgEl).attr("src", "/resources/img/no-image.svg");
}
}
});
}
/**************************************************************************
* 드래그 가능한 다이얼로그
**************************************************************************/
function fnMakeDraggableDialog(dialogEl) {
var currentDialog;
var currentPosX = 0, currentPosY = 0, previousPosX = 0, previousPosY = 0;
function fnDragMouseDown(e) {
e.preventDefault();
currentDialog = this.targetDialog;
previousPosX = e.clientX;
previousPosY = e.clientY;
document.onmouseup = fnCloseDragElement;
document.onmousemove = fnElementDrag;
}
function fnElementDrag(e) {
e.preventDefault();
currentPosX = previousPosX - e.clientX;
currentPosY = previousPosY - e.clientY;
previousPosX = e.clientX;
previousPosY = e.clientY;
currentDialog.style.top = (currentDialog.offsetTop - currentPosY) + 'px';
currentDialog.style.left = (currentDialog.offsetLeft - currentPosX) + 'px';
}
function fnCloseDragElement() {
document.onmouseup = null;
document.onmousemove = null;
}
$(dialogEl).find(".modal-header")[0].targetDialog = dialogEl;
$(dialogEl).find(".modal-header")[0].onmousedown = fnDragMouseDown;
}
/**************************************************************************
* 컬럼 크기 조절 테이블
**************************************************************************/
function fnMakeResizableTable(containerEl){
var cur_container, cur_handle, cur_index, cur_col, cur_col_width;
var cursorStart = 0, dragStart = false;
function fnMouseDown(e){
e.preventDefault();
cur_handle = this;
cur_container = cur_handle.tableContainer;
cur_index = parseInt(cur_handle.getAttribute("data-resizecol"))-1;
var thEls = $(cur_container.getElementsByTagName("table")[0]).find("th").not(".dummy-th");
cur_col = thEls[cur_index];
cur_col_width = cur_col.getBoundingClientRect().width;
dragStart = true;
cursorStart = event.pageX;
document.onmouseup = fnCloseResize;
document.onmousemove = fnMouseMove;
}
function fnMouseMove(e){
e.preventDefault();
if(dragStart){
var cursorPosition = event.pageX;
var mouseMoved = (cursorPosition - cursorStart);
var newWidth = cur_col_width + mouseMoved;
if(newWidth > 30){
cur_col.style.width = newWidth+"px";
}
}
}
function fnCloseResize(e){
document.onmousemove = null;
document.onmouseup = null;
cur_container.removeHandle();
cur_container.addHandle();
}
containerEl.style.position = "relative";
containerEl.addHandle = function(){
var thEls = $(this.getElementsByTagName("table")[0]).find("th").not(".dummy-th");
var th_length = thEls.length;
var widthAcc = 0;
for(var i=0; i < th_length; i++){
widthAcc += thEls[i].getBoundingClientRect().width;
var yDiv = document.createElement("div");
yDiv.className = "resize-handle";
yDiv.setAttribute("data-resizecol",i+1);
yDiv.style.cssText = "left: "+widthAcc+"px;";
this.append(yDiv);
}
handleEls = this.getElementsByClassName("resize-handle");
var handle_length = handleEls.length;
for(var i = 0; i < handle_length; i++){
handleEls[i].tableContainer = this;
handleEls[i].onmousedown = fnMouseDown;
}
};
containerEl.removeHandle = function(){
$(this).find(".resize-handle").remove();
}
containerEl.changeColumn = function(ths){
this.removeHandle();
$(this).find("table thead tr").html(ths);
this.addHandle();
}
containerEl.addHandle();
}

@ -1,45 +0,0 @@
//테이블 렌더링 후 축소 처리할 컬럼 확인
function fnDownsizeCheck(tableObj) {
$(tableObj).find("thead tr th").each(function(){
var thIndex = $(this).index();
if($(this).hasClass("downsize")){
var trs = $(this).parent("tr").parent("thead").next("tbody").find("tr");
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width","160px");
});
}
});
}
//테이블 컬럼 축소 여부 변경
function fnDownsizeToggle(thObj) {
$(thObj).toggleClass("downsize");
var thIndex = $(thObj).index();
var setValue = "";
if($(thObj).hasClass("downsize")){
setValue = "160px";
}
var tbody = $(thObj).parent("tr").parent("thead").next("tbody");
if(tbody.length < 1){
return;
}
var trs = tbody.find("tr");
if(trs.length < 1){
return;
}
if(trs.length == 1 && trs.find("td").length <= 1){
return;
}
trs.each(function(){
$(this).find("td:eq("+thIndex+")").css("max-width",setValue);
});
};

@ -1,19 +0,0 @@
function initDatepicker(elementId){
var executionArea = $("#"+elementId);
executionArea.find(".form-date").datePicker();
}
function initDetailSearchButton(elementId){
var executionArea = $("#"+elementId);
/*--------------------- 상세검색 버튼 제어 ---------------------*/
executionArea.find(".btn-open-detail").on("click", function() {
$(this).find('i').toggleClass('bx-chevron-down');
$(this).find('i').toggleClass('bx-chevron-up');
});
}

@ -1,99 +0,0 @@
/**************************************************************************
* 그리드의 특정 값을 키워드로 자료 조회
**************************************************************************/
function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
var trDataset = event.target.parentElement.dataset;
var byElementId = trDataset.by;
var byOutputElementId = trDataset.byOutput;
var mainOptionElementId = trDataset.mainOption;
var subOptionElementId = trDataset.subOption;
document.getElementById(byElementId).value = snakeToCamel(byValue);
document.getElementById(byOutputElementId).value = byOutputValue + " 검색";
document.getElementById(mainOptionElementId).value = mainOption;
document.getElementById(subOptionElementId).value = subOption;
}
/**************************************************************************
* 차량번호로 단속 건수 조회
**************************************************************************/
async function countCrdnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/crdn/crdn06/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 차량번호로 민원상담 건수 조회
**************************************************************************/
async function countCvlcptDscsnByVhrno(vhrno, taskSeCd, sggCd){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/"+taskSeCd+"/sprt/sprt04/010/nocs.do"),
data: {
vhrno : vhrno,
taskSeCd : taskSeCd,
sggCd : sggCd
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
/**************************************************************************
* 시군구코드, 차량번호, 기준일자로 차적 조회
**************************************************************************/
async function getVhclInfo(sggCd, vhrno, levy_stdde){
return new Promise((resolve, reject) => {
json.post({
url: wctx.url("/payer/vehicle.do"),
data: {
sggCd : sggCd,
vhrno : vhrno,
levy_stdde : levy_stdde
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
/**************************************************************************
* 장애인 차량여부 조회
**************************************************************************/
async function getVhclDisabledParkingInfo(vhrno){
return new Promise((resolve, reject) => {
json.get({
url: wctx.url("/intf/disabledParking/parkingInfo"),
data: {
vehicleNo : vhrno
},
success: function(resp, textStatus, jqXHR) {
resolve(resp);
},
error: function(jqXHR, textStatus, error) {
}
});
});
}

@ -1,75 +0,0 @@
document.addEventListener('keydown', (event) => {
var RESERVED_FUNCTION_KEYS = ["F1","F2","F3","F4","F6","F7","F8","F9","F10","F11","PageDown","PageUp"];
var KEYS_FOR_GLOBAL = ["F9","F10","F11"];
if(RESERVED_FUNCTION_KEYS.includes(event.key)){
event.preventDefault();
var activeBasckdropYn = isActiveBackdrop();
var curArea = getCurrentAreaForShortcutKey();
if(KEYS_FOR_GLOBAL.includes(event.key)){ //전역 기능
if(event.key == "F9"){
if($("#securityMode--top").is(":checked")){
$("#securityMode--top").prop("checked", false);
fn_securityModeToggle(false);
} else {
$("#securityMode--top").prop("checked", true);
fn_securityModeToggle(true);
}
}
if(event.key == "F10"){
if($("#photoMask--top").is(":checked")){
$("#photoMask--top").prop("checked", false);
fn_photoMask(false);
} else {
$("#photoMask--top").prop("checked", true);
fn_photoMask(true);
}
}
if(!activeBasckdropYn){
//TODO : do something
}
} else { //페이지별,다이얼로그별 버튼
if(curArea != null){
var targetButton = $(curArea).find("button.btn-"+event.key);
if(targetButton.length == 1){
targetButton.click();
} else {
if(targetButton.length > 1){
debug('단축키 버튼 중복 : ' + targetButton.length + "개");
}
}
}
}
return false;
}
});
//단축키 기능이 사용될 영역을 반환한다.
function getCurrentAreaForShortcutKey(){
if(isActiveBackdrop()){
return getLastOpenDialog();
} else {
return getActiveRootTabArea();
}
return null;
}

@ -1,18 +0,0 @@
function renderForTask(areaId, taskClass){
var slotAreas = $("#"+areaId).find("[slot]");
slotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+taskClass);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
}

@ -1,11 +0,0 @@
function fnMakeImgTagForInspection(url, title, crdnPhotoId, mosaic) {
return `<div class="d-flex min-w-px-300">
<div class="position-relative">
<img src="${url}" alt="${title}" height="150" class="position-absolute"
data-crdn-photo-id=${crdnPhotoId}
data-mosaic="${mosaic}"
onload="fn_photoMask($('#photoMask--top').is(':checked'),this);" />
</div>
</div>`;
}

@ -1,45 +0,0 @@
class AnswerBodyControl {
constructor(levyCaseConf, warningCaseConf, nonlevyCaseConf) {
this.levy = new DatasetControl(levyCaseConf);
this.warning = new DatasetControl(warningCaseConf);
this.nonlevy = new DatasetControl(nonlevyCaseConf);
}
}
const MACRO_STRING = {
MACRO_SEQ : "[@일련번호]",
MACRO_TELNO : "[@전화번호]",
MACRO_PIC_NM : "[@담당자성명]"
};
function fnMacroStringInsert(objId, addText) {
var insertObj = document.getElementById(objId);
var textVal = insertObj.value;
var setPosition = insertObj.selectionStart;
var beforeTxt = textVal.substring(0, setPosition);
var afterTxt = textVal.substring(insertObj.selectionEnd, textVal.length);
insertObj.value = beforeTxt + addText + afterTxt;
setPosition = setPosition + addText.length;
insertObj.selectionStart = setPosition;
insertObj.selectionEnd = setPosition;
insertObj.focus();
}
function fnMacroWordsReplace(header, footer, body, telno, picNm) {
var result = header + "\n\n" + body + "\n\n" + footer;
result = result.replaceAll("", "@");
var seq = 1;
var splited = result.split(MACRO_STRING.MACRO_SEQ);
var seqCount = splited.length - 1;
if(seqCount > 0){
for(; seq <= seqCount; seq++){
result = result.replace(MACRO_STRING.MACRO_SEQ, seq);
}
}
result = result.replaceAll(MACRO_STRING.MACRO_TELNO, telno);
result = result.replaceAll(MACRO_STRING.MACRO_PIC_NM, picNm);
return result;
}

@ -1,341 +0,0 @@
/**
* PDFObject v2.2.12
* https://github.com/pipwerks/PDFObject
* @license
* Copyright (c) 2008-2023 Philip Hutchison
* MIT-style license: http://pipwerks.mit-license.org/
* UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js
*/
(function (root, factory) {
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof module === "object" && module.exports) {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory();
} else {
// Browser globals (root is window)
root.PDFObject = factory();
}
}(this, function () {
"use strict";
//PDFObject is designed for client-side (browsers), not server-side (node)
//Will choke on undefined navigator and window vars when run on server
//Return boolean false and exit function when running server-side
if( typeof window === "undefined" ||
window.navigator === undefined ||
window.navigator.userAgent === undefined ||
window.navigator.mimeTypes === undefined){
return false;
}
let pdfobjectversion = "2.2.12";
let nav = window.navigator;
let ua = window.navigator.userAgent;
//Time to jump through hoops -- browser vendors do not make it easy to detect PDF support.
/*
IE11 still uses ActiveX for Adobe Reader, but IE 11 doesn't expose window.ActiveXObject the same way
previous versions of IE did. window.ActiveXObject will evaluate to false in IE 11, but "ActiveXObject"
in window evaluates to true.
MS Edge does not support ActiveX so this test will evaluate false
*/
let isIE = ("ActiveXObject" in window);
/*
There is a coincidental correlation between implementation of window.promises and native PDF support in desktop browsers
We use this to assume if the browser supports promises it supports embedded PDFs
Is this fragile? Sort of. But browser vendors removed mimetype detection, so we're left to improvise
*/
let isModernBrowser = (window.Promise !== undefined);
//Older browsers still expose the mimeType
let supportsPdfMimeType = (nav.mimeTypes["application/pdf"] !== undefined);
//Safari on iPadOS doesn't report as 'mobile' when requesting desktop site, yet still fails to embed PDFs
let isSafariIOSDesktopMode = ( nav.platform !== undefined &&
nav.platform === "MacIntel" &&
nav.maxTouchPoints !== undefined &&
nav.maxTouchPoints > 1 );
//Quick test for mobile devices.
let isMobileDevice = (isSafariIOSDesktopMode || /Mobi|Tablet|Android|iPad|iPhone/.test(ua));
//Safari desktop requires special handling
let isSafariDesktop = ( !isMobileDevice &&
nav.vendor !== undefined &&
/Apple/.test(nav.vendor) &&
/Safari/.test(ua) );
//Firefox started shipping PDF.js in Firefox 19. If this is Firefox 19 or greater, assume PDF.js is available
let isFirefoxWithPDFJS = (!isMobileDevice && /irefox/.test(ua) && ua.split("rv:").length > 1) ? (parseInt(ua.split("rv:")[1].split(".")[0], 10) > 18) : false;
/* ----------------------------------------------------
Supporting functions
---------------------------------------------------- */
let createAXO = function (type){
var ax;
try {
ax = new ActiveXObject(type);
} catch (e) {
ax = null; //ensure ax remains null
}
return ax;
};
//If either ActiveX support for "AcroPDF.PDF" or "PDF.PdfCtrl" are found, return true
//Constructed as a method (not a prop) to avoid unneccesarry overhead -- will only be evaluated if needed
let supportsPdfActiveX = function (){ return !!(createAXO("AcroPDF.PDF") || createAXO("PDF.PdfCtrl")); };
//Determines whether PDF support is available
let supportsPDFs = (
//As of Sept 2020 no mobile browsers properly support PDF embeds
!isMobileDevice && (
//We're moving into the age of MIME-less browsers. They mostly all support PDF rendering without plugins.
isModernBrowser ||
//Modern versions of Firefox come bundled with PDFJS
isFirefoxWithPDFJS ||
//Browsers that still support the original MIME type check
supportsPdfMimeType ||
//Pity the poor souls still using IE
(isIE && supportsPdfActiveX())
)
);
//Create a fragment identifier for using PDF Open parameters when embedding PDF
let buildURLFragmentString = function(pdfParams){
let string = "";
let prop;
if(pdfParams){
for (prop in pdfParams) {
if (pdfParams.hasOwnProperty(prop)) {
string += encodeURIComponent(prop) + "=" + encodeURIComponent(pdfParams[prop]) + "&";
}
}
//The string will be empty if no PDF Params found
if(string){
string = "#" + string;
//Remove last ampersand
string = string.slice(0, string.length - 1);
}
}
return string;
};
let embedError = function (msg, suppressConsole){
if(!suppressConsole){
console.log("[PDFObject] " + msg);
}
return false;
};
let emptyNodeContents = function (node){
while(node.firstChild){
node.removeChild(node.firstChild);
}
};
let getTargetElement = function (targetSelector){
//Default to body for full-browser PDF
let targetNode = document.body;
//If a targetSelector is specified, check to see whether
//it's passing a selector, jQuery object, or an HTML element
if(typeof targetSelector === "string"){
//Is CSS selector
targetNode = document.querySelector(targetSelector);
} else if (window.jQuery !== undefined && targetSelector instanceof jQuery && targetSelector.length) {
//Is jQuery element. Extract HTML node
targetNode = targetSelector.get(0);
} else if (targetSelector.nodeType !== undefined && targetSelector.nodeType === 1){
//Is HTML element
targetNode = targetSelector;
}
return targetNode;
};
let generatePDFObjectMarkup = function (embedType, targetNode, url, pdfOpenFragment, width, height, id, title, omitInlineStyles, customAttribute, PDFJS_URL){
//Ensure target element is empty first
emptyNodeContents(targetNode);
let source = url;
if(embedType === "pdfjs"){
//If PDFJS_URL already contains a ?, assume querystring is in place, and use an ampersand to append PDFJS's file parameter
let connector = (PDFJS_URL.indexOf("?") !== -1) ? "&" : "?";
source = PDFJS_URL + connector + "file=" + encodeURIComponent(url) + pdfOpenFragment;
} else {
source += pdfOpenFragment;
}
let el_type = (embedType === "pdfjs" || embedType === "iframe") ? "iframe" : "embed";
let el = document.createElement(el_type);
el.className = "pdfobject";
el.type = "application/pdf";
el.title = title;
el.src = source;
if(id){
el.id = id;
}
if(el_type === "iframe"){
el.allow = "fullscreen";
el.frameborder = "0";
}
if(!omitInlineStyles){
let style = (el_type === "embed") ? "overflow: auto;" : "border: none;";
if(targetNode !== document.body){
//assign width and height to target node
style += "width: " + width + "; height: " + height + ";";
} else {
//this is a full-page embed, use CSS to fill the viewport
style += "position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;";
}
el.style.cssText = style;
}
//Allow developer to insert custom attribute on embed/iframe element, but ensure it does not conflict with attributes used by PDFObject
let reservedTokens = ["className", "type", "title", "src", "style", "id", "allow", "frameborder"];
if(customAttribute && customAttribute.key && reservedTokens.indexOf(customAttribute.key) === -1){
el.setAttribute(customAttribute.key, (typeof customAttribute.value !== "undefined") ? customAttribute.value : "");
}
targetNode.classList.add("pdfobject-container");
targetNode.appendChild(el);
return targetNode.getElementsByTagName(el_type)[0];
};
let embed = function(url, targetSelector, options){
//If targetSelector is not defined, convert to boolean
let selector = targetSelector || false;
//Ensure options object is not undefined -- enables easier error checking below
let opt = options || {};
//Get passed options, or set reasonable defaults
let id = (typeof opt.id === "string") ? opt.id : "";
let page = opt.page || false;
let pdfOpenParams = opt.pdfOpenParams || {};
let fallbackLink = (typeof opt.fallbackLink === "string" || typeof opt.fallbackLink === "boolean") ? opt.fallbackLink : true;
let width = opt.width || "100%";
let height = opt.height || "100%";
let title = opt.title || "Embedded PDF";
let assumptionMode = (typeof opt.assumptionMode === "boolean") ? opt.assumptionMode : true;
let forcePDFJS = (typeof opt.forcePDFJS === "boolean") ? opt.forcePDFJS : false;
let supportRedirect = (typeof opt.supportRedirect === "boolean") ? opt.supportRedirect : false;
let omitInlineStyles = (typeof opt.omitInlineStyles === "boolean") ? opt.omitInlineStyles : false;
let suppressConsole = (typeof opt.suppressConsole === "boolean") ? opt.suppressConsole : false;
let forceIframe = (typeof opt.forceIframe === "boolean") ? opt.forceIframe : false;
let PDFJS_URL = opt.PDFJS_URL || false;
let targetNode = getTargetElement(selector);
let fallbackHTML = "";
let pdfOpenFragment = "";
let customAttribute = opt.customAttribute || {};
let fallbackHTML_default = "<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href='[url]'>Download PDF</a></p>";
//Ensure URL is available. If not, exit now.
if(typeof url !== "string"){ return embedError("URL is not valid", suppressConsole); }
//If target element is specified but is not valid, exit without doing anything
if(!targetNode){ return embedError("Target element cannot be determined", suppressConsole); }
//page option overrides pdfOpenParams, if found
if(page){ pdfOpenParams.page = page; }
//Stringify optional Adobe params for opening document (as fragment identifier)
pdfOpenFragment = buildURLFragmentString(pdfOpenParams);
// --== Do the dance: Embed attempt #1 ==--
//If the forcePDFJS option is invoked, skip everything else and embed as directed
if(forcePDFJS && PDFJS_URL){
return generatePDFObjectMarkup("pdfjs", targetNode, url, pdfOpenFragment, width, height, id, title, omitInlineStyles, customAttribute, PDFJS_URL);
}
// --== Embed attempt #2 ==--
//Embed PDF if traditional support is provided, or if this developer is willing to roll with assumption
//that modern desktop (not mobile) browsers natively support PDFs
if(supportsPDFs || (assumptionMode && !isMobileDevice)){
//Should we use <embed> or <iframe>? In most cases <embed>.
//Allow developer to force <iframe>, if desired
//There is an edge case where Safari does not respect 302 redirect requests for PDF files when using <embed> element.
//Redirect appears to work fine when using <iframe> instead of <embed> (Addresses issue #210)
//Forcing Safari desktop to use iframe due to freezing bug in macOS 11 (Big Sur)
let embedtype = (forceIframe || supportRedirect || isSafariDesktop) ? "iframe" : "embed";
return generatePDFObjectMarkup(embedtype, targetNode, url, pdfOpenFragment, width, height, id, title, omitInlineStyles, customAttribute);
}
// --== Embed attempt #3 ==--
//If everything else has failed and a PDFJS fallback is provided, try to use it
if(PDFJS_URL){
return generatePDFObjectMarkup("pdfjs", targetNode, url, pdfOpenFragment, width, height, id, title, omitInlineStyles, customAttribute, PDFJS_URL);
}
// --== PDF embed not supported! Use fallback ==--
//Display the fallback link if available
if(fallbackLink){
fallbackHTML = (typeof fallbackLink === "string") ? fallbackLink : fallbackHTML_default;
targetNode.innerHTML = fallbackHTML.replace(/\[url\]/g, url);
}
return embedError("This browser does not support embedded PDFs", suppressConsole);
};
return {
embed: function (a,b,c){ return embed(a,b,c); },
pdfobjectversion: (function () { return pdfobjectversion; })(),
supportsPDFs: (function (){ return supportsPDFs; })()
};
}));

@ -1,323 +0,0 @@
LoadScript("sortableScript","/webjars/3rd-party/sneat/libs/sortablejs/sortable.js");
function settingPhotoMain(pageName, crdnIdElementId, carInfoFunc, carLinkFunc){
var $P = pageObject[pageName];
$P.existFileArr = [];
$P.localUploadArr = [];
$P.carInfoFunc = carInfoFunc;
$P.carLinkFunc = carLinkFunc;
//드래그앤드롭
Sortable.create(document.getElementById("dragAndDrop--"+pageName), {
onEnd : function(evt){
if(evt.oldIndex != evt.newIndex){
$P.updateFileInfo("changeOrder");
}
}
});
//파일처리 버튼
//추가버튼
$("#btnAddFile--"+pageName).on('click', () => {
$("#inputUploadSet--"+pageName).trigger("click");
});
//동영상캡쳐버튼
$("#btnOpenVideoCapture--"+pageName).on('click', () => {
var crdnId = $("#"+crdnIdElementId).val();
var popupWidth = 1800;
var popupHeight = 950;
var popupX = (window.screen.width / 2) - (popupWidth / 2);
var popupY= (window.screen.height / 2) - (popupHeight / 2);
var popup = window.open(wctx.url("/sprt/sprt03/010/main.do?openerPageName="+pageName+"&"+"crdnId="+crdnId)
,"newVideoCapture"
,"width="+popupWidth+", height="+popupHeight+", left="+popupX+", top="+popupY
);
$.blockUI({message : ""});
popup.onload = () => {
popup.addEventListener('beforeunload', function() {
$.unblockUI();
});
};
});
//편집버튼
$("#btnEditPhoto--"+pageName).on('click', async() => {
var checked = $("#displayForExist--"+pageName).find("[name='existPhoto']:checked");
if(checked.length < 1){
await alert2("선택된 사진이 없습니다.");
return;
}
var fileId = checked.val();
var popupWidth = 1400;
var popupHeight = 750;
var popupX = (window.screen.width / 2) - (popupWidth / 2);
var popupY= (window.screen.height / 2) - (popupHeight / 2);
var popup = window.open(wctx.url("/sprt/sprt03/020/main.do?openerPageName="+pageName+"&"+"fileId="+fileId)
,"editPhoto"
,"width="+popupWidth+", height="+popupHeight+", left="+popupX+", top="+popupY
);
$.blockUI({message : ""});
popup.onload = () => {
popup.addEventListener('beforeunload', function() {
$.unblockUI();
});
};
});
//삭제버튼
$("#btnDeleteExistPhoto--"+pageName).on('click', async() => {
var checked = $("#displayForExist--"+pageName).find("[name='existPhoto']:checked");
if(checked.length < 1){
await alert2("선택된 사진이 없습니다.");
return;
}
var target = checked[0].value;
$P.existFileArr.forEach(function(item){
if(item.FILE_ID == target){
item.status = "delete";
}
});
$P.updateFileInfo("delete");
});
$P.uploadSet = uploadSupport("#inputUploadSet--"+pageName);
$P.uploadSet.onDatasetChange = () => {
var files = $P.uploadSet.getDataset();
if(files != null && files.length > 0){
files.forEach(function(item){
$P.localUploadArr.push(item);
});
$P.updateFileInfo("insert");
}
};
$P.uploadSet.onRemove = () => { };
//이미지 HTML태그 문자열 반환
$P.fnMakeImgForExistFile = (fileArr) => {
var tagsTextArr = [];
for(var index = 0, j = 0; index < fileArr.length; index++){
var item = fileArr[index];
if(item.status == "delete"){
continue;
}
// pageName에 따라 template이 다르다.
var template;
if (pageName == "sprt02020") {
template = document.getElementById("imgRadioTemplateTotalInfo--" + pageName).innerHTML;
} else {
template = document.getElementById("imgRadioTemplate--" + pageName).innerHTML;
}
template = template.replace(/{name}/gi, "existPhoto");
template = template.replace(/{value}/gi, item.FILE_ID);
template = template.replace(/{src}/gi, item.URL);
if(index != 0){
template = template.replace("checked=\"\"", "");
}
template = template.replace(/{crdnPhotoId}/gi, "exist" + item.FILE_ID + pageName);
template = template.replace(/{mosaic}/gi, ifEmpty(item.MOSAIC,""));
tagsTextArr.push(template);
if(j % 2 == 1){
//tagsTextArr.push("<br />");
}
j++;
}
return tagsTextArr.join("");
}
//이미지 HTML 렌더링
$P.fnDisplay = () => {
var tagsText = $P.fnMakeImgForExistFile($P.existFileArr);
if(tagsText == ""){
document.querySelector("#dragAndDrop--"+pageName).innerHTML = "";
$("#btnEditPhoto--"+pageName).hide();
} else {
document.querySelector("#dragAndDrop--"+pageName).innerHTML = tagsText;
$("#btnEditPhoto--"+pageName).show();
}
};
//동영상캡쳐 콜백
$P.videoCallback = (snapshots) => {
snapshots.forEach(function(canvas, index, array){
canvas.toBlob(function(blob){
var identify = new Date().getTime()+ "-" + index;
var file = new File([blob], "capture-"+identify+".png", {type: "image/png"});
file.id = "file-" + identify;
file.url = (window.URL || window.webkitURL).createObjectURL(file);
file.mosaic = "";
$P.localUploadArr.push(file);
if(index === array.length - 1){
$P.updateFileInfo("insert");
}
});
});
}
//사진 편집 콜백
$P.editPhotoCallback = (modifiedFile, originalFileInfo, isNumberPlate) => {
modifiedFile.id = "file-" + new Date().getTime() + "-" + "0";
modifiedFile.url = (window.URL || window.webkitURL).createObjectURL(modifiedFile);
if(isNumberPlate){
modifiedFile.mosaic = "";
$P.localUploadArr.push(modifiedFile);
$P.updateFileInfo("insert");
} else {
$P.existFileArr.forEach(function(item,index){
if(item.FILE_ID == originalFileInfo.FILE_ID){
modifiedFile.URL = modifiedFile.url;
modifiedFile.FILE_ID = originalFileInfo.FILE_ID;
modifiedFile.SRT_ORD = originalFileInfo.SRT_ORD;
modifiedFile.status = "modified";
$P.existFileArr.splice(index, 1, modifiedFile);
};
});
$P.updateFileInfo("modifiy");
}
}
// 사진 저장
$P.updateFileInfo = (flag) => {
var formData = new FormData(document.getElementById("frmFile--"+pageName));
formData.append("crdnId", $("#"+crdnIdElementId).val());
formData.append("atchFileCnt", $P.existFileArr.length);
var fileProcessingURL = "";
if(flag == "insert"){
fileProcessingURL = wctx.url("file/insertCrdnImageFile.do");
formData.delete("newFileList");
if ($P.localUploadArr.length > 0) {
$P.localUploadArr.forEach(function(item){
formData.append("newFileList", item);
});
}
} else if(flag == "modifiy"){
fileProcessingURL = wctx.url("file/updateCrdnImageFile.do");
formData.delete("modifyFile");
if($P.existFileArr.length > 0) {
$P.existFileArr.forEach(function(item){
if(item.status == "modified"){
formData.append("beforeKey", item.FILE_ID);
formData.append("beforeOrder", item.SRT_ORD);
formData.append("modifyFile", item);
}
});
}
} else if(flag == "delete"){
fileProcessingURL = wctx.url("file/deleteCrdnImageFile.do");
if($P.existFileArr.length > 0) {
$P.existFileArr.forEach(function(item){
if(item.status == "delete"){
formData.append("deleteKeys", item.FILE_ID);
}
});
}
} else if(flag == "changeOrder"){
fileProcessingURL = wctx.url("file/changeOrderCrdnImageFile.do");
var inputs = $("#dragAndDrop--"+pageName).find("input[name='existPhoto']");
for(var i=0; i < inputs.length; i++){
formData.append("orderedKeys", inputs[i].value);
}
}
ajax.post({
url : fileProcessingURL,
data : formData, contentType : false, processData : false,
success : (resp) => {
if(resp.saved){
var crdnId = $("#"+crdnIdElementId).val();
ajax.post({
url : wctx.url("file/list.do"),
data : {
infoKeys : crdnId,
infoType : "100"
},
success : (resp) => {
var hasVideo = false;
if(resp.cvlcptVideoExistYn == "Y"){
hasVideo = true;
}
initPhotoMain(pageName, resp.fileList, hasVideo);
}
});
}
},
});
}
}
function initPhotoMain(pageName, fileList, existVideo){
var $P = pageObject[pageName];
//동영상캡쳐버튼
if(existVideo){
$("#btnOpenVideoCapture--"+pageName).show();
} else {
$("#btnOpenVideoCapture--"+pageName).hide();
}
$P.existFileArr = [];
if(fileList){
fileList.forEach(function(item){
item.status = "";
$P.existFileArr.push(item);
});
}
$P.localUploadArr = [];
$("#inputUploadSet--"+pageName)[0].value = "";
$("#inputUploadSet--"+pageName).trigger("change");
$P.fnDisplay();
}

@ -1,39 +0,0 @@
class IntegrationSearchControl extends DatasetControl {
constructor(conf) {
super(conf);
this.upDataset = new Dataset(conf);
this.downDataset = new Dataset(conf);
}
load(pageNum) {
this.query.pageNum = pageNum;
this._load();
}
_load() {
if (!this.query.pageNum)
this.query.pageNum = 1;
ajax.get({
url:this.urls.load,
data:this.query,
success:(resp) => {
this.setData(resp);
}
});
}
setData(obj) {
this.upDataset.setData(obj.upList);
this.downDataset.setData(obj.downList);
}
set flag(updown) {
if(updown == "up"){
this.dataset = this.upDataset;
} else if(updown == "down"){
this.dataset = this.downDataset;
}
}
}

@ -1,4 +0,0 @@
var ffnlgCarmdlCd_codeSubsetInfoList = [
{ sourceGroup : "FIM009", sourceCodes : ["15","21"],
targetCode : "etc", targetCodeVal : "특수,건설기계" }
];

@ -1,22 +0,0 @@
var crdnPreset1 = [
{ aggregateType : "count" }, //단속건수
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "levyNeed",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM010"}, //부과필요
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "부과유예코드없음" }, //부과유예
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "82" }, //의견제출수용
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "87" }, //경찰서이첩
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "81" }, //서손
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "면제코드없음" }, //면제
{ aggregateType : "count", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "levyAfter",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM010"}, //부과
{ aggregateType : "ratio", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "81" , ratioRefIndex : 0}, //서손율
{ aggregateType : "count", seperatorRefCol : "OPNN_SBMSN_YN", conditionValue : "Y" }, //의견진술접수건수
{ aggregateType : "ratio", seperatorRefCol : "CRDN_STTS_CD", conditionValue : "82" , ratioRefIndex : 9} //의견진술수용율
];
var crdnPreset1_codeSubsetInfoList = [
{ sourceGroup : "FIM010", sourceCodes : ["21","41","42","43"],
targetCode : "levyNeed", targetCodeVal : "부과필요" },
{ sourceGroup : "FIM010", sourceCodes : ["51","52","53","54","55","61","71","72","73","74","75","76","77"],
targetCode : "levyAfter", targetCodeVal : "부과" }
];

@ -1,38 +0,0 @@
var rcvmPreset1 = [
{ aggregateType : "count" }, //수납건수
{ aggregateType : "sum", sumRefCol : "RCVMT_AMT" }, //수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "33",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //가상계좌수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "33", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //가상계좌수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "OCR",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //OCR수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "OCR", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //OCR수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "08",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //인터넷카드수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "08", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //인터넷카드수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "999",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //위택스수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "999", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //위택스수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "998",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //ARS수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "998", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //ARS수납금액
{ aggregateType : "count", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "ETC",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"}, //기타수납건수
{ aggregateType : "sum", seperatorRefCol : "PAY_MTHD_SE_CD", conditionValue : "ETC", sumRefCol : "RCVMT_AMT",
seperatorCtgrType : "code", seperatorDtlCtgr : "FIM045"} //기타수납금액
];
var rcvmPreset1_codeSubsetInfoList = [
{ sourceGroup : "FIM045", sourceCodes : ["01","02"],
targetCode : "OCR", targetCodeVal : "OCR" },
{ sourceGroup : "FIM045", sourceCodes : ["03","04","05","06","07","09","10","23","31","32","41","44","50","51","81"],
targetCode : "ETC", targetCodeVal : "기타 등" }
];

@ -1,14 +0,0 @@
var sendPreset1 = [
{ aggregateType : "count" }, //발송건수
{ aggregateType : "count" }, //열람건수
{ aggregateType : "count" }, //미열람건수
{ aggregateType : "count" }, //전송실패건수
{ aggregateType : "count" }, //비회원
{ aggregateType : "count" }, //수신거부
{ aggregateType : "count" }, //내부오류
{ aggregateType : "count" }, //요청오류
{ aggregateType : "count" }, //비허용사용자
{ aggregateType : "count" }, //전송실패
{ aggregateType : "count" } //문서도달실패
];

@ -1,4 +0,0 @@
var ffnlgCarmdlCd_codeSubsetInfoList = [
{ sourceGroup : "FIM009", sourceCodes : ["15","21"],
targetCode : "etc", targetCodeVal : "특수,건설기계" }
];
Loading…
Cancel
Save