From b5aaee4d15a7e2822f4b10729a83ae2457178d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 3 Mar 2023 23:55:02 +0800 Subject: [PATCH] Renamed the "number" tab plane to "annotation". --- src/accounting/static/js/summary-editor.js | 16 +++++++-------- .../include/summary-editor-modal.html | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/accounting/static/js/summary-editor.js b/src/accounting/static/js/summary-editor.js index b60eac1..3596ec3 100644 --- a/src/accounting/static/js/summary-editor.js +++ b/src/accounting/static/js/summary-editor.js @@ -126,11 +126,11 @@ class SummaryEditor { * The tab plane classes * @type {typeof TabPlane[]} */ - #TAB_CLASES = [GeneralTagTab, GeneralTripTab, BusTripTab, RegularPaymentTab, NumberTab] + #TAB_CLASES = [GeneralTagTab, GeneralTripTab, BusTripTab, RegularPaymentTab, AnnotationTab] /** * The tab planes - * @type {{general: GeneralTagTab, travel: GeneralTripTab, bus: BusTripTab, regular: RegularPaymentTab, number: NumberTab}} + * @type {{general: GeneralTagTab, travel: GeneralTripTab, bus: BusTripTab, regular: RegularPaymentTab, annotation: AnnotationTab}} */ tabPlanes = {}; @@ -145,8 +145,8 @@ class SummaryEditor { this.prefix = "accounting-summary-editor-" + form.dataset.entryType; this.#modal = document.getElementById(this.prefix + "-modal"); this.summary = document.getElementById(this.prefix + "-summary"); - this.number = document.getElementById(this.prefix + "-number-number"); - this.note = document.getElementById(this.prefix + "-number-note"); + this.number = document.getElementById(this.prefix + "-annotation-number"); + this.note = document.getElementById(this.prefix + "-annotation-note"); // noinspection JSValidateTypes this.#accountButtons = Array.from(document.getElementsByClassName(this.prefix + "-account")); @@ -186,7 +186,7 @@ class SummaryEditor { break; } } - this.tabPlanes.number.populate(); + this.tabPlanes.annotation.populate(); } /** @@ -1102,11 +1102,11 @@ class RegularPaymentTab extends TabPlane { } /** - * The number tab plane. + * The annotation tab plane. * * @private */ -class NumberTab extends TabPlane { +class AnnotationTab extends TabPlane { /** * Constructs a tab plane. @@ -1133,7 +1133,7 @@ class NumberTab extends TabPlane { * @abstract */ tabId() { - return "number"; + return "annotation"; }; /** diff --git a/src/accounting/templates/accounting/transaction/include/summary-editor-modal.html b/src/accounting/templates/accounting/transaction/include/summary-editor-modal.html index 5e4b691..0d19456 100644 --- a/src/accounting/templates/accounting/transaction/include/summary-editor-modal.html +++ b/src/accounting/templates/accounting/transaction/include/summary-editor-modal.html @@ -55,8 +55,8 @@ First written: 2023/2/28 @@ -153,18 +153,18 @@ First written: 2023/2/28 {# TODO: To be done #} - {# The number of items #} -
+ {# The annotation #} +
- - -
+ + +
- - -
+ + +