|
|
@ -1,16 +1,16 @@
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
|
|
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
|
|
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
|
|
|
<form id="frmEdit--${pageName}">
|
|
|
|
<span data-doctx="${pageName}">
|
|
|
|
|
|
|
|
<form name="frmEdit">
|
|
|
|
<div class="d-flex flex-row justify-content-evenly">
|
|
|
|
<div class="d-flex flex-row justify-content-evenly">
|
|
|
|
<div class="card" style="width:500px;">
|
|
|
|
<div class="card" style="width:500px;">
|
|
|
|
<h3>시군구 백업</h3>
|
|
|
|
<h3>시군구 백업</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div id="backupSgg-DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
<div id="backupSgg-table-responsive--${pageName}" class="table-responsive"
|
|
|
|
<div class="table-responsive"
|
|
|
|
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
|
|
|
|
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
|
|
|
|
<table id="backupSgg-DataTables_Table_0--${pageName}"
|
|
|
|
<table class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<th style="width: 50px;"></th>
|
|
|
|
<th style="width: 50px;"></th>
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
<th class="cmn dummy-th"></th>
|
|
|
|
<th class="cmn dummy-th"></th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody id="backupSggTbody--${pageName}">
|
|
|
|
<tbody name="backupSggTbody">
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -30,8 +30,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card" style="width:100px;">
|
|
|
|
<div class="card" style="width:100px;">
|
|
|
|
<div style="display: flex;flex-direction: column;justify-content: space-evenly;height: 100%;">
|
|
|
|
<div style="display: flex;flex-direction: column;justify-content: space-evenly;height: 100%;">
|
|
|
|
<button type="button" id="btnAdd--${pageName}">추가 >></button>
|
|
|
|
<button type="button" name="btnAdd">추가 >></button>
|
|
|
|
<button type="button" id="btnDel--${pageName}"><< 삭제</button>
|
|
|
|
<button type="button" name="btnDel"><< 삭제</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -39,11 +39,10 @@
|
|
|
|
<h3>시군구</h3>
|
|
|
|
<h3>시군구</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div class="card-datatable text-nowrap">
|
|
|
|
<div id="originalSgg-DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer">
|
|
|
|
<div id="originalSgg-table-responsive--${pageName}" class="table-responsive"
|
|
|
|
<div class="table-responsive"
|
|
|
|
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
|
|
|
|
style="overflow-x: scroll;height:500px;overflow-y: scroll;">
|
|
|
|
<table id="originalSgg-DataTables_Table_0--${pageName}"
|
|
|
|
<table class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
|
|
|
|
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
<thead class="sticky-thead">
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<th style="width: 50px;"></th>
|
|
|
|
<th style="width: 50px;"></th>
|
|
|
@ -52,7 +51,7 @@
|
|
|
|
<th class="cmn dummy-th"></th>
|
|
|
|
<th class="cmn dummy-th"></th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody id="originalSggTbody--${pageName}">
|
|
|
|
<tbody name="originalSggTbody">
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</table>
|
|
|
@ -61,15 +60,11 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
<template name="sggRow">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template id="sggRow--${pageName}">
|
|
|
|
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<tr data-key="{SGG_CD}">
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center cmn">
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center cmn">
|
|
|
|
<input type="checkbox" value="{SGG_CD}" />
|
|
|
|
<input type="checkbox" value="{SGG_CD}" />
|
|
|
@ -78,28 +73,30 @@
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center cmn">{SGG_NM}</td>
|
|
|
|
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center cmn">{SGG_NM}</td>
|
|
|
|
<td class="dummy-td cmn"></td>
|
|
|
|
<td class="dummy-td cmn"></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<template id="sggNotFound--${pageName}">
|
|
|
|
<template name="sggNotFound">
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="top" colspan="14" class="dataTables_empty text-center">
|
|
|
|
<td valign="top" colspan="14" class="dataTables_empty text-center">
|
|
|
|
정보를 찾지 못했습니다.
|
|
|
|
정보를 찾지 못했습니다.
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
pageObject['${pageName}'] = {};
|
|
|
|
pageObject['${pageName}'] = newDoctxFinder("${pageName}");
|
|
|
|
|
|
|
|
|
|
|
|
pageObject['${pageName}'].originalDataset = new Dataset({
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
|
|
|
let $P = pageObject['${pageName}'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.originalDataset = new Dataset({
|
|
|
|
keymapper : info => info ? info.SGG_CD : ""
|
|
|
|
keymapper : info => info ? info.SGG_CD : ""
|
|
|
|
});
|
|
|
|
});
|
|
|
|
pageObject['${pageName}'].backupDataset = new Dataset({
|
|
|
|
$P.backupDataset = new Dataset({
|
|
|
|
keymapper : info => info ? info.SGG_CD : ""
|
|
|
|
keymapper : info => info ? info.SGG_CD : ""
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fnRenderBackupAndOriginal(list,tbodyId,dataset){
|
|
|
|
$P.fnRenderBackupAndOriginal = (list,tbodyName, dataset) => {
|
|
|
|
$("#"+tbodyId).html("");
|
|
|
|
$P.$find(tbodyName).html("");
|
|
|
|
|
|
|
|
|
|
|
|
if(list != null && list.length > 0){
|
|
|
|
if(list != null && list.length > 0){
|
|
|
|
dataset.setData(list);
|
|
|
|
dataset.setData(list);
|
|
|
@ -108,14 +105,14 @@ function fnRenderBackupAndOriginal(list,tbodyId,dataset){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var empty = dataset.empty;
|
|
|
|
var empty = dataset.empty;
|
|
|
|
var notFound = [document.getElementById("sggNotFound--${pageName}").innerHTML];
|
|
|
|
var notFound = [$P.find("sggNotFound").innerHTML];
|
|
|
|
var found = document.getElementById("sggRow--${pageName}").innerHTML;
|
|
|
|
var found = $P.find("sggRow").innerHTML;
|
|
|
|
var replacer = (str, dataItem) => str.replace(/{onclick}/gi, "");
|
|
|
|
var replacer = (str, dataItem) => str.replace(/{onclick}/gi, "");
|
|
|
|
var trs = empty ? notFound : dataset.inStrings(found, replacer);
|
|
|
|
var trs = empty ? notFound : dataset.inStrings(found, replacer);
|
|
|
|
$("#"+tbodyId).html(trs.join());
|
|
|
|
$P.$find(tbodyName).html(trs.join());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function getBackupAndOriginalDataList(){
|
|
|
|
$P.getBackupAndOriginalDataList = () => {
|
|
|
|
ajax.get({
|
|
|
|
ajax.get({
|
|
|
|
url : wctx.url("/admin/sggBackup/list.do"),
|
|
|
|
url : wctx.url("/admin/sggBackup/list.do"),
|
|
|
|
data : {
|
|
|
|
data : {
|
|
|
@ -125,15 +122,15 @@ function getBackupAndOriginalDataList(){
|
|
|
|
},
|
|
|
|
},
|
|
|
|
success : (resp) => {
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
|
|
|
|
fnRenderBackupAndOriginal(resp.originalDataList,"originalSggTbody--${pageName}", pageObject['${pageName}'].originalDataset);
|
|
|
|
$P.fnRenderBackupAndOriginal(resp.originalDataList,"originalSggTbody", $P.originalDataset);
|
|
|
|
fnRenderBackupAndOriginal(resp.backupDataList,"backupSggTbody--${pageName}", pageObject['${pageName}'].backupDataset);
|
|
|
|
$P.fnRenderBackupAndOriginal(resp.backupDataList,"backupSggTbody", $P.backupDataset);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$("#btnAdd--${pageName}").on("click", function(){
|
|
|
|
$P.$find("btnAdd").on("click", function(){
|
|
|
|
var checked = $("#backupSggTbody--${pageName}").find("input[type='checkbox']:checked");
|
|
|
|
var checked = $P.$find("backupSggTbody").find("input[type='checkbox']:checked");
|
|
|
|
if(checked.length < 1){
|
|
|
|
if(checked.length < 1){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -153,14 +150,14 @@ $("#btnAdd--${pageName}").on("click", function(){
|
|
|
|
},
|
|
|
|
},
|
|
|
|
success : (resp) => {
|
|
|
|
success : (resp) => {
|
|
|
|
if(resp.saved){
|
|
|
|
if(resp.saved){
|
|
|
|
getBackupAndOriginalDataList();
|
|
|
|
$P.getBackupAndOriginalDataList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#btnDel--${pageName}").on("click", function(){
|
|
|
|
$P.$find("btnDel").on("click", function(){
|
|
|
|
var checked = $("#originalSggTbody--${pageName}").find("input[type='checkbox']:checked");
|
|
|
|
var checked = $P.$find("originalSggTbody").find("input[type='checkbox']:checked");
|
|
|
|
if(checked.length < 1){
|
|
|
|
if(checked.length < 1){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -179,14 +176,13 @@ $("#btnDel--${pageName}").on("click", function(){
|
|
|
|
},
|
|
|
|
},
|
|
|
|
success : (resp) => {
|
|
|
|
success : (resp) => {
|
|
|
|
if(resp.saved){
|
|
|
|
if(resp.saved){
|
|
|
|
getBackupAndOriginalDataList();
|
|
|
|
$P.getBackupAndOriginalDataList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
$P.getBackupAndOriginalDataList();
|
|
|
|
getBackupAndOriginalDataList();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|