fix: Use window.app for onclick handlers on dynamically generated buttons

- Revert to onclick handlers for tea card edit/delete buttons
- Use window.app instead of app to ensure global accessibility
- Remove event delegation code that wasn't working
- Add onclick handlers to import modal buttons in HTML
- This ensures buttons work reliably on dynamically generated content

Co-authored-by: trevor1969 <trevor1969@users.noreply.github.com>
This commit is contained in:
Vibe Nuage Agent
2026-06-04 14:55:32 +00:00
parent b3c1041792
commit 58e2a70201
2 changed files with 13 additions and 71 deletions

View File

@ -327,8 +327,8 @@
<textarea id="import-data-textarea" class="modal-textarea" placeholder="{\n \"teas\": [...],\n \"entries\": [...]\n}"></textarea>
</div>
<div class="modal-footer">
<button id="import-data-btn" class="btn btn-primary" onclick="app.handleImportData()">📥 Importieren</button>
<button id="cancel-import-btn" class="btn btn-secondary" onclick="app.closeImportModal()">Abbrechen</button>
<button id="import-data-btn" class="btn btn-primary" onclick="window.app.handleImportData()">📥 Importieren</button>
<button id="cancel-import-btn" class="btn btn-secondary" onclick="window.app.closeImportModal()">Abbrechen</button>
</div>
</div>
</div>