diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp index dd0b147e..b7375b91 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn02010-main.jsp @@ -509,9 +509,9 @@ $(document).ready(function(){ var clsForTask = taskSeCd.toLowerCase(); //업무별 조회조건 - renderForTask($P.find("frmSearch"), clsForTask); + FimsSupport.renderForTask($P.find("frmSearch"), clsForTask); //업무별 버튼 - renderForTask($P.find("gridbuttonArea"), clsForTask); + FimsSupport.renderForTask($P.find("gridbuttonArea"), clsForTask); //버튼 이벤트 재매핑 $P.$find("btnOpenOverTime").off("click"); $P.$find("btnOpenOverTime").on("click", () => $P.openOverTimePop()); 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 a54b8960..43a806c0 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 @@ -523,7 +523,7 @@ $(document).ready(function(){ **************************************************************************/ var clsForTask = $P.$find("taskSeCd").val().toLowerCase(); //업무별 입력 항목 - renderForTask($P.find("frmEdit"), clsForTask); + FimsSupport.renderForTask($P.find("frmEdit"), clsForTask); /************************************************************************** * element.on 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 a9dc7e54..33308356 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 @@ -369,9 +369,9 @@ $(document).ready(function(){ var clsForTask = taskSeCd.toLowerCase(); //업무별 조회조건 - renderForTask($P.find("frmSearch"), clsForTask); + FimsSupport.renderForTask($P.find("frmSearch"), clsForTask); //업무별 버튼 - renderForTask($P.find("gridbuttonArea"), clsForTask); + FimsSupport.renderForTask($P.find("gridbuttonArea"), clsForTask); //버튼 이벤트 재매핑 $P.$find("btnSendCrdn").off("click"); $P.$find("btnSendCrdn").on("click", () => $P.fnSendCrdn()); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp index d86cd083..ef5ac90b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06020-info.jsp @@ -296,7 +296,7 @@ taskSeCd = $P.$find("taskSeCd").val(); } - renderForTask($P.find("frmEdit"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("frmEdit"), taskSeCd.toLowerCase()); } // 업무구분에 따른 URL 설정 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 158ebd76..5bbd5242 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 @@ -881,7 +881,7 @@ $(document).ready(function(){ var clsForTask = "${taskSeCd}".toLowerCase(); //업무별 입력 항목 - renderForTask($P.find("frmEdit"), clsForTask); + FimsSupport.renderForTask($P.find("frmEdit"), clsForTask); /************************************************************************** * element.on 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 9a42a96e..9229281b 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 @@ -311,7 +311,7 @@ $(document).ready(function(){ $P.fnResetAndChangeBiz = taskSeCd => { var clsForTask = taskSeCd.toLowerCase(); //업무별 버튼 - renderForTask($P.find("gridbuttonArea"), clsForTask); + FimsSupport.renderForTask($P.find("gridbuttonArea"), clsForTask); //버튼 이벤트 재매핑 $P.$find("btnExecuteDisabledTagInfoInquire").off("click"); $P.$find("btnExecuteDisabledTagInfoInquire").on("click", () => $P.fnExecuteDisabledTagInfoInquire()); diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp index 09322e67..1fc0b585 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl01010-main.jsp @@ -600,9 +600,9 @@ $P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 업무별 검색 조건 - renderForTask($P.find("frmSearch"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("frmSearch"), taskSeCd.toLowerCase()); // 업무별 버튼 - renderForTask($P.find("gridbuttonArea"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("gridbuttonArea"), taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = $P.find("tmpltCols").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp index fd28b092..e3aa9f89 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl02010-main.jsp @@ -719,9 +719,9 @@ $P.ctrl.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 업무별 검색 조건 - renderForTask($P.find("frmSearch"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("frmSearch"), taskSeCd.toLowerCase()); // 업무별 버튼 - renderForTask($P.find("gridbuttonArea"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("gridbuttonArea"), taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = $P.find("tmpltCols").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp index 1158f429..1fa725a3 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/excl/excl03010-main.jsp @@ -573,7 +573,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01010-main.jsp index ce0a3ba4..c23aaf3b 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01010-main.jsp @@ -735,7 +735,7 @@ }); // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01050-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01050-main.jsp index e6676439..09137170 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/levy/levy01050-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy01050-main.jsp @@ -671,7 +671,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/050/list.do"); // 검색 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp index 196e2404..5176e2de 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/levy/levy02010-main.jsp @@ -716,7 +716,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/rcvm/rcvm01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/rcvm/rcvm01010-main.jsp index 731519ce..db35b51f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/rcvm/rcvm01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/rcvm/rcvm01010-main.jsp @@ -742,7 +742,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/010/list.do"); // 검색 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp index ac3659e3..00232694 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/rdca/rdca01010-main.jsp @@ -744,7 +744,7 @@ let clsForTask = taskSeCd.toLowerCase(); // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", clsForTask); + FimsSupport.renderForTask("frmSearch--${pageName}", clsForTask); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp index c2a1fd4e..0b8851bc 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01010-main.jsp @@ -759,7 +759,7 @@ $("#schLevyExclRsnCd--${pageName}").append(reasons.map(reason => "").join()); // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무에 따른 위반 내용 let vltnIdCode = []; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp index edc4e074..81205f59 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01030-main.jsp @@ -610,7 +610,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/030/list.do"); // 조회 // 업무별 조회 조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp index 57f392d2..1b39d31f 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01050-main.jsp @@ -690,7 +690,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/050/list.do"); // 조회 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무에 따른 위반 내용 let vltnCode = []; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01070-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01070-main.jsp index fc07cbaa..6ab07184 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01070-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01070-main.jsp @@ -613,7 +613,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/070/list.do"); // 검색 // 업무별 조회 조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01090-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01090-main.jsp index f31872b8..5be6c4bd 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01090-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01090-main.jsp @@ -641,7 +641,7 @@ let clsForTask = taskSeCd.toLowerCase(); // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", clsForTask); + FimsSupport.renderForTask("frmSearch--${pageName}", clsForTask); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01100-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01100-info.jsp index 8337e849..524826ad 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01100-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01100-info.jsp @@ -383,7 +383,7 @@ $P.control.urls.create = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/100/createList.do"); // 등록 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무에 따른 위반 내용 let vltnIdCode = []; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01110-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01110-main.jsp index 2970645b..39eb5e77 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01110-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01110-main.jsp @@ -670,7 +670,7 @@ $("#schSndngSeCd--${pageName}").append(reasons.map(reason => "").join()); // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01220-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01220-main.jsp index 49edf0ec..abe3d66a 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01220-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sndb/sndb01220-main.jsp @@ -781,7 +781,7 @@ $P.control.urls.load = wctx.url("/" + taskSeCd + "${infoPrefixUrl}" + "/220/list.do"); // 검색 // 업무별 조회조건 - renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); + FimsSupport.renderForTask("frmSearch--${pageName}", taskSeCd.toLowerCase()); // 업무별 그리드 th let colContent = document.getElementById("${infoPrefix}Col--${pageName}").content; diff --git a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp index e218d8db..21316fdb 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/sprt/sprt02020-info.jsp @@ -1045,7 +1045,7 @@ let taskSeCd = pageObject["${mainPageName}"].mainCtrl.getValue("TASK_SE_CD"); // 업무 구분에 따른 화면 설정 - renderForTask($P.find("frmEditCrdnPayer"), taskSeCd.toLowerCase()); + FimsSupport.renderForTask($P.find("frmEditCrdnPayer"), taskSeCd.toLowerCase()); } /************************************************************************** diff --git a/src/main/webapp/WEB-INF/jsp/include/tail.jsp b/src/main/webapp/WEB-INF/jsp/include/tail.jsp index 99e0a8b6..23c011d8 100644 --- a/src/main/webapp/WEB-INF/jsp/include/tail.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/tail.jsp @@ -46,8 +46,6 @@ - - diff --git a/src/main/webapp/resources/js/fims/cmmn/fims-support.js b/src/main/webapp/resources/js/fims/cmmn/fims-support.js index a1b9830c..2684f9d4 100644 --- a/src/main/webapp/resources/js/fims/cmmn/fims-support.js +++ b/src/main/webapp/resources/js/fims/cmmn/fims-support.js @@ -10,6 +10,7 @@ class FimsSupport { console.log("getVhclInfo(시군구코드, 차량번호, 기준일자) : 시군구코드, 차량번호, 기준일자로 차적 조회"); console.log("getVhclDisabledParkingInfo(차량번호) : 장애인 차량여부 조회"); console.log("searchFromGridTitle(키워드영문명, 키워드한글명, 메인옵션, 추가옵션) : 그리드의 특정 열 값을 키워드로 자료 조회"); + console.log("renderForTask(렌더링영역객체, 업무class속성명) : 업무구분별 화면 렌더링"); } /************************************************************************** @@ -187,4 +188,71 @@ class FimsSupport { } } -} \ No newline at end of file + + /************************************************************************** + * 업무구분별 화면 렌더링 + **************************************************************************/ + static renderForTask(areaId, taskClass){ + var slotAreas; + if(typeof areaId == "string"){ + slotAreas = $("#"+areaId).find("[slot]"); + } else { + slotAreas = $(areaId).find("[slot]"); + } + + slotAreas.each(function(){ + if($(this).hasClass("if-empty-col0")){ + if(!isEmpty($(this).attr("data-original-col-size"))){ + let colSize = $(this).attr("data-original-col-size"); + $(this).removeClass("col-0"); + $(this).addClass(colSize); + $(this).attr("data-original-col-size",""); + } + } + }); + + 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; + + }); + + slotAreas.each(function(){ + if($(this).hasClass("if-empty-col0")){ + if($(this).children().not("template").length == 0){ + let colSize = ""; + for(let col of BOOTSTRAP_COLS){ + if($(this).hasClass(col)){ + colSize = col; + break; + } + } + + $(this).attr("data-original-col-size", colSize); + $(this).removeClass(colSize); + $(this).addClass("col-0"); + } + } + }); + } +} + +const BOOTSTRAP_COLS = [ + "col-1","col-2","col-3","col-4","col-5","col-6","col-7","col-8","col-9","col-10","col-11","col-12", + "col-sm-1","col-sm-2","col-sm-3","col-sm-4","col-sm-5","col-sm-6","col-sm-7","col-sm-8","col-sm-9","col-sm-10","col-sm-11","col-sm-12", + "col-md-1","col-md-2","col-md-3","col-md-4","col-md-5","col-md-6","col-md-7","col-md-8","col-md-9","col-md-10","col-md-11","col-md-12", + "col-lg-1","col-lg-2","col-lg-3","col-lg-4","col-lg-5","col-lg-6","col-lg-7","col-lg-8","col-lg-9","col-lg-10","col-lg-11","col-lg-12", + "col-xl-1","col-xl-2","col-xl-3","col-xl-4","col-xl-5","col-xl-6","col-xl-7","col-xl-8","col-xl-9","col-xl-10","col-xl-11","col-xl-12", + "col-xxl-1","col-xxl-2","col-xxl-3","col-xxl-4","col-xxl-5","col-xxl-6","col-xxl-7","col-xxl-8","col-xxl-9","col-xxl-10","col-xxl-11","col-xxl-12" +]; \ No newline at end of file diff --git a/src/main/webapp/resources/js/fims/cmmn/taskUtil.js b/src/main/webapp/resources/js/fims/cmmn/taskUtil.js deleted file mode 100644 index 45099369..00000000 --- a/src/main/webapp/resources/js/fims/cmmn/taskUtil.js +++ /dev/null @@ -1,63 +0,0 @@ -const BOOTSTRAP_COLS = [ - "col-1","col-2","col-3","col-4","col-5","col-6","col-7","col-8","col-9","col-10","col-11","col-12", - "col-sm-1","col-sm-2","col-sm-3","col-sm-4","col-sm-5","col-sm-6","col-sm-7","col-sm-8","col-sm-9","col-sm-10","col-sm-11","col-sm-12", - "col-md-1","col-md-2","col-md-3","col-md-4","col-md-5","col-md-6","col-md-7","col-md-8","col-md-9","col-md-10","col-md-11","col-md-12", - "col-lg-1","col-lg-2","col-lg-3","col-lg-4","col-lg-5","col-lg-6","col-lg-7","col-lg-8","col-lg-9","col-lg-10","col-lg-11","col-lg-12", - "col-xl-1","col-xl-2","col-xl-3","col-xl-4","col-xl-5","col-xl-6","col-xl-7","col-xl-8","col-xl-9","col-xl-10","col-xl-11","col-xl-12", - "col-xxl-1","col-xxl-2","col-xxl-3","col-xxl-4","col-xxl-5","col-xxl-6","col-xxl-7","col-xxl-8","col-xxl-9","col-xxl-10","col-xxl-11","col-xxl-12" -]; - -function renderForTask(areaId, taskClass){ - var slotAreas; - if(typeof areaId == "string"){ - slotAreas = $("#"+areaId).find("[slot]"); - } else { - slotAreas = $(areaId).find("[slot]"); - } - - slotAreas.each(function(){ - if($(this).hasClass("if-empty-col0")){ - if(!isEmpty($(this).attr("data-original-col-size"))){ - let colSize = $(this).attr("data-original-col-size"); - $(this).removeClass("col-0"); - $(this).addClass(colSize); - $(this).attr("data-original-col-size",""); - } - } - }); - - 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; - - }); - - slotAreas.each(function(){ - if($(this).hasClass("if-empty-col0")){ - if($(this).children().not("template").length == 0){ - let colSize = ""; - for(let col of BOOTSTRAP_COLS){ - if($(this).hasClass(col)){ - colSize = col; - break; - } - } - - $(this).attr("data-original-col-size", colSize); - $(this).removeClass(colSize); - $(this).addClass("col-0"); - } - } - }); -} \ No newline at end of file