소스 정리

main
이범준 1 year ago
parent 864468eca2
commit d1e0cbc186

@ -269,7 +269,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<!-- TODO : 미납만 조회 --> <!-- TODO : 미납만 조회 -->
</if> </if>
<if test="taskSeCd == 'PVS'"> <if test="taskSeCd == 'PVS'">
<if test="schExclTimeout == on"> <if test="schExclTimeout == 'on'">
AND OVTIME_YN = 'N' AND OVTIME_YN = 'N'
</if> </if>
</if> </if>

@ -404,24 +404,7 @@ $(document).ready(function(){
var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase(); var clsForTask = $("#taskSeCd--${pageName}").val().toLowerCase();
//업무별 입력 항목 //업무별 입력 항목
var editSlotAreas = $("#frmEdit--${pageName}").find("[slot='edit']"); renderForTask('frmEdit--${pageName}', clsForTask);
editSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
initDatepicker("frmEdit--${pageName}"); //달력 초기화 initDatepicker("frmEdit--${pageName}"); //달력 초기화
@ -456,6 +439,4 @@ $(document).ready(function(){
$P.crdnControl.dataset.append({}); $P.crdnControl.dataset.append({});
}); });
</script> </script>

@ -302,23 +302,7 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase(); var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건 //업무별 조회조건
var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']"); renderForTask("frmSearch--${pageName}", clsForTask);
searchSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
//업무별 그리드 //업무별 그리드
var colsContent = document.getElementById("crdnCols--${pageName}").content; var colsContent = document.getElementById("crdnCols--${pageName}").content;

@ -437,42 +437,9 @@ $(document).ready(function(){
var clsForTask = taskSeCd.toLowerCase(); var clsForTask = taskSeCd.toLowerCase();
//업무별 조회조건 //업무별 조회조건
var searchSlotAreas = $("#frmSearch--${pageName}").find("[slot='search']"); renderForTask("frmSearch--${pageName}", clsForTask);
searchSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
//업무별 버튼 //업무별 버튼
var buttonSlotAreas = $("#gridbuttonArea--${pageName}").find("[slot='button']"); renderForTask("gridbuttonArea--${pageName}", clsForTask);
buttonSlotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+clsForTask);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
$('#btnPhotoInspection--${pageName}').trigger("click"); $('#btnPhotoInspection--${pageName}').trigger("click");
} }

@ -46,12 +46,14 @@
<script src="<c:url value="/resources/js/fims/framework/cmm/cmmUtil.js"/>?${ver}"></script> <script src="<c:url value="/resources/js/fims/framework/cmm/cmmUtil.js"/>?${ver}"></script>
<!-- 날짜 관련 유틸 --> <!-- 날짜 관련 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/cmmDateUtil.js"/>?${ver}"></script> <script src="<c:url value="/resources/js/fims/framework/cmm/cmmDateUtil.js"/>?${ver}"></script>
<!-- 업무별 기능 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/taskUtil.js"/>?${ver}"></script>
<!-- 데이트픽커 --> <!-- 데이트픽커 -->
<script src="<c:url value="/resources/lib/fims/framework/datepicker/datepicker.js?${ver}"/>"></script> <script src="<c:url value="/resources/lib/fims/framework/datepicker/datepicker.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/framework/cmm/initDatepicker.js?${ver}"/>"></script> <script src="<c:url value="/resources/js/fims/framework/cmm/initDatepicker.js?${ver}"/>"></script>
<!-- 그리드 템플릿 설정 --> <!-- 검색 유틸 -->
<script src="<c:url value="/resources/js/fims/framework/cmm/initGrid.js"/>?${ver}"></script> <script src="<c:url value="/resources/js/fims/framework/cmm/searchUtil.js"/>?${ver}"></script>
<!-- endbuild --> <!-- endbuild -->

@ -247,3 +247,18 @@ function escapeHTMLEntity(str) {
return str; return str;
} }
} }
/**
* 스네이크 표기법을 카멜 표기법으로 변경한다.
* @return 치환된 문자열
*/
function snakeToCamel(text){
text = text.toLowerCase();
var arrUnderbar = text.match(/\_[a-zA-Z]/g);
if(arrUnderbar){
for(var j = 0; j < arrUnderbar.length; j++) {
text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", ""));
}
}
return text;
}

@ -13,15 +13,3 @@ function searchFromGridTitle(byValue, byOutputValue, mainOption, subOption){
document.getElementById(mainOptionElementId).value = mainOption; document.getElementById(mainOptionElementId).value = mainOption;
document.getElementById(subOptionElementId).value = subOption; document.getElementById(subOptionElementId).value = subOption;
} }
function snakeToCamel(text){
text = text.toLowerCase();
var arrUnderbar = text.match(/\_[a-zA-Z]/g);
if(arrUnderbar){
for(var j = 0; j < arrUnderbar.length; j++) {
text = text.replace(arrUnderbar[j], arrUnderbar[j].toUpperCase().replace("_", ""));
}
}
return text;
}

@ -0,0 +1,18 @@
function renderForTask(areaId, taskClass){
var slotAreas = $("#"+areaId).find("[slot]");
slotAreas.each(function(){
var tempHtml = "";
$(this).find("template").each(function(){
tempHtml += this.cloneNode(true).outerHTML;
});
var taskTemplate = $(this).find("template."+taskClass);
if(taskTemplate.length < 1){
this.innerHTML = tempHtml;
return;
}
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
this.innerHTML = tempHtml + inHtml;
});
}
Loading…
Cancel
Save