업무구분별화면렌더링(searchFromGridTitle)함수 위치 수정(전역메소드->FimsSupport클래스 함수)
parent
07b88551b8
commit
55502feb47
@ -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");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue