diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp index 04820055..9c3f3a00 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01010-main.jsp @@ -134,7 +134,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.layoutControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.LAYOUT_ID : "", urls : { @@ -146,29 +146,29 @@ $(document).ready(function(){ MDFCN_DT : datetimeFormat } }); - $P.layoutControl.defaultFetchSize = FETCH_XS; - $P.layoutControl.query = { pageNum : 1, fetchSize : $P.layoutControl.defaultFetchSize }; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; /************************************************************************** * Dataset.on **************************************************************************/ - $P.layoutControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.layoutControl.dataset, t.found, t.notFound, t.replacer); - $P.renderLayoutList(obj["Total"], $P.layoutControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderLayoutList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.layoutControl.dataset, obj, "layoutPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "layoutPaging--${pageName}"); }; - $P.layoutControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.layoutControl.dataset, dataItem, $("#layoutTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#layoutTbody--${pageName}")[0]); } /************************************************************************** * pageObject.function **************************************************************************/ $P.fnResetAndChangeBiz = (taskSeCd) => { - $P.layoutControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do"); - $P.layoutControl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn01/010/list.do"); + $P.ctrl.urls.getInfo = wctx.url("/"+taskSeCd+"/crdn/crdn01/020/info.do"); $P.fnReset(); } @@ -180,32 +180,32 @@ $(document).ready(function(){ searchForm.find("input[type='hidden']").val(""); searchForm.find("input[type='text']").val(""); - $P.layoutControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.layoutControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchLayoutList = () => { - $P.layoutControl.query = $P.getParams(); - $P.layoutControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollLayoutList = () => { - $P.layoutControl.load($P.layoutControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshLayoutList = () => { - if($P.layoutControl.query.pageNum == null){ + if($P.ctrl.query.pageNum == null){ return; } - $P.layoutControl.reload({all : true}); + $P.ctrl.reload({all : true}); } $P.getGridTemplate = () => { @@ -225,7 +225,7 @@ $(document).ready(function(){ $P.renderLayoutList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.layoutControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -242,7 +242,7 @@ $(document).ready(function(){ $("#layoutTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.layoutControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickLayoutList = (dataKey) => { @@ -260,7 +260,7 @@ $(document).ready(function(){ } ajax.get({ - url : $P.layoutControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp index dce86db7..adc42688 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn01020-info.jsp @@ -268,7 +268,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.layoutControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : true, keymapper : info => info ? info.FILE_LAYOUT_ID : "", urls : { @@ -284,11 +284,11 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.layoutControl.dataset.onCurrentChange = (dataItem) => { + $P.ctrl.dataset.onCurrentChange = (dataItem) => { if(!dataItem){ return; } - $P.formFields.set($P.layoutControl, dataItem); + $P.formFields.set($P.ctrl, dataItem); } /************************************************************************** @@ -300,10 +300,10 @@ $(document).ready(function(){ var info = $P.formFields.get(); - var create = $P.layoutControl.dataset.empty; + var create = $P.ctrl.dataset.empty; ajax.post({ - url : create ? $P.layoutControl.urls.create : $P.layoutControl.urls.update, + url : create ? $P.ctrl.urls.create : $P.ctrl.urls.update, data : info, success : (resp) => { if(resp.saved){ @@ -326,7 +326,7 @@ $(document).ready(function(){ var info = $P.formFields.get(); ajax.post({ - url : $P.layoutControl.urls.remove, + url : $P.ctrl.urls.remove, data : { fileLayoutId : info.fileLayoutId }, @@ -358,9 +358,9 @@ $(document).ready(function(){ **************************************************************************/ var layoutInfo = ${layoutInfo}; if(layoutInfo != null){ - $P.layoutControl.dataset.setData([layoutInfo]); + $P.ctrl.dataset.setData([layoutInfo]); } else { - $P.layoutControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); $("#sggCd--${pageName}").val(MY_INFO.info.sggCd); $("#instCd--${pageName}").val(MY_INFO.info.instCd); $("#deptCd--${pageName}").val(MY_INFO.info.deptCd); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp index cf1e3e0c..151c242f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp @@ -174,7 +174,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.parsedInfoControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], keymapper : info => info ? info.FILE_NAME : "", urls : { }, @@ -189,16 +189,16 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.parsedInfoControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.parsedInfoControl.dataset, t.found, t.notFound, t.replacer); - $P.renderParsedInfoList(obj["Total"], $P.parsedInfoControl.dataset.length, trs); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderParsedInfoList(obj["Total"], $P.ctrl.dataset.length, trs); - Apply.fromDataset.paging($P.parsedInfoControl.dataset, obj, "parsedInfoPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "parsedInfoPaging--${pageName}"); }; - $P.parsedInfoControl.dataset.onCurrentChange = (dataItem) => { + $P.ctrl.dataset.onCurrentChange = (dataItem) => { $("#imageArea--${pageName}").html(""); if(dataItem && dataItem.data){ @@ -296,7 +296,7 @@ $(document).ready(function(){ //서버에 등록된 파일 조회 $P.searchFileList = () => { - $P.parsedInfoControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); ajax.post({ url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"), @@ -304,7 +304,7 @@ $(document).ready(function(){ taskSeCd : $("#taskSeCd--${pageName}").val() }, success : (resp) => { - $P.parsedInfoControl.dataset.setData(resp); + $P.ctrl.dataset.setData(resp); } }); } @@ -368,7 +368,7 @@ $(document).ready(function(){ return; } - $P.parsedInfoControl.dataset.setCurrent(dataKey); + $P.ctrl.dataset.setCurrent(dataKey); }; $P.createCrdn = () => { @@ -424,7 +424,7 @@ $(document).ready(function(){ }; $P.deleteFile = () => { - var current = $P.parsedInfoControl.dataset.getCurrent(); + var current = $P.ctrl.dataset.getCurrent(); if(current == null) return; var fileName = current.FILE_NAME; @@ -446,7 +446,7 @@ $(document).ready(function(){ } $P.removeCallback = (removedFileName) => { - $P.parsedInfoControl.dataset.remove(removedFileName); + $P.ctrl.dataset.remove(removedFileName); $P.removeTableRow(removedFileName); } @@ -478,7 +478,7 @@ $(document).ready(function(){ $("#btnFileUpload--${pageName}").on("click", function(){ $P.uploadLocalFile(); }); $("#btnInsertCrdn--${pageName}").on("click", function(){ - $P.tempGroup = Object.groupBy($P.parsedInfoControl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID); + $P.tempGroup = Object.groupBy($P.ctrl.dataset.getDataset(), ({ TEMP_GROUP_ID }) => "temp"+TEMP_GROUP_ID); if($.isEmptyObject($P.tempGroup)){ alert("처리할 자료가 없습니다."); @@ -503,7 +503,7 @@ $(document).ready(function(){ } }); - $P.parsedInfoControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp index 1f262f89..a5bcfcd2 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn07010-main.jsp @@ -255,7 +255,8 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.useTeamControl = new DatasetControl({ + //사용중인 팀 + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:false, keymapper : info => info ? info.TEAM_ID : "", urls : { @@ -271,8 +272,8 @@ $(document).ready(function(){ DEL_DT : datetimeFormat } }); - - $P.delTeamControl = new DatasetControl({ + //삭제된 팀 + $P.alt = new DatasetControl({ dataGetter : obj => obj["List"], appendData: false, keymapper : info => info ? info.TEAM_ID : "", urls : { }, @@ -288,24 +289,24 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.useTeamControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate("useTeam"); - var trs = Apply.fromDataset.getTbody($P.useTeamControl.dataset, t.found, t.notFound, t.replacer); - $P.renderUseTeamList(obj["Total"], $P.useTeamControl.dataset.length, trs); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderUseTeamList(obj["Total"], $P.ctrl.dataset.length, trs); - Apply.fromDataset.paging($P.useTeamControl.dataset, obj, "useTeamPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "useTeamPaging--${pageName}"); }; - $P.delTeamControl.dataset.onDatasetChange = (obj, option) => { + $P.alt.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate("delTeam"); - var trs = Apply.fromDataset.getTbody($P.delTeamControl.dataset, t.found, t.notFound, t.replacer); - $P.renderDelTeamList(obj["Total"], $P.delTeamControl.dataset.length, trs); + var trs = Apply.fromDataset.getTbody($P.alt.dataset, t.found, t.notFound, t.replacer); + $P.renderDelTeamList(obj["Total"], $P.alt.dataset.length, trs); }; - $P.useTeamControl.dataset.onCurrentChange = (dataItem) => { + $P.ctrl.dataset.onCurrentChange = (dataItem) => { if(!dataItem){ $("#teamNm--${pageName}").val(""); $("#crdnSeCd--${pageName}").val(""); @@ -317,7 +318,7 @@ $(document).ready(function(){ return; } - Apply.fromDataset.currentRow($P.useTeamControl.dataset, dataItem, $("#useTeamTbody--${pageName}")[0]); + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#useTeamTbody--${pageName}")[0]); $("#teamNm--${pageName}").val(dataItem.data.TEAM_NM); $("#crdnSeCd--${pageName}").val(dataItem.data.CRDN_SE_CD); @@ -340,21 +341,21 @@ $(document).ready(function(){ searchForm.find("input[type='text']").val(""); searchForm.find("input[type='hidden']").val(""); - $P.useTeamControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); var editForm = $("#frmEdit--${pageName}"); editForm.find("input[type='text']").val(""); editForm.find("input[type='hidden']").val(""); - $P.delTeamControl.dataset.setData([]); + $P.alt.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.useTeamControl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/list.do"); - $P.useTeamControl.urls.remove = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/remove.do"); - $P.useTeamControl.urls.save = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/save.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/list.do"); + $P.ctrl.urls.remove = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/remove.do"); + $P.ctrl.urls.save = wctx.url("/"+taskSeCd+"/crdn/crdn07/010/save.do"); } $P.getParams = () => { @@ -366,16 +367,16 @@ $(document).ready(function(){ $P.searchUseTeamList = () => { - $P.useTeamControl.query = $P.getParams(); - $P.useTeamControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.refreshUseTeamList = () => { - if($P.useTeamControl.query.pageNum == null){ - $P.useTeamControl.query.pageNum = 1; + if($P.ctrl.query.pageNum == null){ + $P.ctrl.query.pageNum = 1; } - $P.useTeamControl.load(1); + $P.ctrl.load(1); } $P.getGridTemplate = (gridType) => { @@ -413,7 +414,7 @@ $(document).ready(function(){ } $P.clickUseTeamList = (dataKey) => { - $P.useTeamControl.dataset.setCurrent(dataKey); + $P.ctrl.dataset.setCurrent(dataKey); } $P.fnSave = () => { @@ -423,7 +424,7 @@ $(document).ready(function(){ data.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); ajax.get({ - url : $P.useTeamControl.urls.save, + url : $P.ctrl.urls.save, data : data, success : (resp) => { if(resp.saved){ @@ -434,9 +435,9 @@ $(document).ready(function(){ } $P.fnRemove = () => { - var dataKey = $P.useTeamControl.dataset.getCurrent()["TEAM_ID"]; + var dataKey = $P.ctrl.dataset.getCurrent()["TEAM_ID"]; ajax.get({ - url : $P.useTeamControl.urls.remove, + url : $P.ctrl.urls.remove, data : { "teamId" : dataKey }, @@ -462,7 +463,7 @@ $(document).ready(function(){ }, success:(resp) => { - $P.delTeamControl.dataset.setData(resp); + $P.alt.dataset.setData(resp); } }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp index 95c6535d..82b2e6e5 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08010-main.jsp @@ -155,7 +155,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.exmptnVhclControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.EXMPTN_VHCL_ID : "", urls : { @@ -172,23 +172,23 @@ $(document).ready(function(){ DEL_DT : datetimeFormat } }); - $P.exmptnVhclControl.defaultFetchSize = FETCH_XS; - $P.exmptnVhclControl.query = { pageNum : 1, fetchSize : $P.exmptnVhclControl.defaultFetchSize }; - $P.exmptnVhclControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.exmptnVhclControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.exmptnVhclControl.dataset, t.found, t.notFound, t.replacer); - $P.renderExmptnVhclList(obj["Total"], $P.exmptnVhclControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderExmptnVhclList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.exmptnVhclControl.dataset, obj, "exmptnVhclPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "exmptnVhclPaging--${pageName}"); }; - $P.exmptnVhclControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.exmptnVhclControl.dataset, dataItem, $("#exmptnVhclTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#exmptnVhclTbody--${pageName}")[0]); } /************************************************************************** @@ -199,44 +199,44 @@ $(document).ready(function(){ searchForm.find("input[type='text']").val(""); searchForm.find("input[type='hidden']").val(""); - $P.exmptnVhclControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); data.taskSeCd = "BPV"; - data.fetchSize = $P.exmptnVhclControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchExmptnVhclList = () => { - $P.exmptnVhclControl.query = $P.getParams(); - $P.exmptnVhclControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollExmptnVhclList = () => { - $P.exmptnVhclControl.load($P.exmptnVhclControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshExmptnVhclList = () => { - if($P.exmptnVhclControl.query.pageNum == null){ - $P.exmptnVhclControl.query.pageNum = 1; + if($P.ctrl.query.pageNum == null){ + $P.ctrl.query.pageNum = 1; } - $P.exmptnVhclControl.reload({all : true}); + $P.ctrl.reload({all : true}); } $P.fnExcelDown = () => { - if($P.exmptnVhclControl.dataset.empty){ + if($P.ctrl.dataset.empty){ alert("조회된 자료가 없습니다."); return; } var cellDefs = getCellDefs($("#exmptnVhclTheadTr--${pageName} th").not(".dummy-th").not(":eq(0)"), $($("#exmptnVhclRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); - $P.exmptnVhclControl.query.cellDefs = cellDefs; + $P.ctrl.query.cellDefs = cellDefs; - $P.exmptnVhclControl.download(); + $P.ctrl.download(); } $P.getGridTemplate = () => { @@ -256,7 +256,7 @@ $(document).ready(function(){ $P.renderExmptnVhclList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.exmptnVhclControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -274,7 +274,7 @@ $(document).ready(function(){ return; } - if($P.exmptnVhclControl.dataset.getData(dataKey)["DEL_YN"] == "N"){ + if($P.ctrl.dataset.getData(dataKey)["DEL_YN"] == "N"){ $("#btnOpenDelRsn--${pageName}").prop("disabled", false); } else { $("#btnOpenDelRsn--${pageName}").prop("disabled", true); @@ -283,14 +283,14 @@ $(document).ready(function(){ $("#exmptnVhclTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.exmptnVhclControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickExmptnVhclList = (dataKey) => { if(dataKey == ""){ return; } - var data = $P.exmptnVhclControl.dataset.getData(dataKey); + var data = $P.ctrl.dataset.getData(dataKey); if(data.DEL_YN == "Y"){ dialog.alert({ content : "삭제된 자료입니다.", @@ -305,7 +305,7 @@ $(document).ready(function(){ $P.getInfo = (param) => { ajax.get({ - url : $P.exmptnVhclControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data: param, success:(resp) => { dialog.open({ @@ -334,7 +334,7 @@ $(document).ready(function(){ $P.newInfo = () => { ajax.get({ - url : $P.exmptnVhclControl.urls.newInfo, + url : $P.ctrl.urls.newInfo, data: {}, success:(resp) => { dialog.open({ @@ -377,9 +377,9 @@ $(document).ready(function(){ } $P.fnRemove = () => { - var dataKey = $P.exmptnVhclControl.dataset.getCurrent()["EXMPTN_VHCL_ID"]; + var dataKey = $P.ctrl.dataset.getCurrent()["EXMPTN_VHCL_ID"]; ajax.get({ - url : $P.exmptnVhclControl.urls.remove, + url : $P.ctrl.urls.remove, data : { "exmptnVhclId" : dataKey, "delRsn" : $("#delRsn--${pageName}").val() @@ -394,7 +394,7 @@ $(document).ready(function(){ }; $P.fnOpenHistory = () => { - var dataKey = $P.exmptnVhclControl.dataset.getCurrent()["EXMPTN_VHCL_ID"]; + var dataKey = $P.ctrl.dataset.getCurrent()["EXMPTN_VHCL_ID"]; ajax.get({ url : wctx.url("/BPV/crdn/crdn08/030/list.do"), diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp index 7a88cf5a..da3a8143 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08020-info.jsp @@ -94,7 +94,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.exmptnVhclControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj.exmptnVhclInfo, keymapper : info => info ? info.EXMPTN_VHCL_ID : "", urls : { @@ -110,7 +110,7 @@ $(document).ready(function(){ * pageObject.function **************************************************************************/ $P.setInfo = (item) => { - $P.formFields.set($P.exmptnVhclControl, item); + $P.formFields.set($P.ctrl, item); var create = isEmpty(item.EXMPTN_VHCL_ID); $("#vhrno--${pageName}").prop("readonly", !create); @@ -130,7 +130,7 @@ $(document).ready(function(){ var create = isEmpty(info.exmptnVhclId); ajax.post({ - url : !create ? $P.exmptnVhclControl.urls.update : $P.exmptnVhclControl.urls.create, + url : !create ? $P.ctrl.urls.update : $P.ctrl.urls.create, data : info, success : (resp) => { $P.saveCallback(resp); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp index d956e731..ab365b43 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn08030-info.jsp @@ -75,7 +75,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.exmptnVhclControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj, appendData:false, keymapper : info => info ? info.HSTRY_SN : "", urls : { }, @@ -93,10 +93,10 @@ $(document).ready(function(){ * Dataset.on **************************************************************************/ - $P.exmptnVhclControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.exmptnVhclControl.dataset, t.found, t.notFound, t.replacer); - $P.renderExmptnVhclList(obj["Total"], $P.exmptnVhclControl.dataset.length, trs); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderExmptnVhclList(obj["Total"], $P.ctrl.dataset.length, trs); } /************************************************************************** @@ -124,6 +124,6 @@ $(document).ready(function(){ fn_securityModeToggle($("#securityMode--top").is(":checked")); } - $P.exmptnVhclControl.dataset.setData(list); + $P.ctrl.dataset.setData(list); }); \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp index ac7c6d6e..74e51000 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc01050-info.jsp @@ -119,7 +119,7 @@ $(document).ready(function() { **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.cvlcptControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter:obj => obj.cvlcptInfo, keymapper:info => info ? info.CRDN_ID : "", urls : { @@ -134,8 +134,8 @@ $(document).ready(function() { /************************************************************************** * Dataset.on **************************************************************************/ - $P.cvlcptControl.dataset.onCurrentChange = (dataItem) => { - $P.formFields.set($P.cvlcptControl,dataItem); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + $P.formFields.set($P.ctrl,dataItem); } /************************************************************************** @@ -158,7 +158,7 @@ $(document).ready(function() { $P.fnGo = (crdnId) => { ajax.get({ - url: $P.cvlcptControl.urls.getInfo, + url: $P.ctrl.urls.getInfo, data: { "crdnId" : crdnId }, headers: { Accept: "application/json; charset=utf-8" @@ -166,7 +166,7 @@ $(document).ready(function() { success : (resp) => { var cvlcptInfo = resp.cvlcptInfo; cvlcptInfo.CVLCPT_APLY_CN = escapeHTMLEntity(cvlcptInfo.CVLCPT_APLY_CN); - $P.cvlcptControl.dataset.setData([cvlcptInfo]); + $P.ctrl.dataset.setData([cvlcptInfo]); var cs = $P.provided.getCountStatus($("#crdnId--${pageName}").val()); $("#countStauts--${pageName}").val(cs); @@ -194,7 +194,7 @@ $(document).ready(function() { **************************************************************************/ var cvlcptInfo = ${cvlcptInfo}; cvlcptInfo.CVLCPT_APLY_CN = escapeHTMLEntity(cvlcptInfo.CVLCPT_APLY_CN); - $P.cvlcptControl.dataset.setData([cvlcptInfo]); + $P.ctrl.dataset.setData([cvlcptInfo]); var cs = $P.provided.getCountStatus($("#crdnId--${pageName}").val()); $("#countStauts--${pageName}").val(cs); }); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp index 523427c1..650608bd 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc02060-info.jsp @@ -86,7 +86,7 @@ $(document).ready(function() { **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.cvlcptControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter:obj => obj.cvlcptInfo, keymapper:info => info ? info.CRDN_ID : "", urls : { @@ -103,8 +103,8 @@ $(document).ready(function() { /************************************************************************** * Dataset.on **************************************************************************/ - $P.cvlcptControl.dataset.onCurrentChange = (dataItem) => { - $P.formFields.set($P.cvlcptControl,dataItem); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + $P.formFields.set($P.ctrl,dataItem); } /************************************************************************** @@ -127,7 +127,7 @@ $(document).ready(function() { $P.fnGo = (crdnId) => { ajax.get({ - url: $P.cvlcptControl.urls.getInfo, + url: $P.ctrl.urls.getInfo, data: { "crdnId" : crdnId }, headers: { Accept: "application/json; charset=utf-8" @@ -135,7 +135,7 @@ $(document).ready(function() { success : (resp) => { var cvlcptInfo = resp.cvlcptInfo; cvlcptInfo.CVLCPT_APLY_CN = escapeHTMLEntity(cvlcptInfo.CVLCPT_APLY_CN); - $P.cvlcptControl.dataset.setData([cvlcptInfo]); + $P.ctrl.dataset.setData([cvlcptInfo]); var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val()); $("#countStauts--${pageName}").val(cs); @@ -156,7 +156,7 @@ $(document).ready(function() { } ajax.post({ - url : $P.cvlcptControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { $P.saveCallback(resp); @@ -191,7 +191,7 @@ $(document).ready(function() { **************************************************************************/ var cvlcptInfo = ${cvlcptInfo}; cvlcptInfo.CVLCPT_APLY_CN = escapeHTMLEntity(cvlcptInfo.CVLCPT_APLY_CN); - $P.cvlcptControl.dataset.setData([cvlcptInfo]); + $P.ctrl.dataset.setData([cvlcptInfo]); var cs = $P.parentRes.getCountStatus($("#crdnId--${pageName}").val()); $("#countStauts--${pageName}").val(cs); diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp index 0fde159c..1c30e53f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc04010-main.jsp @@ -175,7 +175,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.dmndControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.INDIV_ID : "", urls : { @@ -189,23 +189,23 @@ $(document).ready(function(){ RSPNS_DT : datetimeFormat } }); - $P.dmndControl.defaultFetchSize = FETCH_XS; - $P.dmndControl.query = { pageNum : 1, fetchSize : $P.dmndControl.defaultFetchSize }; - $P.dmndControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.dmndControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.dmndControl.dataset, t.found, t.notFound, t.replacer); - $P.renderDmndList(obj["Total"], $P.dmndControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderDmndList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.dmndControl.dataset, obj, "dmndPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "dmndPaging--${pageName}"); }; - $P.dmndControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.dmndControl.dataset, dataItem, $("#dmndTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#dmndTbody--${pageName}")[0]); } /************************************************************************** @@ -215,65 +215,65 @@ $(document).ready(function(){ $('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schDmndYmdTo--${pageName}').datepicker('setDate', TODAY()); - $P.dmndControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.fnResetAndChangeBiz = (taskSeCd) => { $P.fnReset(); - $P.dmndControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do"); - $P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do"); - $P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do"); + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/list.do"); + $P.ctrl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do"); + $P.ctrl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do"); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.dmndControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchDmndList = () => { - $P.dmndControl.query = $P.getParams(); - $P.dmndControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollDmndList = () => { - $P.dmndControl.load($P.dmndControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshDmndList = () => { - if(!$P.dmndControl.dataset.empty){ - $P.dmndControl.beforeCurrent = { - key : $P.dmndControl.dataset.getCurrent()["INDIV_ID"], - index : $P.dmndControl.dataset.getCurrent()["ROW_NUM"] - 1 + if(!$P.ctrl.dataset.empty){ + $P.ctrl.beforeCurrent = { + key : $P.ctrl.dataset.getCurrent()["INDIV_ID"], + index : $P.ctrl.dataset.getCurrent()["ROW_NUM"] - 1 }; } - Apply.fromDatasetControl.reload($P.dmndControl).then((resp)=>{ - Apply.toDataset.set($P.dmndControl.dataset, resp); - $P.dmndControl.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.dmndControl.beforeCurrent != null){ - var beforeCurrentKey = $P.dmndControl.beforeCurrent.key; - var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index; - $P.dmndControl.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.dmndControl.dataset.empty){ - var info = $P.dmndControl.dataset.getData(beforeCurrentKey); + if(!$P.ctrl.dataset.empty){ + var info = $P.ctrl.dataset.getData(beforeCurrentKey); if(info != null){ - $P.dmndControl.dataset.setCurrent(beforeCurrentKey,true); + $P.ctrl.dataset.setCurrent(beforeCurrentKey,true); } else { - if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){ - info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1]; + if(beforeCurrentIndex > ($P.ctrl.dataset.length - 1)){ + info = $P.ctrl.dataset.getDataset()[$P.ctrl.dataset.length - 1]; } else { - info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex]; + info = $P.ctrl.dataset.getDataset()[beforeCurrentIndex]; } - $P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true); + $P.ctrl.dataset.setCurrent(info["INDIV_ID"],true); } } } @@ -297,7 +297,7 @@ $(document).ready(function(){ $P.renderDmndList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.dmndControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -311,24 +311,24 @@ $(document).ready(function(){ } $("#dmndTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.dmndControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.fnRemove = (allCompleteDataIds) => { if(allCompleteDataIds != null){ - $P.dmndControl.dataset.select(allCompleteDataIds,true); + $P.ctrl.dataset.select(allCompleteDataIds,true); } else { - var cur = $P.dmndControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } var curKey = cur["INDIV_ID"]; - $P.dmndControl.dataset.select(curKey,true); + $P.ctrl.dataset.select(curKey,true); } - var selected = $P.dmndControl.dataset.getKeys("selected"); + var selected = $P.ctrl.dataset.getKeys("selected"); if (selected.length < 1) { return; } @@ -338,7 +338,7 @@ $(document).ready(function(){ }; ajax.post({ - url : $P.dmndControl.urls.remove, + url : $P.ctrl.urls.remove, data : params, success : (resp) => { $P.removeCallback(selected, resp); @@ -356,12 +356,12 @@ $(document).ready(function(){ } $P.fnRemoveAllCompleteData = () => { - var cur = $P.dmndControl.dataset.getCurrent(); + var cur = $P.ctrl.dataset.getCurrent(); if(cur == null){ return; } - var ds = $P.dmndControl.dataset.getDataset(); + var ds = $P.ctrl.dataset.getDataset(); var indivIds = ds.filter(function(item){ if(item['STTS_CD'] == '9' || item['STTS_CD'] == 'B'){ @@ -416,7 +416,7 @@ $(document).ready(function(){ info.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); ajax.get({ - url : $P.dmndControl.urls.create, + url : $P.ctrl.urls.create, data : info, success : (resp) => { if(resp.saved){ @@ -425,7 +425,7 @@ $(document).ready(function(){ $("#toastText--${pageName}").html("등록 되었습니다."); $P.toast.show(); - if(!$P.dmndControl.dataset.empty){ + if(!$P.ctrl.dataset.empty){ sleep(1000).then(() => $P.refreshDmndList()); } } diff --git a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp index d47463f0..0f60eb54 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/cvlc/cvlc06010-main.jsp @@ -137,7 +137,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.warningWordsControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "", urls : {}, @@ -148,16 +148,16 @@ $(document).ready(function(){ * pageObject.function **************************************************************************/ $P.fnResetAndChangeBiz = (taskSeCd) => { - $P.warningWordsControl.urls = {}; - $P.warningWordsControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/list.do"); - $P.warningWordsControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/save.do"); + $P.ctrl.urls = {}; + $P.ctrl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/list.do"); + $P.ctrl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/save.do"); $P.fnReset(); } $P.fnReset = () => { - $P.warningWordsControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); $P.renderWarningWordsList(0); $("#frmEditWarningWords--${pageName}").find("input, textarea").val(""); @@ -174,16 +174,16 @@ $(document).ready(function(){ var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); ajax.get({ - url : $P.warningWordsControl.urls.load, + url : $P.ctrl.urls.load, data : {"taskSeCd" : taskSeCd}, success : (resp) => { - $P.warningWordsControl.dataset.setData(resp.List); + $P.ctrl.dataset.setData(resp.List); $P.renderWarningWordsList(resp.List.length); if(resp.List.length > 0){ - var current = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; + var current = $P.ctrl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; $P.clickWarningWordsList(current); } } @@ -192,7 +192,7 @@ $(document).ready(function(){ $P.renderWarningWordsList = (total) => { - var warningWordsDS = $P.warningWordsControl.dataset; + var warningWordsDS = $P.ctrl.dataset; var empty = warningWordsDS.empty; var notFound = [document.getElementById("warningWordsNotFound--${pageName}").innerHTML]; var found = document.getElementById("warningWordsRow--${pageName}").innerHTML; @@ -207,7 +207,7 @@ $(document).ready(function(){ $P.radioClickWarningWordsList = (dataKey, gridType) => { - $P.warningWordsControl.dataset.setCurrent(dataKey); + $P.ctrl.dataset.setCurrent(dataKey); $("#warningWordsTbody--${pageName}").setCurrentRow(dataKey); @@ -225,7 +225,7 @@ $(document).ready(function(){ $P.changeTextarea = () => { - var curData = $P.warningWordsControl.dataset.getCurrent(); + var curData = $P.ctrl.dataset.getCurrent(); if(curData == null){ $("#ansRsnCd--${pageName}").val(""); @@ -243,20 +243,20 @@ $(document).ready(function(){ $P.refreshWarningWordsInfo = () => { - var cursor = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; + var cursor = $P.ctrl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); ajax.get({ - url : $P.warningWordsControl.urls.load, + url : $P.ctrl.urls.load, data : {"taskSeCd" : taskSeCd}, success : (resp) => { - $P.warningWordsControl.dataset.setData(resp.List); + $P.ctrl.dataset.setData(resp.List); $P.renderWarningWordsList(resp.List.length); if(resp.List.length > 0){ - $P.warningWordsControl.dataset.setCurrent(cursor); - var current = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; + $P.ctrl.dataset.setCurrent(cursor); + var current = $P.ctrl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; $P.clickWarningWordsList(current,'warning'); } @@ -281,7 +281,7 @@ $(document).ready(function(){ onOK: () => { ajax.get({ - url : $P.warningWordsControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { if(resp.saved){ diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp index 5f9aed49..f823caae 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01010-main.jsp @@ -123,7 +123,7 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl **************************************************************************/ - $P.ntcControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData:true, keymapper : info => info ? info.NTC_ID : "", urls : { @@ -135,27 +135,27 @@ $(document).ready(function(){ MDFCN_DT : datetimeFormat } }); - $P.ntcControl.defaultFetchSize = FETCH_XS; - $P.ntcControl.query = { pageNum : 1, fetchSize : $P.ntcControl.defaultFetchSize }; - $P.ntcControl.beforeCurrent = null; + $P.ctrl.defaultFetchSize = FETCH_XS; + $P.ctrl.query = { pageNum : 1, fetchSize : $P.ctrl.defaultFetchSize }; + $P.ctrl.beforeCurrent = null; /************************************************************************** * Dataset.on **************************************************************************/ - $P.ntcControl.dataset.onDatasetChange = (obj, option) => { + $P.ctrl.dataset.onDatasetChange = (obj, option) => { var t = $P.getGridTemplate(); - var trs = Apply.fromDataset.getTbody($P.ntcControl.dataset, t.found, t.notFound, t.replacer); - $P.renderNtcList(obj["Total"], $P.ntcControl.dataset.length, trs, option); + var trs = Apply.fromDataset.getTbody($P.ctrl.dataset, t.found, t.notFound, t.replacer); + $P.renderNtcList(obj["Total"], $P.ctrl.dataset.length, trs, option); - Apply.fromDataset.paging($P.ntcControl.dataset, obj, "ntcPaging--${pageName}"); + Apply.fromDataset.paging($P.ctrl.dataset, obj, "ntcPaging--${pageName}"); }; - $P.ntcControl.dataset.onCurrentChange = (dataItem) => { - Apply.fromDataset.currentRow($P.ntcControl.dataset, dataItem, $("#ntcTbody--${pageName}")[0]); + $P.ctrl.dataset.onCurrentChange = (dataItem) => { + Apply.fromDataset.currentRow($P.ctrl.dataset, dataItem, $("#ntcTbody--${pageName}")[0]); } - $P.ntcControl.dataset.onSelectionChange = (selectedArr) => { + $P.ctrl.dataset.onSelectionChange = (selectedArr) => { }; @@ -171,32 +171,32 @@ $(document).ready(function(){ searchForm.find("select[name='sggCd']").val(MY_INFO.info.sggCd); - $P.ntcControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); } $P.getParams = () => { var formFields = new FimsFormFields("#frmSearch--${pageName}"); var data = formFields.get(); - data.fetchSize = $P.ntcControl.defaultFetchSize; + data.fetchSize = $P.ctrl.defaultFetchSize; return data; } $P.searchNtcList = () => { - $P.ntcControl.query = $P.getParams(); - $P.ntcControl.load(1); + $P.ctrl.query = $P.getParams(); + $P.ctrl.load(1); } $P.scrollNtcList = () => { - $P.ntcControl.load($P.ntcControl.query.pageNum + 1); + $P.ctrl.load($P.ctrl.query.pageNum + 1); } $P.refreshNtcList = () => { - if($P.ntcControl.query.pageNum == null){ + if($P.ctrl.query.pageNum == null){ return; } - $P.ntcControl.reload({all : true}); + $P.ctrl.reload({all : true}); } $P.getGridTemplate = () => { @@ -216,7 +216,7 @@ $(document).ready(function(){ $P.renderNtcList = (total, listLength, trs, option) => { let noMore = (listLength >= total); - var initScroll = ($P.ntcControl.query.pageNum < 2); + var initScroll = ($P.ctrl.query.pageNum < 2); if(option != null && option.reloaded){ initScroll = false; } @@ -234,7 +234,7 @@ $(document).ready(function(){ $("#ntcTbody--${pageName}").setCurrentRow(dataKey); - Apply.toDataset.current($P.ntcControl.dataset, dataKey); + Apply.toDataset.current($P.ctrl.dataset, dataKey); } $P.dblclickNtcList = (dataKey) => { @@ -252,7 +252,7 @@ $(document).ready(function(){ } ajax.get({ - url : $P.ntcControl.urls.getInfo, + url : $P.ctrl.urls.getInfo, data : params, success : (resp) => { diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp index ff5af19a..69fa9794 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt01020-info.jsp @@ -85,7 +85,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.ntcControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : true, keymapper : info => info ? info.NTC_ID : "", urls : { @@ -101,11 +101,11 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.ntcControl.dataset.onCurrentChange = (dataItem) => { + $P.ctrl.dataset.onCurrentChange = (dataItem) => { if(!dataItem){ return; } - $P.formFields.set($P.ntcControl,dataItem); + $P.formFields.set($P.ctrl,dataItem); } /************************************************************************** @@ -117,10 +117,10 @@ $(document).ready(function(){ var info = $P.formFields.get(); - var create = $P.ntcControl.dataset.empty; + var create = $P.ctrl.dataset.empty; ajax.post({ - url : create ? $P.ntcControl.urls.create : $P.ntcControl.urls.update, + url : create ? $P.ctrl.urls.create : $P.ctrl.urls.update, data : info, success : (resp) => { if(resp.saved){ @@ -139,7 +139,7 @@ $(document).ready(function(){ var info = $P.formFields.get(); ajax.post({ - url : $P.ntcControl.urls.remove, + url : $P.ctrl.urls.remove, data : info, success : (resp) => { if(resp.saved){ @@ -165,10 +165,10 @@ $(document).ready(function(){ var ntcInfo = ${ntcInfo}; if(ntcInfo == null){ - $P.ntcControl.dataset.setData([]); + $P.ctrl.dataset.setData([]); $("#btnRemove--${pageName}").attr("hidden","hidden"); } else { - $P.ntcControl.dataset.setData([ntcInfo]); + $P.ctrl.dataset.setData([ntcInfo]); $("#sggCd--${pageName}").attr("disabled","disabled"); if(MY_INFO.institute != "ADMIN00"){ diff --git a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt02020-info.jsp index fb6c71a3..8ce0ee89 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/mngt/mngt02020-info.jsp @@ -80,7 +80,7 @@ $(document).ready(function(){ **************************************************************************/ $P.formFields = new FimsFormFields("#frmEdit--${pageName}"); - $P.schdlControl = new DatasetControl({ + $P.ctrl = new DatasetControl({ dataGetter : obj => obj["List"], appendData : false, keymapper : info => info ? info.SCHDL_ID : "", urls : { @@ -96,11 +96,11 @@ $(document).ready(function(){ /************************************************************************** * Dataset.on **************************************************************************/ - $P.schdlControl.dataset.onCurrentChange = (dataItem) => { + $P.ctrl.dataset.onCurrentChange = (dataItem) => { if(!dataItem){ return; } - $P.formFields.set($P.schdlControl,dataItem); + $P.formFields.set($P.ctrl,dataItem); } /************************************************************************** @@ -120,7 +120,7 @@ $(document).ready(function(){ var create = ($("#schdlId--${pageName}").val() == ""); if(create){ ajax.post({ - url : $P.schdlControl.urls.create, + url : $P.ctrl.urls.create, data : info, success : (resp) => { if(resp.saved){ @@ -141,7 +141,7 @@ $(document).ready(function(){ }); } else { ajax.post({ - url : $P.schdlControl.urls.update, + url : $P.ctrl.urls.update, data : info, success : (resp) => { if(resp.saved){ @@ -168,7 +168,7 @@ $(document).ready(function(){ var info = $P.formFields.get(); ajax.post({ - url : $P.schdlControl.urls.remove, + url : $P.ctrl.urls.remove, data : info, success : (resp) => { if(resp.saved){ @@ -201,10 +201,10 @@ $(document).ready(function(){ var schdlInfo = ${schdlInfo}; if(schdlInfo != null){ - $P.schdlControl.dataset.setData([schdlInfo]); + $P.ctrl.dataset.setData([schdlInfo]); } else { - $P.schdlControl.dataset.setData([{ SCHDL_BGNG_YMD : "${schdlBgngYmd}", SCHDL_END_YMD : "${schdlEndYmd}" }]); + $P.ctrl.dataset.setData([{ SCHDL_BGNG_YMD : "${schdlBgngYmd}", SCHDL_END_YMD : "${schdlEndYmd}" }]); $("#btnRemove--${pageName}").attr("hidden","hidden"); } diff --git a/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp index 7a146df0..3cb7c8a2 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/ogdp/ogdp02010-main.jsp @@ -74,7 +74,7 @@