From a9c736002038b537cbced4ca59ace59af583a336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 28 Feb 2023 17:14:02 +0800 Subject: [PATCH] Renamed the variables in the #reset method of the JavaScript SummaryHelper class, for consistency. --- src/accounting/static/js/summary-helper.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/accounting/static/js/summary-helper.js b/src/accounting/static/js/summary-helper.js index 749ad5d..08e3b56 100644 --- a/src/accounting/static/js/summary-helper.js +++ b/src/accounting/static/js/summary-helper.js @@ -560,17 +560,17 @@ class SummaryHelper { input.value = ""; input.classList.remove("is-invalid"); }); - tagButtons.forEach(function (btnTag) { - btnTag.classList.remove("btn-primary"); - btnTag.classList.add("btn-outline-primary"); + tagButtons.forEach(function (button) { + button.classList.remove("btn-primary"); + button.classList.add("btn-outline-primary"); }); - directionButtons.forEach(function (btnDirection) { - if (btnDirection.classList.contains("accounting-default")) { - btnDirection.classList.remove("btn-outline-primary"); - btnDirection.classList.add("btn-primary"); + directionButtons.forEach(function (button) { + if (button.classList.contains("accounting-default")) { + button.classList.remove("btn-outline-primary"); + button.classList.add("btn-primary"); } else { - btnDirection.classList.add("btn-outline-primary"); - btnDirection.classList.remove("btn-primary"); + button.classList.add("btn-outline-primary"); + button.classList.remove("btn-primary"); } }); this.#switchToTab(this.#defaultTabId);