diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp index 54c7ac7b..7ffcd083 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02050-info.jsp @@ -47,7 +47,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj.crdnInfo, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -61,8 +61,8 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - $P.formFields.set($P.crdnControl,dataItem); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + $P.formFields.set($P.ctrl,dataItem); } @@ -106,7 +106,7 @@ $(document).ready(function(){ } ajax.post({ - url : $P.crdnControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -134,7 +134,7 @@ $(document).ready(function(){ info.chgAmtSe = "0"; ajax.post({ - url : $P.crdnControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -168,7 +168,7 @@ $(document).ready(function(){ * 초기화 **************************************************************************/ var crdnInfo = ${crdnInfo}; - $P.crdnControl.dataset.setData([crdnInfo]); + $P.ctrl.dataset.setData([crdnInfo]); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp index b134dff1..73788c0a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn03010-main.jsp @@ -138,7 +138,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -154,24 +154,24 @@ $(document).ready(function(){ BLNC : numberFormat } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); }; /************************************************************************** @@ -188,57 +188,57 @@ $(document).ready(function(){ $("#byOutput--${pageName}").val("동적 검색"); $('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCrdnYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); data.taskSeCd = "DPV"; - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.beforeCurrent = { - key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], - index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 + $P.ctrl.beforeCurrent = { + key : $P.ctrl.dataset.getCurrent()["CRDN_ID"], + index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{ - Apply.toDataset.set($P.crdnControl.dataset, resp); - $P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{ + Apply.toDataset.set($P.ctrl.dataset, resp); + $P.ctrl.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.crdnControl.beforeCurrent != null){ - let beforeCurrentKey = $P.crdnControl.beforeCurrent.key; - let beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; - $P.crdnControl.beforeCurrent = null; + if($P.ctrl.beforeCurrent != null){ + let beforeCurrentKey = $P.ctrl.beforeCurrent.key; + let beforeCurrentIndex = $P.ctrl.beforeCurrent.index; + $P.ctrl.beforeCurrent = null; - if(!$P.crdnControl.dataset.empty){ - var info = $P.crdnControl.dataset.getData(beforeCurrentKey); + if(!$P.ctrl.dataset.empty){ + var info = $P.ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.crdnControl.dataset.setCurrent(beforeCurrentKey,true); + $P.ctrl.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ - info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; + if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ + info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; } else { - info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; + info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true); + $P.ctrl.dataset.setCurrent(info["CRDN_ID"],true); } } } @@ -248,16 +248,16 @@ $(document).ready(function(){ $P.fnExcelDown = () => { - if($P.crdnControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#crdnTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); - $P.crdnControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; - $P.crdnControl.download(); + $P.ctrl.download(); } $P.getGridTemplate = () => { @@ -278,7 +278,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -295,18 +295,18 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { let params = { - callControlName : "pageObject['${pageName}'].crdnControl" + callControlName : "pageObject['${pageName}'].ctrl" , crdnId : dataKey } ajax.get({ - url : $P.crdnControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { @@ -322,7 +322,7 @@ $(document).ready(function(){ } $P.save = () => { - if(!$P.crdnControl.dataset.getCurrent()) { + if(!$P.ctrl.dataset.getCurrent()) { dialog.alert({ content : "선택된 자료가 없습니다.", init : function(){ @@ -338,9 +338,9 @@ $(document).ready(function(){ focusOK(); }, onOK : () => { - var info = { 'crdnId' : $P.crdnControl.dataset.getCurrent()["CRDN_ID"] }; + var info = { 'crdnId' : $P.ctrl.dataset.getCurrent()["CRDN_ID"] }; ajax.post({ - url : $P.crdnControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp index eb2d5907..5252dd9c 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05010-main.jsp @@ -122,7 +122,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -134,27 +134,27 @@ $(document).ready(function(){ CRDN_YMD_TM : datetimeFormat } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; - $P.crdnControl.urls.newInfoByFile = ""; - $P.crdnControl.urls.newInfoByHand = ""; + $P.ctrl.urls.newInfoByFile = ""; + $P.ctrl.urls.newInfoByHand = ""; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); } /************************************************************************** @@ -162,14 +162,14 @@ $(document).ready(function(){ **************************************************************************/ $P.fnReset = () => { $("#regDt--${pageName}").datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.do"); - $P.crdnControl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do"); - $P.crdnControl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn05/010/list.do"); + $P.ctrl.urls.newInfoByFile = wctx.url("/"+taskSeCd+"/crdn/crdn05/020/info.do"); + $P.ctrl.urls.newInfoByHand = wctx.url("/"+taskSeCd+"/crdn/crdn05/030/info.do"); switch(taskSeCd){ case "PVS" : @@ -189,21 +189,21 @@ $(document).ready(function(){ $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.reload({all : true}); + $P.ctrl.reload({all : true}); } @@ -224,7 +224,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -242,14 +242,14 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - $P.crdnControl.dataset.setCurrent(dataKey); - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + $P.ctrl.dataset.setCurrent(dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.newInfo = (type) => { var url = ""; - if(type == "file") url = $P.crdnControl.urls.newInfoByFile; - if(type == "hand") url = $P.crdnControl.urls.newInfoByHand; + if(type == "file") url = $P.ctrl.urls.newInfoByFile; + if(type == "hand") url = $P.ctrl.urls.newInfoByHand; var dialogId = ""; if(type == "file") dialogId = "fileDialog"; diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp index d22465d6..8f37e734 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp @@ -382,7 +382,7 @@ $(document).ready(function(){ $P.uploadSet = uploadSupport("#inputUploadSet--${pageName}"); - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -479,7 +479,7 @@ $(document).ready(function(){ } ajax.post({ - url : $P.crdnControl.urls.create, + url : $P.ctrl.urls.create, data : formData, contentType : false, processData : false, success : (resp) => { $P.saveCallback(resp); @@ -735,7 +735,7 @@ $(document).ready(function(){ //보안모드 fn_securityModeToggle($("#securityMode--top").is(":checked")); - $P.crdnControl.dataset.append({}); + $P.ctrl.dataset.append({}); }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 7a2eb1c0..d4273afa 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -304,7 +304,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -329,28 +329,28 @@ $(document).ready(function(){ PRK_PSBLTY_RSLT_CD : FIM034 } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); } - $P.crdnControl.dataset.onSelectionChange = (selectedArr) => { - Apply.fromDataset.gridCheckbox($P.crdnControl.dataset, document.getElementById("crdnTbody--${pageName}"), 1, selectedArr); - Apply.fromDataset.gridButton($P.crdnControl.dataset, $("#btnSendCrdn--${pageName}")[0], selectedArr); + $P.ctrl.dataset.onSelectionChange = (selectedArr) => { + Apply.fromDataset.gridCheckbox($P.ctrl.dataset, document.getElementById("crdnTbody--${pageName}"), 1, selectedArr); + Apply.fromDataset.gridButton($P.ctrl.dataset, $("#btnSendCrdn--${pageName}")[0], selectedArr); }; /************************************************************************** @@ -368,13 +368,13 @@ $(document).ready(function(){ $("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름 $('#schCrdnYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-365).date); $('#schCrdnYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/010/list.do"); - $P.crdnControl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn06/010/list.do"); + $P.ctrl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); var clsForTask = taskSeCd.toLowerCase(); @@ -406,43 +406,43 @@ $(document).ready(function(){ $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.reload({all : true}); + $P.ctrl.reload({all : true}); } $P.fnExcelDown = (forApproval) => { - if($P.crdnControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)")); - $P.crdnControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; if(forApproval){ - $P.crdnControl.query.includePhoto = "Y"; + $P.ctrl.query.includePhoto = "Y"; } else { - $P.crdnControl.query.includePhoto = "N"; + $P.ctrl.query.includePhoto = "N"; } - $P.crdnControl.download(); + $P.ctrl.download(); - $P.crdnControl.query.includePhoto = null; + $P.ctrl.query.includePhoto = null; }; $P.checkCrdnList = (element, bool) => { @@ -451,7 +451,7 @@ $(document).ready(function(){ var atLeastOne = GRID.checkbox.countChecked(element) > 0; $("#btnSendCrdn--${pageName}").prop("disabled", !atLeastOne); - Apply.toDataset.selection($P.crdnControl.dataset, element, bool); + Apply.toDataset.selection($P.ctrl.dataset, element, bool); } $P.getGridTemplate = () => { @@ -479,7 +479,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -496,17 +496,17 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { var params = { - callControlName : "pageObject['${pageName}'].crdnControl", + callControlName : "pageObject['${pageName}'].ctrl", crdnId : dataKey }; ajax.get({ - url : $P.crdnControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { @@ -522,10 +522,10 @@ $(document).ready(function(){ } $P.fnSendCrdn = () => { - var datas = $P.crdnControl.dataset.getDataset("selected"); + var datas = $P.ctrl.dataset.getDataset("selected"); var taskSeCd = datas[0].TASK_SE_CD; - var keys = $P.crdnControl.dataset.getKeys("selected"); + var keys = $P.ctrl.dataset.getKeys("selected"); var url = ""; if(taskSeCd == "PVS"){ url = "/"+taskSeCd+"/nxrp/nxrp01/010/createIndivB01.do"; diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp index 53f1a4df..5f3e78e6 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01010-main.jsp @@ -242,7 +242,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -257,24 +257,24 @@ $(document).ready(function(){ CRDN_YMD_TM : datetimeFormat } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); if(!dataItem){ $("#bottomCrdnPlc--${pageName}").val(""); @@ -318,20 +318,20 @@ $(document).ready(function(){ $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/list.do"); - $P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do"); - $P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/list.do"); + $P.ctrl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do"); + $P.ctrl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } @@ -342,44 +342,44 @@ $(document).ready(function(){ $("#btnDelete--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show(); - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.beforeCurrent = { - key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], - index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 + $P.ctrl.beforeCurrent = { + key : $P.ctrl.dataset.getCurrent()["CRDN_ID"], + index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{ - Apply.toDataset.set($P.crdnControl.dataset, resp); - $P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{ + Apply.toDataset.set($P.ctrl.dataset, resp); + $P.ctrl.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.crdnControl.beforeCurrent != null){ - var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; - var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; - $P.crdnControl.beforeCurrent = null; + if($P.ctrl.beforeCurrent != null){ + var beforeCurrentKey = $P.ctrl.beforeCurrent.key; + var beforeCurrentIndex = $P.ctrl.beforeCurrent.index; + $P.ctrl.beforeCurrent = null; - if(!$P.crdnControl.dataset.empty){ - var info = $P.crdnControl.dataset.getData(beforeCurrentKey); + if(!$P.ctrl.dataset.empty){ + var info = $P.ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.crdnControl.dataset.setCurrent(beforeCurrentKey,true); + $P.ctrl.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ - info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; + if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ + info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; } else { - info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; + info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true); + $P.ctrl.dataset.setCurrent(info["CRDN_ID"],true); } } } @@ -390,16 +390,16 @@ $(document).ready(function(){ } $P.fnExcelDown = () => { - if($P.crdnControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); - $P.crdnControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; - $P.crdnControl.download(); + $P.ctrl.download(); } $P.getGridTemplate = () => { @@ -419,7 +419,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -443,7 +443,7 @@ $(document).ready(function(){ $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - $("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]); + $("#bottomCrdnPlc--${pageName}").val($P.ctrl.dataset.getData(dataKey)["CRDN_PLC"]); if($P.holdList.includes(dataKey)){ $("#btnOpenCvlcptOrgnl--${pageName}").hide(); @@ -455,7 +455,7 @@ $(document).ready(function(){ $("#btnDeleteSameRcptYmd--${pageName}").show(); } - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { @@ -467,7 +467,7 @@ $(document).ready(function(){ var dialogId = "cvlcptInitialDataEditDialog--${pageName}"; ajax.get({ - url : $P.crdnControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : { "crdnId" : dataKey, "openerPageName" : "${pageName}" @@ -501,7 +501,7 @@ $(document).ready(function(){ $P.fnHold = () => { - var curKey = $P.crdnControl.dataset.getCurrent()["CRDN_ID"]; + var curKey = $P.ctrl.dataset.getCurrent()["CRDN_ID"]; if($P.holdList.includes(curKey)){ return; } @@ -516,7 +516,7 @@ $(document).ready(function(){ $P.fnRemove = (rcptYmd) => { if(rcptYmd != null){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var crdnIds = []; @@ -531,18 +531,18 @@ $(document).ready(function(){ crdnIds.push(filtered[i].CRDN_ID); } - $P.crdnControl.dataset.select(crdnIds,true); + $P.ctrl.dataset.select(crdnIds,true); } else { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } var curKey = cur["CRDN_ID"]; - $P.crdnControl.dataset.select(curKey,true); + $P.ctrl.dataset.select(curKey,true); } - var selected = $P.crdnControl.dataset.getKeys("selected"); + var selected = $P.ctrl.dataset.getKeys("selected"); if (selected.length < 1) { return; } @@ -552,7 +552,7 @@ $(document).ready(function(){ }; ajax.post({ - url : $P.crdnControl.urls.remove, + url : $P.ctrl.urls.remove, data : params, success : (resp) => { $P.removeCallback(resp); @@ -568,7 +568,7 @@ $(document).ready(function(){ }; $P.fnRemoveSameRcptYmd = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } @@ -586,7 +586,7 @@ $(document).ready(function(){ } $P.fnOpenCvlcptOrgnl = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } @@ -624,12 +624,12 @@ $(document).ready(function(){ $P.provide = { "getCountStatus" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); return (index+1) + " of " + ds.length; }, "getNextKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(ds.length > index+1){ if($P.holdList.includes(ds[index+1]["CRDN_ID"])){ @@ -642,7 +642,7 @@ $(document).ready(function(){ } }, "getPrevKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(index != 0 && ds.length > 1){ if($P.holdList.includes(ds[index-1]["CRDN_ID"])){ @@ -664,7 +664,7 @@ $(document).ready(function(){ $P.refreshCrdnList(); }, "hasData" : function(key){ - if($P.crdnControl.dataset.getData(key) == null){ + if($P.ctrl.dataset.getData(key) == null){ return false; } else { return true; diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp index 637212dc..641a2160 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01020-info.jsp @@ -421,7 +421,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter:obj => obj.crdnInfo, keymapper:info => info ? info.CRDN_ID : "", urls : { @@ -439,8 +439,8 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - $P.formFields.set($P.crdnControl,dataItem); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + $P.formFields.set($P.ctrl,dataItem); } @@ -509,7 +509,7 @@ $(document).ready(function(){ } ajax.post({ - url : $P.crdnControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -580,7 +580,7 @@ $(document).ready(function(){ $P.fnGo = (crdnId) => { ajax.get({ - url: $P.crdnControl.urls.getInfo, + url: $P.ctrl.urls.getInfo, data: { "crdnId" : crdnId }, headers: { Accept: "application/json; charset=utf-8" @@ -588,7 +588,7 @@ $(document).ready(function(){ success : (resp) => { var crdnInfo = resp.crdnInfo; crdnInfo.CVLCPT_APLY_CN = escapeHTMLEntity(crdnInfo.CVLCPT_APLY_CN); - $P.crdnControl.dataset.setData([crdnInfo]); + $P.ctrl.dataset.setData([crdnInfo]); $("#btnViewCrdnList--${pageName}").attr("hidden","hidden"); $("#btnViewCvlcptDscsnList--${pageName}").attr("hidden","hidden"); @@ -617,7 +617,7 @@ $(document).ready(function(){ if(await confirm2("현 자료의 복사본을 생성하시겠습니까?")){ ajax.get({ - url : $P.crdnControl.urls.create, + url : $P.ctrl.urls.create, data : { crdnId : crdnId }, success : (resp) => { if (resp.saved) { @@ -817,7 +817,7 @@ $(document).ready(function(){ var crdnId = $("#crdnId--${pageName}").val(); ajax.post({ - url : $P.crdnControl.urls.remove, + url : $P.ctrl.urls.remove, data : { crdnId : crdnId }, success : (resp) => { if(resp.saved){ @@ -1173,7 +1173,7 @@ $(document).ready(function(){ var crdnInfo = ${crdnInfo}; crdnInfo.CVLCPT_APLY_CN = escapeHTMLEntity(crdnInfo.CVLCPT_APLY_CN); - $P.crdnControl.dataset.setData([crdnInfo]); + $P.ctrl.dataset.setData([crdnInfo]); if($("#taskSeCd--${pageName}").val() == "DPV" && $("#vltnCd--${pageName}").val() == "01"){ $("label[for='dstrbncYn--${pageName}']").show(); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp index 7cfba1f5..c74bc6c5 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02010-main.jsp @@ -248,7 +248,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -264,31 +264,31 @@ $(document).ready(function(){ LEVY_EXCL_RSN_CD : FIM022 } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); } - $P.crdnControl.dataset.onSelectionChange = (selectedArr) => { - Apply.fromDataset.gridCheckbox($P.crdnControl.dataset, document.getElementById("crdnTbody--${pageName}"), 1, selectedArr); - Apply.fromDataset.gridButton($P.crdnControl.dataset, $("#btnExecuteAnswer--${pageName}")[0], selectedArr); - Apply.fromDataset.gridButton($P.crdnControl.dataset, $("#btnAnswerComplete--${pageName}")[0], selectedArr); - Apply.fromDataset.gridButton($P.crdnControl.dataset, $("#btnExecuteDisabledTagInfoInquire--${pageName}")[0], selectedArr); + $P.ctrl.dataset.onSelectionChange = (selectedArr) => { + Apply.fromDataset.gridCheckbox($P.ctrl.dataset, document.getElementById("crdnTbody--${pageName}"), 1, selectedArr); + Apply.fromDataset.gridButton($P.ctrl.dataset, $("#btnExecuteAnswer--${pageName}")[0], selectedArr); + Apply.fromDataset.gridButton($P.ctrl.dataset, $("#btnAnswerComplete--${pageName}")[0], selectedArr); + Apply.fromDataset.gridButton($P.ctrl.dataset, $("#btnExecuteDisabledTagInfoInquire--${pageName}")[0], selectedArr); }; /************************************************************************** @@ -306,7 +306,7 @@ $(document).ready(function(){ $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-31).date); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = taskSeCd => { @@ -318,53 +318,53 @@ $(document).ready(function(){ $("#btnExecuteDisabledTagInfoInquire--${pageName}").on("click", () => $P.fnExecuteDisabledTagInfoInquire()); $P.fnReset(); - $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc02/030/list.do"); - $P.crdnControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc02/030/update.do"); - $P.crdnControl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc02/030/list.do"); + $P.ctrl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc02/030/update.do"); + $P.ctrl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.reload({all : true}); + $P.ctrl.reload({all : true}); } $P.fnExcelDown = (forApproval) => { - if($P.crdnControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)")); - $P.crdnControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; if(forApproval){ - $P.crdnControl.query.includePhoto = "Y"; + $P.ctrl.query.includePhoto = "Y"; } else { - $P.crdnControl.query.includePhoto = "N"; + $P.ctrl.query.includePhoto = "N"; } - $P.crdnControl.download(); + $P.ctrl.download(); - $P.crdnControl.query.includePhoto = null; + $P.ctrl.query.includePhoto = null; }; @@ -385,7 +385,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -399,7 +399,7 @@ $(document).ready(function(){ $("#crdnTbody--${pageName}").find("tr[data-key]").each(function(item){ var crdnId = this.dataset.key; - var data = $P.crdnControl.dataset.getData(crdnId); + var data = $P.ctrl.dataset.getData(crdnId); if(data.COPY_EXIST_YN == "Y"){ $(this).addClass("text-red"); @@ -419,7 +419,7 @@ $(document).ready(function(){ $("#btnAnswerComplete--${pageName}").prop("disabled", !atLeastOne); $("#btnExecuteDisabledTagInfoInquire--${pageName}").prop("disabled", !atLeastOne); - Apply.toDataset.selection($P.crdnControl.dataset, element, bool); + Apply.toDataset.selection($P.ctrl.dataset, element, bool); } $P.clickCrdnList = (dataKey) => { @@ -428,17 +428,17 @@ $(document).ready(function(){ } $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { let params = { - callControlName : "pageObject['${pageName}'].crdnControl" + callControlName : "pageObject['${pageName}'].ctrl" , crdnId : dataKey } ajax.get({ - url : $P.crdnControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { @@ -454,7 +454,7 @@ $(document).ready(function(){ } $P.fnOpenCvlcptOrgnl = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } @@ -491,7 +491,7 @@ $(document).ready(function(){ } $P.fnOpenAnswerPreview = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } @@ -529,7 +529,7 @@ $(document).ready(function(){ $P.fnExecuteAnswer = () => { - var count = $P.crdnControl.dataset.getKeys("selected").length; + var count = $P.ctrl.dataset.getKeys("selected").length; dialog.alert({ content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", @@ -544,7 +544,7 @@ $(document).ready(function(){ $P.fnAnswerComplete = () => { - var count = $P.crdnControl.dataset.getKeys("selected").length; + var count = $P.ctrl.dataset.getKeys("selected").length; dialog.alert({ content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?", @@ -561,10 +561,10 @@ $(document).ready(function(){ $P.save = (processType) => { ajax.post({ - url : $P.crdnControl.urls.update, + url : $P.ctrl.urls.update, data : { "processType" : processType, - "crdnIds" : $P.crdnControl.dataset.getKeys("selected").join(",") + "crdnIds" : $P.ctrl.dataset.getKeys("selected").join(",") }, success : (resp) => { if(resp.saved){ @@ -585,7 +585,7 @@ $(document).ready(function(){ var keys = []; - var selected = $P.crdnControl.dataset.getDataset("selected"); + var selected = $P.ctrl.dataset.getDataset("selected"); for(var i=0; i < selected.length; i++){ if(selected[i].CVLCPT_PRCS_CD == "02"){ @@ -639,12 +639,12 @@ $(document).ready(function(){ $P.provide = { "getCountStatus" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); return (index+1) + " of " + ds.length; }, "getNextKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(ds.length > index+1){ return ds[index+1]["CRDN_ID"]; @@ -653,7 +653,7 @@ $(document).ready(function(){ } }, "getPrevKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(index != 0 && ds.length > 1){ return ds[index-1]["CRDN_ID"]; diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp index 2e970bc4..451f80da 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc03010-main.jsp @@ -238,7 +238,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.crdnControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.CRDN_ID : "", urls : { @@ -253,25 +253,25 @@ $(document).ready(function(){ CRDN_YMD_TM : datetimeFormat } }); - $P.crdnControl.defaultFetchSize = FETCH_XS; - $P.crdnControl.query = { pageNum : 1, fetchSize : $P.crdnControl.defaultFetchSize }; - $P.crdnControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.crdnControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); - $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderCrdnList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "crdnPaging--${pageName}"); }; - $P.crdnControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); } @@ -290,64 +290,64 @@ $(document).ready(function(){ $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-365).date); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.crdnControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.crdnControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc03/010/list.do"); - $P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); - $P.crdnControl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc03/010/list.do"); + $P.ctrl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); + $P.ctrl.urls.getInfo = wctx.url("/sprt/sprt02/010/main.do"); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.crdnControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchCrdnList = () => { - $P.crdnControl.query = $P.getParams(); - $P.crdnControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollCrdnList = () => { - $P.crdnControl.load($P.crdnControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshCrdnList = () => { - $P.crdnControl.beforeCurrent = { - key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], - index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 + $P.ctrl.beforeCurrent = { + key : $P.ctrl.dataset.getCurrent()["CRDN_ID"], + index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; - Apply.fromDatasetControl.reload($P.crdnControl).then((resp)=>{ - Apply.toDataset.set($P.crdnControl.dataset, resp); - $P.crdnControl.dataset.onDatasetChange(resp, {reloaded : true}); + Apply.fromDatasetControl.reload($P.ctrl).then((resp)=>{ + Apply.toDataset.set($P.ctrl.dataset, resp); + $P.ctrl.dataset.onDatasetChange(resp, {reloaded : true}); - if($P.crdnControl.beforeCurrent != null){ - var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; - var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; - $P.crdnControl.beforeCurrent = null; + if($P.ctrl.beforeCurrent != null){ + var beforeCurrentKey = $P.ctrl.beforeCurrent.key; + var beforeCurrentIndex = $P.ctrl.beforeCurrent.index; + $P.ctrl.beforeCurrent = null; - if(!$P.crdnControl.dataset.empty){ - var info = $P.crdnControl.dataset.getData(beforeCurrentKey); + if(!$P.ctrl.dataset.empty){ + var info = $P.ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.crdnControl.dataset.setCurrent(beforeCurrentKey,true); + $P.ctrl.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ - info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; + if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ + info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; } else { - info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; + info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true); + $P.ctrl.dataset.setCurrent(info["CRDN_ID"],true); } } } @@ -357,16 +357,16 @@ $(document).ready(function(){ } $P.fnExcelDown = () => { - if($P.crdnControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); - $P.crdnControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; - $P.crdnControl.download(); + $P.ctrl.download(); } $P.getGridTemplate = () => { @@ -387,7 +387,7 @@ $(document).ready(function(){ $P.renderCrdnList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.crdnControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -406,17 +406,17 @@ $(document).ready(function(){ $("#crdnTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.crdnControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickCrdnList = (dataKey) => { let params = { - callControlName : "pageObject['${pageName}'].crdnControl" + callControlName : "pageObject['${pageName}'].ctrl" , crdnId : dataKey } ajax.get({ - url : $P.crdnControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { @@ -432,15 +432,15 @@ $(document).ready(function(){ $P.fnRemove = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } var curKey = cur["CRDN_ID"]; - $P.crdnControl.dataset.select(curKey,true); + $P.ctrl.dataset.select(curKey,true); - var selected = $P.crdnControl.dataset.getKeys("selected"); + var selected = $P.ctrl.dataset.getKeys("selected"); if (selected.length < 1) { return; } @@ -450,7 +450,7 @@ $(document).ready(function(){ }; ajax.post({ - url : $P.crdnControl.urls.remove, + url : $P.ctrl.urls.remove, data : params, success : (resp) => { $P.saveCallback(selected, resp); @@ -466,7 +466,7 @@ $(document).ready(function(){ } $P.fnOpenCvlcptOrgnl = () => { - var cur = $P.crdnControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } @@ -504,12 +504,12 @@ $(document).ready(function(){ $P.provide = { "getCountStatus" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); return (index+1) + " of " + ds.length; }, "getNextKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(ds.length > index+1){ return ds[index+1]["CRDN_ID"]; @@ -518,7 +518,7 @@ $(document).ready(function(){ } }, "getPrevKey" : function(currentKey){ - var ds = $P.crdnControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var index = ds.findIndex(item => item.CRDN_ID == currentKey); if(index != 0 && ds.length > 1){ return ds[index-1]["CRDN_ID"]; @@ -533,7 +533,7 @@ $(document).ready(function(){ $P.refreshCrdnList(); }, "hasData" : function(key){ - if($P.crdnControl.dataset.getData(key) == null){ + if($P.ctrl.dataset.getData(key) == null){ return false; } else { return true;