From 5dccf99a55736c1fe0007c9b38d4e5ce8e07d77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 21 Mar 2023 17:43:38 +0800 Subject: [PATCH] Renamed "regular" to "recurring" in the description editor. --- .../static/js/description-editor.js | 22 +++++++++---------- .../include/description-editor-modal.html | 8 +++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/accounting/static/js/description-editor.js b/src/accounting/static/js/description-editor.js index fe815b2..acec5ff 100644 --- a/src/accounting/static/js/description-editor.js +++ b/src/accounting/static/js/description-editor.js @@ -102,7 +102,7 @@ class DescriptionEditor { /** * The tab planes - * @type {{general: GeneralTagTab, travel: GeneralTripTab, bus: BusTripTab, regular: RegularPaymentTab, annotation: AnnotationTab}} + * @type {{general: GeneralTagTab, travel: GeneralTripTab, bus: BusTripTab, recurring: RecurringTransactionTab, annotation: AnnotationTab}} */ tabPlanes = {}; @@ -125,7 +125,7 @@ class DescriptionEditor { // noinspection JSValidateTypes this.#accountButtons = Array.from(document.getElementsByClassName(this.prefix + "-account")); - for (const cls of [GeneralTagTab, GeneralTripTab, BusTripTab, RegularPaymentTab, AnnotationTab]) { + for (const cls of [GeneralTagTab, GeneralTripTab, BusTripTab, RecurringTransactionTab, AnnotationTab]) { const tab = new cls(this); this.tabPlanes[tab.tabId()] = tab; } @@ -985,17 +985,17 @@ class BusTripTab extends TagTabPlane { } /** - * The regular payment tab plane. + * The recurring transaction tab plane. * * @private */ -class RegularPaymentTab extends TabPlane { +class RecurringTransactionTab extends TabPlane { /** - * The payment buttons + * The transaction buttons * @type {HTMLButtonElement[]} */ - #payments; + #transactions; // noinspection JSValidateTypes /** @@ -1007,7 +1007,7 @@ class RegularPaymentTab extends TabPlane { constructor(editor) { super(editor); // noinspection JSValidateTypes - this.#payments = Array.from(document.getElementsByClassName(this.prefix + "-payment")); + this.#transactions = Array.from(document.getElementsByClassName(this.prefix + "-transaction")); } /** @@ -1017,7 +1017,7 @@ class RegularPaymentTab extends TabPlane { * @abstract */ tabId() { - return "regular"; + return "recurring"; }; /** @@ -1026,9 +1026,9 @@ class RegularPaymentTab extends TabPlane { * @override */ reset() { - for (const payment of this.#payments) { - payment.classList.remove("btn-primary"); - payment.classList.add("btn-outline-primary"); + for (const transaction of this.#transactions) { + transaction.classList.remove("btn-primary"); + transaction.classList.add("btn-outline-primary"); } } diff --git a/src/accounting/templates/accounting/journal-entry/include/description-editor-modal.html b/src/accounting/templates/accounting/journal-entry/include/description-editor-modal.html index b874331..4a58832 100644 --- a/src/accounting/templates/accounting/journal-entry/include/description-editor-modal.html +++ b/src/accounting/templates/accounting/journal-entry/include/description-editor-modal.html @@ -55,8 +55,8 @@ First written: 2023/2/28