Hi everyone, I’m new to Webix and I’m learning a lot during my first days, so sorry if the question is stupid for you.
I need to use and accordion inside a panel but I am not able to do it and I don’t know why, here my code:
return {
create: function () {
var panel = {
view: "panel", name: "Task Notturni", id: "pnlTaskNotturni", icon: "fal fa-menu", x: 2, y: 3, dx: 2, dy: 1,
resize: true,
body: {
view: "list",
css: "tiles",
scroll: true,
borderless: true,
template: function (obj) {
if (obj.MainHeader) {
var html = "<div class='flex_tmp ' style = 'border:rgba(26, 83, 255, 0.25) 2px solid;'>";
html += "<div class='item' style='background-color: rgba(26, 83, 255, 0.25);'>";
html += "<div class='webix_icon iconSF fal fa-bars-progress' style='color: rgba(26, 83, 255, 1);'></div>";
html += "<div class='details'><span class='valueSF' style='float:right; color: rgba(26, 83, 255, 1);'>" + obj.Success + "/" + obj.Total + "</span></div>";
html += "<div class='textSF' style='color: rgba(26, 83, 255, 1);'>Task eseguiti con successo</div>";
html += "</div>";
html += "</div>";
return html;
} else {
html += "<div class='flex_tmp'>";
html += "<div class='main sf2'>";
html += "<div class='webix_icon icon fal fa-bars-progress' style='color:rgba(230, 0, 0, 1.0)'></div>";
html += "<div class='detailsD'><div class='text' style='color:rgba(0, 0, 0, 0.8)'>";
if(obj.Description) {
var html = webix.ui({
view: "accordion",
type: "wide",
multi: true,
collapsed: true,
height: "auto",
rows: [
{
header: obj.Description,
headerHeight: 50,
body: {
template: function() {
if(obj.Logs.length !== 0){
var logs = "<ul>";
for(var i = 0; i < obj.Logs.length; i++){
logs += "<li>" + obj.Logs[i].Description + "</li>"
}
logs += "</ul>";
} else {
var logs = "";
}
return logs;
}
}
},
]
});
}
html += "</div>";
html += "</div>";
html += "</div>";
html += "</div>";
return html;
}
},
select: true,
data: dashboardAPI.nuoviLogTasks,
on: {
onItemDblClick: function (id) {}
}
}
};
return panel;
}
};
but with this code, I don’t have an accordion, and I see [object object] in my html view.
I check all other topics but I didn’t find anything similar.
Anyone could help me? Thanks in advance.