Skip to content

Commit

Permalink
restore insertSpanRow JS function to the bootstrap template
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Feb 12, 2024
1 parent 5c58752 commit 1de09bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions inst/templates/bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
var table = document.getElementById("$tinytable_TABLE_ID");
table.rows[i].cells[j].classList.add(css_id);
}
function insertSpanRow(i, colspan, content) {
var table = document.getElementById('$tinytable_TABLE_ID');
var newRow = table.insertRow(i);
var newCell = newRow.insertCell(0);
newCell.setAttribute("colspan", colspan);
// newCell.innerText = content;
// this may be unsafe, but innerText does not interpret <br>
newCell.innerHTML = content;
}
function spanCell(i, j, rowspan, colspan) {
var table = document.getElementById("$tinytable_TABLE_ID");
const targetRow = table.rows[i];
Expand Down

0 comments on commit 1de09bf

Please sign in to comment.