공지사항 관리 수정

main
이범준 3 months ago
parent 7092c778a2
commit 3b5cdfd4b7

@ -686,7 +686,7 @@ $(document).ready(function(){
return;
}
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
dialog.close($P.selfDlgId());
}
//납부자 삭제
@ -1173,12 +1173,12 @@ $(document).ready(function(){
$P.$find("refreshEnd").on("refreshEnd", function(){
if(this.dataset.cursorKey == null || this.dataset.cursorKey == ""){
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
dialog.close($P.selfDlgId());
return;
}
if(!$P.provided.hasData(this.dataset.cursorKey)){
dialog.close("cvlcptInitialDataEditDialog--${openerPageName}");
dialog.close($P.selfDlgId());
return;
}

@ -6,25 +6,25 @@
<div class="card wrapper-list">
<div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
<button type="button" name="btnReset" class="btn btn-outline-dark w-px-120" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" id="btnSearch--${pageName}" class="btn btn-search w-px-120" title="검색">
<button type="button" name="btnSearch" class="btn btn-search w-px-120" title="검색">
검색
</button>
</span>
</div>
<form id="frmSearch--${pageName}" name="frmSearch">
<form name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-12">
<select id="by--${pageName}" name="by" class="form-select">
<select is="id-select" name="by" class="form-select">
<option value="NTC_TTL">제목</option>
<option value="NTC_CN">내용</option>
</select>
<input type="text" id="term--${pageName}" name="term" class="form-control" />
<input type="text" is="id-input" name="term" class="form-control" />
</div>
</div>
</div>
@ -32,19 +32,18 @@
</form>
<div>
<div id="gridbuttonArea--${pageName}" class="container-page-btn">
<div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span id="ntcPaging--${pageName}PagingInfo" name="ntcPagingInfo"
class="dataTables_info"></span>
<ul name="ntcPaging"
class="pagination pagination-primary">
<span is="paing-info" name="ntcPagingInfo" class="dataTables_info">
</span>
<ul name="ntcPaging" class="pagination pagination-primary">
</ul>
</div>
<span class="container-window-btn-right">
<span>
<button type="button" class="btn btn-primary w-px-120"
id="btnAdd--${pageName}" title="추가">
name="btnAdd" title="추가">
추가
</button>
</span>
@ -53,12 +52,12 @@
</div>
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-500">
<table id="DataTables_Table_0--${pageName}"
<div name="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div name="table-responsive" class="table-responsive ox-scroll oy-scroll h-px-500">
<table name="DataTables_Table_0"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr id="ntcThead--${pageName}">
<tr name="ntcThead">
<th style="width: 80px;" class="cmn">No.</th>
<th style="width: 180px;">시군구명</th>
<th style="width: 800px;">제목</th>
@ -66,9 +65,9 @@
<th class="dummy-th"></th>
</tr>
</thead>
<tbody id="ntcTbody--${pageName}">
<tbody name="ntcTbody">
</tbody>
<template id="ntcRow--${pageName}">
<template name="ntcRow">
<tr data-key="{NTC_ID}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{SGG_NM}</td>
@ -77,7 +76,7 @@
<td class="dummy-td"></td>
</tr>
</template>
<template id="ntcNotFound--${pageName}">
<template name="ntcNotFound">
<tr>
<td valign="top" colspan="5" class="dataTables_empty text-center">
공지사항 정보를 찾지 못했습니다.
@ -90,7 +89,7 @@
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white">
삭제 되었습니다.
</div>
@ -116,7 +115,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
$P.toast = new bootstrap.Toast($P.find("divToast"), {
animation: true,
autohide: true,
delay: 2000
@ -154,7 +153,7 @@ $(document).ready(function(){
};
$P.ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#ntcTbody--${pageName}")[0]);
Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $P.find("ntcTbody"));
}
$P.ctrl.dataset.onSelectionChange = (selectedArr) => {
@ -165,7 +164,7 @@ $(document).ready(function(){
* pageObject.function
**************************************************************************/
$P.fnReset = () => {
var searchForm = $("#frmSearch--${pageName}");
var searchForm = $P.$find("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='hidden']").val("");
@ -177,7 +176,7 @@ $(document).ready(function(){
}
$P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}");
var formFields = new FimsFormFields($P.selector("frmSearch"));
var data = formFields.get();
data.fetchSize = $P.ctrl.defaultFetchSize;
@ -202,8 +201,8 @@ $(document).ready(function(){
}
$P.getGridTemplate = () => {
var notFound = [document.getElementById("ntcNotFound--${pageName}").innerHTML];
var found = document.getElementById("ntcRow--${pageName}").innerHTML;
var notFound = [$P.find("ntcNotFound").innerHTML];
var found = $P.find("ntcRow").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickNtcList('" + dataItem.getValue("NTC_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickNtcList('" + dataItem.getValue("NTC_ID") + "');");
@ -223,7 +222,7 @@ $(document).ready(function(){
initScroll = false;
}
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
$P.find("table-responsive").changeContent(trs, initScroll, noMore);
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
@ -234,7 +233,7 @@ $(document).ready(function(){
return;
}
$("#ntcTbody--${pageName}").setCurrentRow(dataKey);
$P.$find("ntcTbody").setCurrentRow(dataKey);
Apply.toDataset.current($P.ctrl.dataset, dataKey);
}
@ -292,21 +291,21 @@ $(document).ready(function(){
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchNtcList());
$('#btnAdd--${pageName}').on('click', () => $P.createNtc());
$P.$find("btnReset").on('click', () => $P.fnReset());
$P.$find("btnSearch").on('click', () => $P.searchNtcList());
$P.$find("btnAdd").on('click', () => $P.createNtc());
/**************************************************************************
* 초기화
**************************************************************************/
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollNtcList);
fnMakeResizableTable($P.find("table-responsive"));
fnMakeScrollableTable($P.find("table-responsive"), $P.scrollNtcList);
$P.fnReset();
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
if(MY_INFO.institute != "ADMIN00"){
$("#btnAdd--${pageName}").attr("hidden","hidden");
$P.$find("btnAdd").attr("hidden","hidden");
}
});

@ -5,17 +5,17 @@
<div class="container-xxl flex-grow-1 px-0">
<div class="card">
<form id="frmEdit--${pageName}" name="frmEdit">
<form name="frmEdit">
<input type="text" id="ntcId--${pageName}" name="ntcId" data-map="NTC_ID" hidden />
<input type="text" name="ntcId" data-map="NTC_ID" hidden />
<div class="row g-1">
<div class="col-md-12">
<label for="sggCd--${pageName}"
<label is="name-label" for="sggCd"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">
시군구
</label>
<select id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" class="form-select">
<select is="id-select" name="sggCd" data-map="SGG_CD" class="form-select">
<option value="">전체</option>
<c:forEach items="${sggList}" var="item">
<c:if test="${item.SGG_CD ne 'ADMIN'}">
@ -25,20 +25,20 @@
</select>
</div>
<div class="col-md-12">
<label for="ntcTtl--${pageName}"
<label is="name-label" for="ntcTtl"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">
제목
</label>
<input type="text" id="ntcTtl--${pageName}" name="ntcTtl" data-map="NTC_TTL"
<input type="text" is="id-input" name="ntcTtl" data-map="NTC_TTL"
class="form-control w-px-800" required />
</div>
<div class="col-md-12">
<label for="ntcCn--${pageName}"
<label is="name-label" for="ntcCn"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end align-top required">
내용
</label>
<textarea type="text" id="ntcCn--${pageName}" name="ntcCn" data-map="NTC_CN"
<textarea is="id-textarea" name="ntcCn" data-map="NTC_CN"
rows="15"
class="form-control w-px-800" required></textarea>
</div>
@ -48,8 +48,8 @@
<div class="row m-3">
<div class="col-md-12">
<span class="float-end">
<button type="button" id="btnSave--${pageName}" class="btn btn-primary">저장</button>
<button type="button" id="btnRemove--${pageName}" class="btn btn-primary">삭제</button>
<button type="button" name="btnSave" class="btn btn-primary">저장</button>
<button type="button" name="btnRemove" class="btn btn-primary">삭제</button>
</span>
</div>
</div>
@ -83,7 +83,7 @@ $(document).ready(function(){
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields("#frmEdit--${pageName}");
$P.formFields = new FimsFormFields($P.selector("frmEdit"));
$P.ctrl = new DatasetControl({
dataGetter : obj => obj["List"], appendData : true,
@ -113,7 +113,7 @@ $(document).ready(function(){
**************************************************************************/
$P.fnSave = () => {
if(!customValidate($("#frmEdit--${pageName} input"))) return;
if(!customValidate($P.$find("frmEdit").find("input"))) return;
var info = $P.formFields.get();
@ -124,7 +124,7 @@ $(document).ready(function(){
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("ntcInfoDialog");
dialog.close($P.selfDlgId());
dialog.alert({
content:"저장되었습니다.",
onOK : () => $P.provided.refreshList()
@ -156,8 +156,8 @@ $(document).ready(function(){
/**************************************************************************
* element.on
**************************************************************************/
$("#btnSave--${pageName}").on('click', () => $P.fnSave());
$("#btnRemove--${pageName}").on('click', () => $P.fnRemove());
$P.$find("btnSave").on('click', () => $P.fnSave());
$P.$find("btnRemove").on('click', () => $P.fnRemove());
/**************************************************************************
* 초기화
@ -166,14 +166,14 @@ $(document).ready(function(){
if(ntcInfo == null){
$P.ctrl.dataset.setData([]);
$("#btnRemove--${pageName}").attr("hidden","hidden");
$P.$find("btnRemove").attr("hidden","hidden");
} else {
$P.ctrl.dataset.setData([ntcInfo]);
$("#sggCd--${pageName}").attr("disabled","disabled");
$P.$find("sggCd").attr("disabled","disabled");
if(MY_INFO.institute != "ADMIN00"){
$("#btnSave--${pageName}").attr("hidden","hidden");
$("#btnRemove--${pageName}").attr("hidden","hidden");
$P.$find("btnSave").attr("hidden","hidden");
$P.$find("btnRemove").attr("hidden","hidden");
}
}

@ -124,7 +124,7 @@ $(document).ready(function(){
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("scheduleInfoDialog");
dialog.close($P.selfDlgId());
dialog.alert({
content:"저장되었습니다.",
init : function() {
@ -145,7 +145,7 @@ $(document).ready(function(){
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("scheduleInfoDialog");
dialog.close($P.selfDlgId());
dialog.alert({
content:"저장되었습니다.",
init : function() {
@ -172,7 +172,7 @@ $(document).ready(function(){
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("scheduleInfoDialog");
dialog.close($P.selfDlgId());
dialog.alert({
content:"삭제되었습니다.",
init : function() {

@ -286,12 +286,18 @@ $(document).ready(function(){
data : params,
success : (resp) => {
let dialogName = "deptInfoDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : "deptInfoDialog",
id : dialogId,
title : "부서 정보",
size : "xl",
content : resp,
init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object();
var childReq = pageObject.childReq.pop();

@ -320,7 +320,7 @@ $(document).ready(function(){
data : info,
success : (resp) => {
if(resp.saved){
dialog.close("deptInfoDialog");
dialog.close($P.selfDlgId());
dialog.alert({
content:"저장되었습니다.",
onOK : () => $P.provided.refreshList()

Loading…
Cancel
Save