it is now possible to edit station entries

This commit is contained in:
2022-06-17 17:18:41 +02:00
parent 491a12276d
commit 4ca75ef48d
7 changed files with 108 additions and 8 deletions

View File

@@ -6,12 +6,13 @@ if (document.readyState == "complete") {
}
function init() {
if(document.getElementById('table') != null) {
if(document.getElementById('table') != null && document.getElementsByClassName('edit')[0] != null) {
highlight_row();
}
user_edit_button();
statistic_edit_button();
station_edit_button();
}
var selected = null;
@@ -65,4 +66,15 @@ function statistic_edit_button() {
this.form.submit();
}
}
}
function station_edit_button() {
var button = document.getElementById('edit_station');
if(button != null) {
button.onclick = function() {
var row = document.getElementsByClassName("selected")[0];
document.getElementById('s_id').value = row.id;
this.form.submit();
}
}
}