diff --git a/frontend/src/lib/event-manager/event-manager.js b/frontend/src/lib/event-manager/event-manager.js index a69965a6f..851e74eeb 100644 --- a/frontend/src/lib/event-manager/event-manager.js +++ b/frontend/src/lib/event-manager/event-manager.js @@ -63,10 +63,10 @@ export class EventManager { - _debugLog() {} - //_debugLog(fName, ...args) { - // console.log(`[DEBUGLOG] EventManager.${fName}`, { args: args, instance: this }); - //} + //_debugLog() {} + _debugLog(fName, ...args) { + console.log(`[DEBUGLOG] EventManager.${fName}`, { args: args, instance: this }); + } } export class EventWrapper { diff --git a/frontend/src/utils/alerts/alerts.js b/frontend/src/utils/alerts/alerts.js index bf29445eb..a88fd1f19 100644 --- a/frontend/src/utils/alerts/alerts.js +++ b/frontend/src/utils/alerts/alerts.js @@ -69,7 +69,7 @@ export class Alerts { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); this._app.httpClient.removeResponseInterceptor(this._boundResponseInterceptor); if(this._alertElements) { diff --git a/frontend/src/utils/asidenav/asidenav.js b/frontend/src/utils/asidenav/asidenav.js index 560183e8c..324fc3fd8 100644 --- a/frontend/src/utils/asidenav/asidenav.js +++ b/frontend/src/utils/asidenav/asidenav.js @@ -40,7 +40,7 @@ export class Asidenav { destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); if(this._element.classList.contains(ASIDENAV_INITIALIZED_CLASS)) this._element.classList.remove(ASIDENAV_INITIALIZED_CLASS); diff --git a/frontend/src/utils/async-form/async-form.js b/frontend/src/utils/async-form/async-form.js index 1365150c6..482cdb634 100644 --- a/frontend/src/utils/async-form/async-form.js +++ b/frontend/src/utils/async-form/async-form.js @@ -44,7 +44,7 @@ export class AsyncForm { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); if(this._element.classList.contains(ASYNC_FORM_INITIALIZED_CLASS)) this._element.classList.remove(ASYNC_FORM_INITIALIZED_CLASS); diff --git a/frontend/src/utils/async-table/async-table.js b/frontend/src/utils/async-table/async-table.js index 28c4abb00..6ddf4536a 100644 --- a/frontend/src/utils/async-table/async-table.js +++ b/frontend/src/utils/async-table/async-table.js @@ -150,7 +150,7 @@ export class AsyncTable { destroy() { this._windowStorage.clear(this._windowStorage._options); - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); this._active = false; if (this._element.classList.contains(ASYNC_TABLE_INITIALIZED_CLASS)) this._element.classList.remove(ASYNC_TABLE_INITIALIZED_CLASS); diff --git a/frontend/src/utils/check-all/check-all.js b/frontend/src/utils/check-all/check-all.js index 7d051cddd..79558a75f 100644 --- a/frontend/src/utils/check-all/check-all.js +++ b/frontend/src/utils/check-all/check-all.js @@ -48,7 +48,7 @@ export class CheckAll { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); this._checkAllColumns.forEach((column) => { if (column._checkAllCheckBox !== undefined) column._checkAllCheckBox.remove(); diff --git a/frontend/src/utils/course-teaser/course-teaser.js b/frontend/src/utils/course-teaser/course-teaser.js index 95a49faee..31d8cf225 100644 --- a/frontend/src/utils/course-teaser/course-teaser.js +++ b/frontend/src/utils/course-teaser/course-teaser.js @@ -30,7 +30,7 @@ export class CourseTeaser { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); if(this._element.classList.contains(COURSE_TEASER_EXPANDED_CLASS)) { this._element.classList.remove(COURSE_TEASER_EXPANDED_CLASS); } diff --git a/frontend/src/utils/exam-correct/exam-correct.js b/frontend/src/utils/exam-correct/exam-correct.js index c88ce2d6b..f078f9825 100644 --- a/frontend/src/utils/exam-correct/exam-correct.js +++ b/frontend/src/utils/exam-correct/exam-correct.js @@ -172,7 +172,7 @@ export class ExamCorrect { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); } _updatePartDeleteDisabled(deleteBox) { diff --git a/frontend/src/utils/form/auto-submit-input.js b/frontend/src/utils/form/auto-submit-input.js index 8ec7e869e..291a1d3aa 100644 --- a/frontend/src/utils/form/auto-submit-input.js +++ b/frontend/src/utils/form/auto-submit-input.js @@ -45,7 +45,7 @@ export class AutoSubmitInput { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); if(this._element.classList.contains(AUTO_SUBMIT_INPUT_INITIALIZED_CLASS)) this._element.classList.remove(AUTO_SUBMIT_INPUT_INITIALIZED_CLASS); } diff --git a/frontend/src/utils/form/communication-recipients.js b/frontend/src/utils/form/communication-recipients.js index dc04f17cc..b6d754e09 100644 --- a/frontend/src/utils/form/communication-recipients.js +++ b/frontend/src/utils/form/communication-recipients.js @@ -44,8 +44,7 @@ export class CommunicationRecipients { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); - this._eventManager.removeAllObserversFromUtil(); + this._eventManager.cleanUp(); this._removeCheckedCounter(); } diff --git a/frontend/src/utils/form/datepicker.js b/frontend/src/utils/form/datepicker.js index 7a8abe3ad..c6273c07b 100644 --- a/frontend/src/utils/form/datepicker.js +++ b/frontend/src/utils/form/datepicker.js @@ -243,7 +243,7 @@ export class Datepicker { destroy() { this.datepickerInstance.remove(); - this._eventManager.removeAllListenersFromUtil(); + this._eventManager.cleanUp(); this._element.classList.remove(DATEPICKER_INITIALIZED_CLASS); } diff --git a/frontend/src/utils/form/enter-is-tab.js b/frontend/src/utils/form/enter-is-tab.js index 0a3073b9e..b3097d50d 100644 --- a/frontend/src/utils/form/enter-is-tab.js +++ b/frontend/src/utils/form/enter-is-tab.js @@ -56,7 +56,7 @@ export class EnterIsTab { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); if(this._element.classList.contains(ENTER_IS_TAB_INITIALIZED_CLASS)) this._element.classList.remove(ENTER_IS_TAB_INITIALIZED_CLASS); } diff --git a/frontend/src/utils/form/form-error-remover.js b/frontend/src/utils/form/form-error-remover.js index 5fc1f90c0..f05e96fae 100644 --- a/frontend/src/utils/form/form-error-remover.js +++ b/frontend/src/utils/form/form-error-remover.js @@ -49,7 +49,7 @@ export class FormErrorRemover { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); this._element.classList.remove(FORM_ERROR_REMOVER_INITIALIZED_CLASS); } diff --git a/frontend/src/utils/form/form-error-reporter.js b/frontend/src/utils/form/form-error-reporter.js index 8ebd14d5f..ed3012b26 100644 --- a/frontend/src/utils/form/form-error-reporter.js +++ b/frontend/src/utils/form/form-error-reporter.js @@ -38,7 +38,7 @@ export class FormErrorReporter { } destroy() { - this._eventManager.removeAllEventListenersFromUtil(); + this._eventManager.cleanUp(); this._removeError();