Renamed the "number" tab plane to "annotation".

This commit is contained in:
依瑪貓 2023-03-03 23:55:02 +08:00
parent c849d6b3d4
commit b5aaee4d15
2 changed files with 18 additions and 18 deletions

View File

@ -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";
};
/**

View File

@ -55,8 +55,8 @@ First written: 2023/2/28
</span>
</li>
<li class="nav-item">
<span id="accounting-summary-editor-{{ summary_editor.type }}-number-tab" class="nav-link accounting-clickable accounting-summary-editor-{{ summary_editor.type }}-tab" aria-current="false" data-tab-id="number">
{{ A_("Number") }}
<span id="accounting-summary-editor-{{ summary_editor.type }}-annotation-tab" class="nav-link accounting-clickable accounting-summary-editor-{{ summary_editor.type }}-tab" aria-current="false" data-tab-id="annotation">
{{ A_("Annotation") }}
</span>
</li>
</ul>
@ -153,18 +153,18 @@ First written: 2023/2/28
{# TODO: To be done #}
</div>
{# The number of items #}
<div id="accounting-summary-editor-{{ summary_editor.type }}-number-page" class="accounting-summary-editor-{{ summary_editor.type }}-page d-none" aria-current="false" aria-labelledby="accounting-summary-editor-{{ summary_editor.type }}-tab-number" data-tab-id="number">
{# The annotation #}
<div id="accounting-summary-editor-{{ summary_editor.type }}-annotation-page" class="accounting-summary-editor-{{ summary_editor.type }}-page d-none" aria-current="false" aria-labelledby="accounting-summary-editor-{{ summary_editor.type }}-tab-annotation" data-tab-id="annotation">
<div class="form-floating">
<input id="accounting-summary-editor-{{ summary_editor.type }}-number-number" class="form-control" type="number" min="1" value="" placeholder=" ">
<label class="form-label" for="accounting-summary-editor-{{ summary_editor.type }}-number-number">{{ A_("The number of items") }}</label>
<div id="accounting-summary-editor-{{ summary_editor.type }}-number-number-error" class="invalid-feedback"></div>
<input id="accounting-summary-editor-{{ summary_editor.type }}-annotation-number" class="form-control" type="number" min="1" value="" placeholder=" ">
<label class="form-label" for="accounting-summary-editor-{{ summary_editor.type }}-annotation-number">{{ A_("The number of items") }}</label>
<div id="accounting-summary-editor-{{ summary_editor.type }}-annotation-number-error" class="invalid-feedback"></div>
</div>
<div class="form-floating mt-2">
<input id="accounting-summary-editor-{{ summary_editor.type }}-number-note" class="form-control" type="text" value="" placeholder=" ">
<label class="form-label" for="accounting-summary-editor-{{ summary_editor.type }}-number-note">{{ A_("Note") }}</label>
<div id="accounting-summary-editor-{{ summary_editor.type }}-number-note-error" class="invalid-feedback"></div>
<input id="accounting-summary-editor-{{ summary_editor.type }}-annotation-note" class="form-control" type="text" value="" placeholder=" ">
<label class="form-label" for="accounting-summary-editor-{{ summary_editor.type }}-annotation-note">{{ A_("Note") }}</label>
<div id="accounting-summary-editor-{{ summary_editor.type }}-annotation-note-error" class="invalid-feedback"></div>
</div>
</div>