소스 정리
parent
864468eca2
commit
d1e0cbc186
@ -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…
Reference in New Issue