create key index funct

master
grgr 3 years ago
parent d598a72e48
commit 64ac91a383

@ -59,18 +59,20 @@ function createIndexSection(contribution) {
let table = document.createElement("table");
let title = document.createElement("h4");
title.innerHTML = contribution.title;
contribution.audio.forEach((track) => {
console.log(track);
// let row = document.createElement("tr");
// let col1 = document.createElement("td");
// let col2 = document.createElement("td");
// col1.setAttribute("class", "symbol");
// col2.setAttribute("class", "filename");
// col2.innerHTML = track;
// row.appendChild(col1);
// row.appendChild(col2);
// table.appendChild(row);
if (contribution.audio){
let tracks = contribution.audio;
tracks.forEach((track) => {
let row = document.createElement("tr");
let col1 = document.createElement("td");
let col2 = document.createElement("td");
col1.setAttribute("class", "symbol");
col2.setAttribute("class", "filename");
col2.innerHTML = track;
row.appendChild(col1);
row.appendChild(col2);
table.appendChild(row);
});
}
trackList.appendChild(title);
trackList.appendChild(table);
}

Loading…
Cancel
Save