diff --git a/frontend/src/services/util-registry/util-registry.js b/frontend/src/services/util-registry/util-registry.js index b8dea6ec3..67cc09702 100644 --- a/frontend/src/services/util-registry/util-registry.js +++ b/frontend/src/services/util-registry/util-registry.js @@ -101,9 +101,9 @@ export class UtilRegistry { let utilsInScope = this._getUtilInstancesWithinScope(scope); utilsInScope.forEach((util) => { - //if(DEBUG_MODE > 2) { - console.log('Destroying Util: ', {util}); - //}# + if(DEBUG_MODE > 2) { + console.log('Destroying Util: ', {util}); + } let utilIndex = this._activeUtilInstancesWrapped.indexOf(util); util.destroy(); this._activeUtilInstancesWrapped.splice(utilIndex, 1); diff --git a/frontend/src/utils/alerts/alerts.js b/frontend/src/utils/alerts/alerts.js index 4f84d8aac..8f7877e68 100644 --- a/frontend/src/utils/alerts/alerts.js +++ b/frontend/src/utils/alerts/alerts.js @@ -103,9 +103,9 @@ export class Alerts { } const closeEl = alertElement.querySelector('.' + ALERT_CLOSER_CLASS); - const closeAlertEvent = new EventWrapper(EVENT_TYPE.CLICK, () => { - this._toggleAlert(alertElement).bind(this); - }, closeEl); + const closeAlertEvent = new EventWrapper(EVENT_TYPE.CLICK, (() => { + this._toggleAlert(alertElement); + }).bind(this), closeEl); this._eventManager.registerNewListener(closeAlertEvent); diff --git a/frontend/src/utils/mass-input/mass-input.js b/frontend/src/utils/mass-input/mass-input.js index 184706b4d..4969e8c14 100644 --- a/frontend/src/utils/mass-input/mass-input.js +++ b/frontend/src/utils/mass-input/mass-input.js @@ -71,7 +71,7 @@ export class MassInput { }); const submitEv = new EventWrapper(EVENT_TYPE.SUBMIT, this._massInputFormSubmitHandler.bind(this), this._massInputForm); - const keyPressEv = new EventWrapper(EVENT_TYPE.KEYDOWN, this._keypressHandler.bind(this), this.massInputForm); + const keyPressEv = new EventWrapper(EVENT_TYPE.KEYDOWN, this._keypressHandler.bind(this), this._massInputForm); this._eventManager.registerListeners([submitEv, keyPressEv]); Array.from(this._element.querySelectorAll(MASS_INPUT_ADD_CELL_SELECTOR)).forEach(this._setupChangedHandlers.bind(this)); diff --git a/frontend/src/utils/pageactions/pageactions.js b/frontend/src/utils/pageactions/pageactions.js index 870065a4e..88084636b 100644 --- a/frontend/src/utils/pageactions/pageactions.js +++ b/frontend/src/utils/pageactions/pageactions.js @@ -117,7 +117,7 @@ export class PageActionSecondaryUtil { destroy() { this._eventManager.cleanUp(); - if(this._closer && this._closer.classList.contains()) + if(this._closer && this._closer.classList.contains('pagenav-item__close-label--hidden')) this._closer.classList.remove('pagenav-item__close-label--hidden'); this._element.classList.remove(PAGEACTION_SECONDARY_INITIALIZED_CLASS); } diff --git a/frontend/src/utils/show-hide/show-hide.js b/frontend/src/utils/show-hide/show-hide.js index e7f7c3315..411cf1a7d 100644 --- a/frontend/src/utils/show-hide/show-hide.js +++ b/frontend/src/utils/show-hide/show-hide.js @@ -70,9 +70,9 @@ export class ShowHide { } destroy() { + this._storageManager.clear({ location: LOCATION.LOCAL }); this._eventManager.cleanUp(); - this._storageManager.clear(); - if(this._element.parentElement.contains(SHOW_HIDE_COLLAPSED_CLASS)) + if (this._element.parentElement.classList.contains(SHOW_HIDE_COLLAPSED_CLASS)) this._element.parentElement.classList.remove(SHOW_HIDE_COLLAPSED_CLASS); this._element.classList.remove(SHOW_HIDE_INITIALIZED_CLASS, SHOW_HIDE_TOGGLE_CLASS); } diff --git a/frontend/src/utils/tooltips/tooltips.js b/frontend/src/utils/tooltips/tooltips.js index c520af204..2a4d77e9b 100644 --- a/frontend/src/utils/tooltips/tooltips.js +++ b/frontend/src/utils/tooltips/tooltips.js @@ -59,7 +59,7 @@ export class Tooltip { const mouseOutEv = new EventWrapper(EVENT_TYPE.MOUSE_OUT, (this._leave.bind(this)).bind(this), this._element); const contentMouseOut = new EventWrapper(EVENT_TYPE.MOUSE_OUT, (this._leave.bind(this)).bind(this), this._content); const clickEv = new EventWrapper(EVENT_TYPE.CLICK, this._click.bind(this), this._element); - this.registerListeners([mouseOverEv, mouseOutEv, contentMouseOut, clickEv]); + this._eventManager.registerListeners([mouseOverEv, mouseOutEv, contentMouseOut, clickEv]); } open(persistent) {