Skip to content

Commit 4bbeb37

Browse files
authored
Update fast-search-card.js
1 parent b0d20a1 commit 4bbeb37

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

dist/fast-search-card.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9666,6 +9666,7 @@ class FastSearchCard extends HTMLElement {
96669666

96679667

96689668

9669+
96699670
renderActiveTimers(timers, entityId) {
96709671
const container = this.shadowRoot.getElementById(`active-timers-${entityId}`);
96719672
if (!container) return;
@@ -9716,21 +9717,31 @@ class FastSearchCard extends HTMLElement {
97169717
</div>
97179718
</div>
97189719
`;
9719-
97209720
}).join('');
97219721

97229722
container.innerHTML = `
97239723
<div class="active-timers-header">Aktive Timer:</div>
97249724
<div class="active-timers-list">${timerHTML}</div>
97259725
`;
97269726

9727-
// Event Listeners für Delete Buttons
9727+
// Event Listeners für Edit Buttons (bereits vorhanden)
97289728
container.querySelectorAll('.timer-edit').forEach(btn => {
97299729
btn.addEventListener('click', () => {
97309730
const timerId = btn.dataset.timerId;
97319731
this.editTimer(timerId, entityId);
97329732
});
97339733
});
9734+
9735+
// ✅ NEU: Event Listeners für Delete Buttons hinzufügen
9736+
container.querySelectorAll('.timer-delete').forEach(btn => {
9737+
btn.addEventListener('click', () => {
9738+
const timerId = btn.dataset.timerId;
9739+
// Optional: Bestätigungsdialog
9740+
if (confirm('Timer wirklich löschen?')) {
9741+
this.deleteTimer(timerId, entityId);
9742+
}
9743+
});
9744+
});
97349745
}
97359746

97369747
async editTimer(timerId, entityId) {

0 commit comments

Comments
 (0)