From 2013f8cbd96a969f6ae6ebffad1986c3de1f6b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 13 Mar 2023 17:51:51 +0800 Subject: [PATCH] Removed the initializeNewJournalEntry method from the JavaScript SummaryEditor. It does not do meaningful things at all. --- src/accounting/static/js/summary-editor.js | 9 --------- src/accounting/static/js/transaction-form.js | 1 - 2 files changed, 10 deletions(-) diff --git a/src/accounting/static/js/summary-editor.js b/src/accounting/static/js/summary-editor.js index a2cb5e5..7d7f4be 100644 --- a/src/accounting/static/js/summary-editor.js +++ b/src/accounting/static/js/summary-editor.js @@ -299,15 +299,6 @@ class SummaryEditor { } formSummaryControl.onclick = () => this.#editors[entryForm.dataset.entryType].#onOpen() } - - /** - * Initializes the summary editor for a new journal entry. - * - * @param entryType {string} the entry type, either "debit" or "credit" - */ - static initializeNewJournalEntry(entryType) { - this.#editors[entryType].#onOpen(); - } } /** diff --git a/src/accounting/static/js/transaction-form.js b/src/accounting/static/js/transaction-form.js index 258746d..63c7df3 100644 --- a/src/accounting/static/js/transaction-form.js +++ b/src/accounting/static/js/transaction-form.js @@ -481,7 +481,6 @@ class DebitCreditSideSubForm { this.#addEntryButton.onclick = () => { JournalEntryEditor.addNew(this); AccountSelector.initializeJournalEntryForm(); - SummaryEditor.initializeNewJournalEntry(entryType); }; this.#resetDeleteJournalEntryButtons(); this.#initializeDragAndDropReordering();