diff --git a/project/static/project/scripts/fr-callout-read-more.js b/project/static/project/scripts/fr-callout-read-more.js deleted file mode 100644 index c6e3f5245..000000000 --- a/project/static/project/scripts/fr-callout-read-more.js +++ /dev/null @@ -1,18 +0,0 @@ -const buttons = document.querySelectorAll('.fr-callout-read-more__btn') - -buttons.forEach((button) => -{ - button.addEventListener('click', () => - { - const excerpt = button.parentNode.querySelector('.fr-callout-read-more__excerpt') - const text = button.parentNode.querySelector('.fr-callout-read-more__text') - - const expanded = button.getAttribute('aria-expanded') === 'true' - - button.parentNode.classList.toggle('fr-callout-read-more--expanded') - button.setAttribute('aria-expanded', !expanded) - excerpt.hidden = !expanded - text.hidden = expanded - button.firstChild.data = expanded ? 'Lire plus' : 'Lire moins' - }) -}) diff --git a/project/static/project/scripts/highcharts-custom-buttons.js b/project/static/project/scripts/highcharts-custom-buttons.js deleted file mode 100644 index 1ba8cb040..000000000 --- a/project/static/project/scripts/highcharts-custom-buttons.js +++ /dev/null @@ -1,33 +0,0 @@ -window.htmx.onLoad(() => -{ - // Trigger full screen chart - document.querySelectorAll('.fullscreen-chart').forEach((button) => - { - button.onclick = () => - { - const target = button.dataset.chartTarget - const chartDom = document.getElementById(target) - const chart = Highcharts.charts[Highcharts.attr(chartDom, 'data-highcharts-chart')] - - chart.fullscreen.toggle() - } - }) - - // Export chart - document.querySelectorAll('.export-chart').forEach((button) => - { - button.onclick = (e) => - { - const target = button.dataset.chartTarget - const chartDom = document.getElementById(target) - const chart = Highcharts.charts[Highcharts.attr(chartDom, 'data-highcharts-chart')] - - e.preventDefault() - - chart.exportChart({ - type: button.dataset.type, - scale: 3, - }) - } - }) -})