Indention fixed
This commit is contained in:
parent
84dd924a1d
commit
fe8b70a5b9
1 changed files with 76 additions and 76 deletions
|
@ -257,20 +257,20 @@ links.forEach(function(link) {
|
|||
});
|
||||
|
||||
function createTable() {
|
||||
var table = document.createElement("table");
|
||||
var table = document.createElement("table");
|
||||
|
||||
// Headerzeile
|
||||
var headerRow = document.createElement("tr");
|
||||
var headers = ["Stunde", "Minute", "ch1", "ch2", "ch3", "ch4"];
|
||||
for (var i = 0; i < headers.length; i++) {
|
||||
// Headerzeile
|
||||
var headerRow = document.createElement("tr");
|
||||
var headers = ["Stunde", "Minute", "ch1", "ch2", "ch3", "ch4"];
|
||||
for (var i = 0; i < headers.length; i++) {
|
||||
var header = document.createElement("th");
|
||||
header.innerHTML = headers[i];
|
||||
headerRow.appendChild(header);
|
||||
}
|
||||
table.appendChild(headerRow);
|
||||
}
|
||||
table.appendChild(headerRow);
|
||||
|
||||
// Inhaltszeilen
|
||||
for (var row = 0; row < 10; row++) {
|
||||
// Inhaltszeilen
|
||||
for (var row = 0; row < 10; row++) {
|
||||
var contentRow = document.createElement("tr");
|
||||
|
||||
// Spalte "Stunde"
|
||||
|
@ -306,14 +306,14 @@ for (var row = 0; row < 10; row++) {
|
|||
}
|
||||
|
||||
table.appendChild(contentRow);
|
||||
}
|
||||
}
|
||||
|
||||
// Button
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = "Save";
|
||||
button.classList.add("pure-button");
|
||||
button.classList.add("pure-button-primary");
|
||||
button.onclick = function() {
|
||||
// Button
|
||||
var button = document.createElement("button");
|
||||
button.innerHTML = "Save";
|
||||
button.classList.add("pure-button");
|
||||
button.classList.add("pure-button-primary");
|
||||
button.onclick = function() {
|
||||
var data = [];
|
||||
|
||||
var rows = table.getElementsByTagName("tr");
|
||||
|
@ -337,11 +337,11 @@ button.onclick = function() {
|
|||
xhr.open("POST", "http://{{IP_ADDRESS}}/tc_data_save?data=" + encodeURIComponent(json), true);
|
||||
xhr.send();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
var container = document.getElementById("table-container");
|
||||
container.innerHTML = "";
|
||||
container.classList.add("pure-form");
|
||||
container.appendChild(table);
|
||||
container.appendChild(button);
|
||||
var container = document.getElementById("table-container");
|
||||
container.innerHTML = "";
|
||||
container.classList.add("pure-form");
|
||||
container.appendChild(table);
|
||||
container.appendChild(button);
|
||||
}
|
Loading…
Reference in a new issue