From da882a9a2447d2a0227c49f38914dfa962a95b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Thu, 18 Sep 2025 22:34:05 +0200 Subject: [PATCH] lepszy ux przyciskow --- static/js/chart_controls.js | 7 ++++--- templates/expenses.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/js/chart_controls.js b/static/js/chart_controls.js index 6214386..78e5f36 100644 --- a/static/js/chart_controls.js +++ b/static/js/chart_controls.js @@ -60,15 +60,15 @@ document.addEventListener("DOMContentLoaded", function () { // ——— Podział na kategorie ——— toggleCategory?.addEventListener("click", function () { - const active = this.classList.contains("btn-outline-primary"); + const active = this.classList.contains("btn-primary"); if (active) { - this.classList.remove("btn-outline-primary"); + this.classList.remove("btn-primary"); this.classList.add("btn-outline-light"); this.setAttribute("aria-pressed", "false"); this.textContent = "Przełącz na kategorie"; window.setCategorySplit(false); } else { - this.classList.add("btn-outline-primary"); + this.classList.add("btn-primary"); this.classList.remove("btn-outline-light"); this.setAttribute("aria-pressed", "true"); this.textContent = "Przełącz na sumy"; @@ -80,6 +80,7 @@ document.addEventListener("DOMContentLoaded", function () { reloadRespectingSplit(); }); + // ——— Własny zakres ——— customRangeBtn?.addEventListener("click", function () { const sd = startDateInput?.value; diff --git a/templates/expenses.html b/templates/expenses.html index 6cd269b..5b73442 100644 --- a/templates/expenses.html +++ b/templates/expenses.html @@ -145,7 +145,7 @@
Kategorie/Sumy wydatków
- +