diff --git a/src/static/dashboard.html b/src/static/dashboard.html index 13e7bad..775117d 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -647,7 +647,7 @@ - + diff --git a/src/static/js/app.js b/src/static/js/app.js index d59ee90..a9e5b56 100644 --- a/src/static/js/app.js +++ b/src/static/js/app.js @@ -1298,7 +1298,8 @@ const App = { if (win && win.start === b.start && win.end === b.end) cls.push('active'); const tip = `${b.label}: ${b.articles} Meldung${b.articles === 1 ? '' : 'en'}` + (b.snapshots > 0 ? ` + ${b.snapshots} Lagebericht${b.snapshots === 1 ? '' : 'e'}` : ''); - html += `
`; + // data-Attribute statt JSON-String im onclick-Inline (vermeidet Quote-Konflikte bei Labels mit Komma/Anführungszeichen) + html += ``; }); html += ''; @@ -1355,6 +1356,17 @@ const App = { this.rerenderTimeline(); }, + /** Robuster Click-Handler fuer Heatmap-Cells (vermeidet Quote-Konflikte). */ + handleStripClick(el) { + if (!el) return; + const start = parseInt(el.dataset.start, 10); + const end = parseInt(el.dataset.end, 10); + const label = el.dataset.label || ''; + if (!isNaN(start) && !isNaN(end)) { + this.openTimelineWindow(start, end, label); + } + }, + /** Klick auf Heatmap-Balken: Stream auf dieses Zeitfenster filtern. * Zweiter Klick auf denselben Balken hebt den Filter auf. */