implemented alert to delete all jobs

#8
This commit is contained in:
schrom01
2022-08-27 22:06:58 +02:00
parent 0ed508f70d
commit 0135609919
4 changed files with 31 additions and 16 deletions
+16 -2
View File
@@ -34,6 +34,20 @@
executeAction('get_zone_info', {{ zone.number }}, '0', refreshZone);
{% endfor %}
}
function buttonDeleteJobById(jobId) {
if(jobId == "all") {
if(confirm('{{ translater.getTranslation("delete all planed and cancel running jobs?")}}')){
document.getElementById("jobListBody").innerHTML = "";
} else {
return
}
} else {
var jobToDelete = document.getElementById("job_" + jobId);
document.getElementById("jobListBody").removeChild(jobToDelete);
}
deleteJobById('delete_job_by_id',jobId);
}
</script>
</head>
@@ -46,11 +60,11 @@
<div id="pipeline" class="scrollingtable">
<div>
<div id="jobListTable">
<div>
<table>
<caption>{{ translater.getTranslation("planed irrigationjobs") }}</caption>
<thead>
<thead id="jobListHead">
<tr>
<th><div label="Nr."></div></th>
<th><div label="{{ translater.getTranslation("Zone") }}"></div></th>