mirror of
https://github.com/trevor1969/teatracker.git
synced 2026-08-09 10:41:59 +00:00
Fix: Buttons reagieren nicht auf Klicks - Event-Listener werden jetzt sofort registriert, nicht erst nach dem Laden der Daten. Entfernt onclick-Attribute aus HTML, die zu Konflikten führen können.
Co-authored-by: trevor1969 <trevor1969@users.noreply.github.com>
This commit is contained in:
8
app.js
8
app.js
@ -226,8 +226,11 @@ class TeeTracker {
|
|||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
this.initStorage();
|
this.initStorage();
|
||||||
|
this.setupEventListeners();
|
||||||
this.loadData().then(() => {
|
this.loadData().then(() => {
|
||||||
this.init();
|
this.renderAll();
|
||||||
|
this.initCharts();
|
||||||
|
this.updateSettingsStats();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +634,8 @@ class TeeTracker {
|
|||||||
// ============================================
|
// ============================================
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
this.setupEventListeners();
|
// Initialization is now handled in constructor
|
||||||
|
// This method is kept for backward compatibility
|
||||||
this.renderAll();
|
this.renderAll();
|
||||||
this.initCharts();
|
this.initCharts();
|
||||||
this.updateSettingsStats();
|
this.updateSettingsStats();
|
||||||
|
|||||||
@ -386,8 +386,8 @@
|
|||||||
<textarea id="import-data-textarea" class="modal-textarea" placeholder="{\n \"teas\": [...],\n \"entries\": [...]\n}"></textarea>
|
<textarea id="import-data-textarea" class="modal-textarea" placeholder="{\n \"teas\": [...],\n \"entries\": [...]\n}"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="import-data-btn" class="btn btn-primary" onclick="window.app.handleImportData()">📥 Importieren</button>
|
<button id="import-data-btn" class="btn btn-primary">📥 Importieren</button>
|
||||||
<button id="cancel-import-btn" class="btn btn-secondary" onclick="window.app.closeImportModal()">Abbrechen</button>
|
<button id="cancel-import-btn" class="btn btn-secondary">Abbrechen</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user