web: minor, improve cell size

This commit is contained in:
King Kévin 2023-01-30 12:37:55 +01:00
parent baa32c62c2
commit 1595ea9017
1 changed files with 6 additions and 2 deletions

View File

@ -113,7 +113,11 @@ function select_part()
for (const table of tables) {
const tbody = document.getElementById(table);
tbody.innerHTML = null;
part[table].push({name: "", value: ""}); // empty field to add
if ("components" == table) {
part[table].push({name: "", quantity: ""}); // empty field to add
} else {
part[table].push({name: "", value: ""}); // empty field to add
}
for (const row of part[table]) {
const tr = document.createElement('tr');
let td = document.createElement('td');
@ -148,7 +152,7 @@ function select_part()
input.min = "0";
input.step = "1";
input.value = row.quantity;
input.style.width = "95%";
input.size = "4";
td.appendChild(input);
tr.appendChild(td);
}