21 lines
594 B
JavaScript
21 lines
594 B
JavaScript
function create_table_cell(content, styleClass = "") {
|
|
if ((content !== null) && (content.trim() === "")) {
|
|
content = "<i>(üres)</i>";
|
|
}
|
|
let td = document.createElement("td");
|
|
td.innerHTML = content;
|
|
if (styleClass !== "") {
|
|
td.classList.add(styleClass);
|
|
}
|
|
return td;
|
|
}
|
|
|
|
function highlight_row(rowid) {
|
|
let hl_on = document.getElementById("chk_" + rowid).checked;
|
|
let row = document.getElementById("row_" + rowid);
|
|
if (hl_on) {
|
|
row.setAttribute("highlight", "true");
|
|
} else {
|
|
row.removeAttribute("highlight");
|
|
}
|
|
} |