1
0
Fork 0

sched: separate on/off button from delete

master
Rob Pilling 2023-05-29 14:18:01 +01:00
parent 4d01587c10
commit 81e810bcd7
1 changed files with 7 additions and 3 deletions

View File

@ -161,8 +161,8 @@ function renderAlarm(alarm, exists) {
tdSummary.appendChild(inputSummary); tdSummary.appendChild(inputSummary);
inputSummary.onchange(); inputSummary.onchange();
const tdInfo = document.createElement('td'); const tdOptions = document.createElement('td');
tr.appendChild(tdInfo); tr.appendChild(tdOptions);
const onOffCheck = document.createElement('input'); const onOffCheck = document.createElement('input');
onOffCheck.type = 'checkbox'; onOffCheck.type = 'checkbox';
@ -176,7 +176,10 @@ function renderAlarm(alarm, exists) {
onOff.classList.add('form-switch'); onOff.classList.add('form-switch');
onOff.appendChild(onOffCheck); onOff.appendChild(onOffCheck);
onOff.appendChild(onOffIcon); onOff.appendChild(onOffIcon);
tdInfo.appendChild(onOff); tdOptions.appendChild(onOff);
const tdInfo = document.createElement('td');
tr.appendChild(tdInfo);
const buttonDelete = document.createElement('button'); const buttonDelete = document.createElement('button');
buttonDelete.classList.add('btn'); buttonDelete.classList.add('btn');
@ -299,6 +302,7 @@ function onInit() {
<th>Date/Time</th> <th>Date/Time</th>
<th>Summary</th> <th>Summary</th>
<th></th> <th></th>
<th></th>
</tr> </tr>
</thead> </thead>
<tbody id="events"> <tbody id="events">