일정관리 수정

main
이범준 3 months ago
parent 3b5cdfd4b7
commit 46ed1e23c7

@ -257,12 +257,18 @@ $(document).ready(function(){
data : params,
success : (resp) => {
let dialogName = "ntcInfoDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : "ntcInfoDialog",
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();

@ -5,7 +5,7 @@
<div class="content-wrapper" data-doctx="${pageName}">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div id="calendar--${pageName}" class="m-4 px-4 w-px-1500 h-px-700">
<div name="calendar" class="m-4 px-4 w-px-1500 h-px-700">
</div>
</div>
@ -23,7 +23,7 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.calendar = new Calendar(document.getElementById("calendar--${pageName}"), {
$P.calendar = new Calendar($P.find("calendar"), {
initialView: 'dayGridMonth',
plugins : [dayGridPlugin, interactionPlugin],
locale: 'ko',
@ -50,12 +50,19 @@ $(document).ready(function(){
schdlEndYmd : schdlEndYmd
},
success : (resp) => {
let dialogName = "scheduleInfoDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : "scheduleInfoDialog",
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();

@ -5,37 +5,37 @@
<div class="container-xxl flex-grow-1 px-0">
<div class="card">
<form id="frmEdit--${pageName}" name="frmEdit">
<input type="text" id="schdlId--${pageName}" name="schdlId" data-map="SCHDL_ID" hidden />
<form name="frmEdit">
<input type="text" name="schdlId" data-map="SCHDL_ID" hidden />
<div class="row g-1">
<div class="col-md-6">
<label for="schdlBgngYmd--${pageName}"
<label is="name-label" for="schdlBgngYmd"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">
시작일
</label>
<input type="text" id="schdlBgngYmd--${pageName}" name="schdlBgngYmd" data-map="SCHDL_BGNG_YMD"
<input type="text" is="id-input" name="schdlBgngYmd" data-map="SCHDL_BGNG_YMD"
class="form-control form-date" required
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</div>
<div class="col-md-6">
<label for="schdlEndYmd--${pageName}"
<label is="name-label" for="schdlEndYmd"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">
종료일
</label>
<input type="text" id="schdlEndYmd--${pageName}" name="schdlEndYmd" data-map="SCHDL_END_YMD"
<input type="text" is="id-input" name="schdlEndYmd" data-map="SCHDL_END_YMD"
class="form-control form-date" required
data-fmt-type="day" title="종료 날짜 선택" />
<button type="button" class="bx bx-lg bx-calendar bg-white"></button>
</div>
<div class="col-md-12">
<label for="schdlCn--${pageName}"
<label is="name-label" for="schdlCn"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end align-top required">
내용
</label>
<input type="text" id="schdlCn--${pageName}" name="schdlCn" data-map="SCHDL_CN"
<input type="text" is="id-input" name="schdlCn" data-map="SCHDL_CN"
class="form-control w-px-500" required />
</div>
@ -44,8 +44,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>
@ -78,7 +78,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 : false,
@ -108,7 +108,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();
@ -117,7 +117,7 @@ $(document).ready(function(){
return;
}
var create = ($("#schdlId--${pageName}").val() == "");
var create = ($P.$find("schdlId").val() == "");
if(create){
ajax.post({
url : $P.ctrl.urls.create,
@ -191,13 +191,13 @@ $(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());
/**************************************************************************
* 초기화
**************************************************************************/
initDatepicker("frmEdit--${pageName}"); //달력 초기화
initDatepicker($P.find("frmEdit")); //달력 초기화
var schdlInfo = ${schdlInfo};
if(schdlInfo != null){
@ -206,7 +206,7 @@ $(document).ready(function(){
$P.ctrl.dataset.setData([{ SCHDL_BGNG_YMD : "${schdlBgngYmd}", SCHDL_END_YMD : "${schdlEndYmd}" }]);
$("#btnRemove--${pageName}").attr("hidden","hidden");
$P.$find("btnRemove").attr("hidden","hidden");
}
});

Loading…
Cancel
Save