refactor: move chart builder button event handling to Alpine, rename chart builder initialization, and improve new snippet creation.

This commit is contained in:
2025-12-09 23:18:57 +02:00
parent f13793031f
commit 00ccdd27d5
3 changed files with 21 additions and 23 deletions

View File

@@ -247,15 +247,7 @@ document.addEventListener('DOMContentLoaded', function () {
refreshMetadataBtn.addEventListener('click', refreshDatasetMetadata);
}
// Build chart from dataset button
const buildChartBtn = document.getElementById('build-chart-btn');
if (buildChartBtn) {
buildChartBtn.addEventListener('click', async () => {
if (Alpine.store('datasets').currentDatasetId) {
openChartBuilder(Alpine.store('datasets').currentDatasetId);
}
});
}
// Build chart from dataset button - now handled by Alpine @click in HTML
// New snippet from dataset button
const newSnippetBtn = document.getElementById('new-snippet-btn');