|
|
@ -1,5 +1,26 @@
|
|
|
|
|
|
|
|
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){
|
|
|
|
function renderForTask(areaId, taskClass){
|
|
|
|
var slotAreas = $("#"+areaId).find("[slot]");
|
|
|
|
var 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(){
|
|
|
|
slotAreas.each(function(){
|
|
|
|
var tempHtml = "";
|
|
|
|
var tempHtml = "";
|
|
|
|
$(this).find("template").each(function(){
|
|
|
|
$(this).find("template").each(function(){
|
|
|
@ -14,5 +35,24 @@ function renderForTask(areaId, taskClass){
|
|
|
|
|
|
|
|
|
|
|
|
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
|
|
|
|
var inHtml = $(taskTemplate[0].content).find("slot")[0].innerHTML;
|
|
|
|
this.innerHTML = tempHtml + inHtml;
|
|
|
|
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");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|