소스 정리

main
이범준 9 months ago
parent b5189e8ef4
commit c23dae2954

@ -878,16 +878,16 @@ $(document).ready(function(){
switch (renderDataType) {
case "photoInspection":
var dataList = $P.photoInspectionControl.dataset;
var empty = dataList.empty;
var DS = $P.photoInspectionControl.dataset;
var empty = DS.empty;
var notFound = [document.getElementById("photoInspectionNotFound--${pageName}").innerHTML]
var found = document.getElementById("photoInspectionRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','photoInspection');");
var trs = empty ? notFound : dataList.inStrings(found, replacer);
var noMore = (total == dataList.length);
var trs = empty ? notFound : DS.inStrings(found, replacer);
var noMore = (total == DS.length);
var initScroll = ($P.photoInspectionControl.query.pageNum < 2) && ($P.photoInspectionControl.untilPageNum == 0);
$("#photoInspection-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
@ -899,15 +899,15 @@ $(document).ready(function(){
}
break;
case "sameVehicleInspectionMain":
var dataList = $P.sameVehicleControl.main.dataset;
var empty = dataList.empty;
var DS = $P.sameVehicleControl.main.dataset;
var empty = DS.empty;
var notFound = [document.getElementById("sameVehicleInspectionMainNotFound--${pageName}").innerHTML];
var found = document.getElementById("sameVehicleInspectionMainRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID_LIST") + "','sameVehicleInspectionMain');");
var trs = empty ? notFound : dataList.inStrings(found, replacer);
var noMore = (total == dataList.length);
var trs = empty ? notFound : DS.inStrings(found, replacer);
var noMore = (total == DS.length);
var initScroll = ($P.sameVehicleControl.main.query.pageNum < 2) && ($P.sameVehicleControl.untilPageNum == 0);
$("#sameVehicleInspectionMain-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
@ -920,14 +920,14 @@ $(document).ready(function(){
}
break;
case "sameVehicleInspectionSub":
var dataList = $P.sameVehicleControl.sub.dataset;
var empty = dataList.empty;
var DS = $P.sameVehicleControl.sub.dataset;
var empty = DS.empty;
var notFound = [document.getElementById("sameVehicleInspectionSubNotFound--${pageName}").innerHTML]
var found = document.getElementById("sameVehicleInspectionSubRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickInspectionDataList('" + dataItem.getValue("CRDN_ID") + "','sameVehicleInspectionSub');");
var trs = empty ? notFound : dataList.inStrings(found, replacer);
var trs = empty ? notFound : DS.inStrings(found, replacer);
$("#sameVehicleInspectionSubTbody--${pageName}").html(trs.join());
break;
default: break;

@ -244,16 +244,16 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found,replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -257,16 +257,16 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : crdnList.inStrings(found,replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found,replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -316,14 +316,14 @@ $(document).ready(function(){
//테이블 렌더링
$P.renderParsedInfoList = (total) => {
var parsedInfoList = $P.parsedInfoControl.dataset;
var empty = parsedInfoList.empty;
var parsedInfoDS = $P.parsedInfoControl.dataset;
var empty = parsedInfoDS.empty;
var notFound = [$("#table-responsive--${pageName}").find("template.notFound")[0].innerHTML];
var found = $("#table-responsive--${pageName}").find("template.found")[0].innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('" + dataItem.getValue("FILE_NAME") + "');");
var trs = empty ? notFound : parsedInfoList.inStrings(found,replacer);
var trs = empty ? notFound : parsedInfoDS.inStrings(found,replacer);
$("#table-responsive--${pageName}").find("tbody").html(trs.join());

@ -457,8 +457,8 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var clsForTask = $("#frmSearch--${pageName} [name='taskSeCd']:checked").val().toLowerCase();
var notFound = [document.getElementById("crdnNotFound--${pageName}").content.querySelector("."+clsForTask+",.cmn").outerHTML];
var foundContent = document.getElementById("crdnRow--${pageName}").content;
@ -475,8 +475,8 @@ $(document).ready(function(){
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found, replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found, replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -330,15 +330,15 @@ $(document).ready(function(){
$P.delTeamControl.onDatasetChange = (obj) => {
var delTeamList = $P.delTeamControl.dataset;
var empty = delTeamList.empty;
var delTeamDS = $P.delTeamControl.dataset;
var empty = delTeamDS.empty;
var notFound = [document.getElementById("delTeamNotFound--${pageName}").innerHTML];
var found = document.getElementById("delTeamRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "")
.replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : delTeamList.inStrings(found,replacer);
var trs = empty ? notFound : delTeamDS.inStrings(found,replacer);
$("#delTeamTbody--${pageName}").html(trs.join());
};
@ -388,15 +388,15 @@ $(document).ready(function(){
$P.renderUseTeamList = (total) => {
var useTeamList = $P.useTeamControl.dataset;
var empty = useTeamList.empty;
var useTeamDS = $P.useTeamControl.dataset;
var empty = useTeamDS.empty;
var notFound = [document.getElementById("useTeamNotFound--${pageName}").innerHTML];
var found = document.getElementById("useTeamRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickUseTeamList('" + dataItem.getValue("TEAM_ID") + "');")
.replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : useTeamList.inStrings(found,replacer);
var trs = empty ? notFound : useTeamDS.inStrings(found,replacer);
$("#useTeamTbody--${pageName}").html(trs.join());
}

@ -341,16 +341,16 @@ $(document).ready(function(){
$P.renderExmptnVhclList = (total) => {
var exmptnVhclList = $P.exmptnVhclControl.dataset;
var empty = exmptnVhclList.empty;
var exmptnVhclDS = $P.exmptnVhclControl.dataset;
var empty = exmptnVhclDS.empty;
var notFound = [document.getElementById("exmptnVhclNotFound--${pageName}").innerHTML];
var found = document.getElementById("exmptnVhclRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickExmptnVhclList('" + dataItem.getValue("EXMPTN_VHCL_ID") + "');");
var trs = empty ? notFound : exmptnVhclList.inStrings(found,replacer);
var noMore = (total == exmptnVhclList.length);
var trs = empty ? notFound : exmptnVhclDS.inStrings(found,replacer);
var noMore = (total == exmptnVhclDS.length);
var initScroll = ($P.exmptnVhclControl.query.pageNum < 2) && ($P.exmptnVhclControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -90,15 +90,15 @@ $(document).ready(function(){
});
$P.exmptnVhclControl.onDatasetChange = (obj) => {
var exmptnVhclList = $P.exmptnVhclControl.dataset;
var empty = exmptnVhclList.empty;
var exmptnVhclDS = $P.exmptnVhclControl.dataset;
var empty = exmptnVhclDS.empty;
var notFound = [document.getElementById("exmptnVhclNotFound--${pageName}").innerHTML];
var found = document.getElementById("exmptnVhclRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "")
.replace(/{ondblclick}/gi, "");
var trs = empty ? notFound : exmptnVhclList.inStrings(found,replacer);
var trs = empty ? notFound : exmptnVhclDS.inStrings(found,replacer);
$("#exmptnVhclTbody--${pageName}").html(trs.join());

@ -436,16 +436,16 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found, replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found, replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -453,16 +453,16 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found, replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found, replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
@ -479,7 +479,7 @@ $(document).ready(function(){
$("#crdnTbody--${pageName}").find("tr[data-key]").each(function(item){
var crdnId = this.dataset.key;
var data = crdnList.getData(crdnId);
var data = crdnDS.getData(crdnId);
if(data.COPY_EXIST_YN == "Y"){
$(this).addClass("text-red");

@ -390,16 +390,16 @@ $(document).ready(function(){
$P.renderCrdnList = (total) => {
var crdnList = $P.crdnControl.dataset;
var empty = crdnList.empty;
var crdnDS = $P.crdnControl.dataset;
var empty = crdnDS.empty;
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
var trs = empty ? notFound : crdnList.inStrings(found, replacer);
var noMore = (total == crdnList.length);
var trs = empty ? notFound : crdnDS.inStrings(found, replacer);
var noMore = (total == crdnDS.length);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -317,15 +317,15 @@ $(document).ready(function(){
$P.renderDmndList = (total) => {
var dmndList = $P.dmndControl.dataset;
var empty = dmndList.empty;
var dmndDS = $P.dmndControl.dataset;
var empty = dmndDS.empty;
var notFound = [document.getElementById("dmndNotFound--${pageName}").innerHTML];
var found = document.getElementById("dmndRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');");
var trs = empty ? notFound : dmndList.inStrings(found, replacer);
var noMore = (total == dmndList.length);
var trs = empty ? notFound : dmndDS.inStrings(found, replacer);
var noMore = (total == dmndDS.length);
var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -430,8 +430,8 @@ $(document).ready(function(){
return;
}
var ansBodyList = $P.ansBodyControl[renderDataType].dataset;
var empty = ansBodyList.empty;
var ansBodyDS = $P.ansBodyControl[renderDataType].dataset;
var empty = ansBodyDS.empty;
var notFound = [document.getElementById(notFoundId).innerHTML];
var found = document.getElementById(foundId).innerHTML;
@ -450,7 +450,7 @@ $(document).ready(function(){
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','nonlevy');");
}
var trs = empty ? notFound : ansBodyList.inStrings(found, replacer);
var trs = empty ? notFound : ansBodyDS.inStrings(found, replacer);
$("#"+tbodyId).html(trs.join());
}

@ -200,8 +200,8 @@ $(document).ready(function(){
$P.renderWarningWordsList = (total) => {
var warningWordsList = $P.warningWordsControl.dataset;
var empty = warningWordsList.empty;
var warningWordsDS = $P.warningWordsControl.dataset;
var empty = warningWordsDS.empty;
var notFound = [document.getElementById("warningWordsNotFound--${pageName}").innerHTML];
var found = document.getElementById("warningWordsRow--${pageName}").innerHTML;
@ -209,7 +209,7 @@ $(document).ready(function(){
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');")
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');");
var trs = empty ? notFound : warningWordsList.inStrings(found, replacer);
var trs = empty ? notFound : warningWordsDS.inStrings(found, replacer);
$("#warningWordsTbody--${pageName}").html(trs.join());
}

@ -280,8 +280,8 @@ $(document).ready(function(){
$P.renderDeptList = (total) => {
var deptList = $P.deptControl.dataset;
var empty = deptList.empty;
var deptDS = $P.deptControl.dataset;
var empty = deptDS.empty;
var found = document.getElementById("deptRow--${pageName}").innerHTML;
var notFound = [document.getElementById("deptNotFound--${pageName}").innerHTML];
@ -290,8 +290,8 @@ $(document).ready(function(){
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDeptList('" + dataItem.getValue("DEPT_CD") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickDeptList('" + dataItem.getValue("DEPT_CD") + "');");
var trs = empty ? notFound : deptList.inStrings(found, replacer);
var noMore = (total == deptList.length);
var trs = empty ? notFound : deptDS.inStrings(found, replacer);
var noMore = (total == deptDS.length);
var initScroll = ($P.deptControl.query.pageNum < 2) && ($P.deptControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);

@ -248,11 +248,11 @@ $(document).ready(function() {
var trs = "";
var notFound = [document.getElementById("notFound--${pageName}").innerHTML];
var found = document.getElementById("row--${pageName}").innerHTML;
var ds;
var DS;
if(updown == "up"){
ds = $P.integrationSearchControl.updataset;
DS = $P.integrationSearchControl.updataset;
} else {
ds = $P.integrationSearchControl.downdataset;
DS = $P.integrationSearchControl.downdataset;
}
var replacer;
if(updown == "up"){
@ -266,16 +266,16 @@ $(document).ready(function() {
}
var empty = ds.empty;
var empty = DS.empty;
if(empty){
trs = notFound;
$P.setTotalData(updown, []);
} else if(tabGroup == "전체"){
trs = ds.inStrings(found, replacer);
$P.setTotalData(updown, ds._items);
trs = DS.inStrings(found, replacer);
$P.setTotalData(updown, DS._items);
} else {
var temp = ds._items;
var temp = DS._items;
var filtered = [];
@ -286,11 +286,11 @@ $(document).ready(function() {
if(filtered.lenth < 1){
trs = notFound;
} else {
ds._items = filtered;
DS._items = filtered;
trs = ds.inStrings(found, replacer);
ds._items = temp;
DS._items = temp;
}
}

@ -216,14 +216,14 @@ $(document).ready(function(){
**************************************************************************/
$P.detailGridControl.onDatasetChange = () => {
var ds = $P.detailGridControl.dataset;
var empty = ds.empty;
var DS = $P.detailGridControl.dataset;
var empty = DS.empty;
var notFound = [""];
var found = document.getElementById("detailGridTbodyTemplate--${pageName}").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDetailGrid('" + dataItem.getValue("DATA_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblClickDetailGrid('" + dataItem.getValue("DATA_ID") + "');");
var trs = empty ? notFound : ds.inStrings(found, replacer);
var trs = empty ? notFound : DS.inStrings(found, replacer);
$("#detailTbody--${pageName}").html(trs.join());
//보안모드

Loading…
Cancel
Save