Skip to content
Snippets Groups Projects
Commit 28e843ac authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#585 - disable show chart button if no chart is selected

parent 4749e1d2
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,7 @@ $(document).ready(function()
this.querySelector('.chart-preview').classList.toggle('active', true);
document.getElementsByName('chartID')[0].value = this.dataset.id;
checkShowChartButton();
});
filterChartPreviews();
......@@ -290,4 +291,15 @@ function unsetActiveChartPreview()
{
allChartPreviews[i].classList.toggle('active', false);
}
document.getElementsByName('chartID')[0].value = '';
checkShowChartButton();
}
function checkShowChartButton()
{
let buttonShowChart = document.getElementsByName('buttonSave')[0];
let selectedChartID = document.getElementsByName('chartID')[0].value;
buttonShowChart.disabled = selectedChartID === '';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment