added syling for desktop

This commit is contained in:
2022-06-19 15:05:47 +02:00
parent 7fcd483592
commit 9ddc2616de
10 changed files with 342 additions and 175 deletions

View File

@@ -28,8 +28,8 @@ function highlight_row() {
for( var i = 0; i < cells.length; i++) {
var cell = cells[i];
var buttons = document.getElementsByClassName('edit');
cell.onclick = function() {
var buttons = document.getElementsByClassName('edit');
var rowId = this.parentNode.rowIndex;
var rowsNotSelected = table.getElementsByTagName('tr');
for ( var row = 0; row < rowsNotSelected.length; row++) {
@@ -43,6 +43,7 @@ function highlight_row() {
rowSelected.classList.remove('selected');
Array.prototype.forEach.call(buttons, function(button) {
button.disabled = true;
button.className += " disabled";
})
} else {
selected = rowId;
@@ -50,6 +51,7 @@ function highlight_row() {
rowSelected.className += " selected";
Array.prototype.forEach.call(buttons, function(button) {
button.disabled = false;
button.classList.remove('disabled');
})
}
}