fix: fixed a few minor issues

This commit is contained in:
Johannes Eder 2021-07-29 16:51:40 +02:00 committed by Sarah Vaupel
parent 01d9ce3980
commit 6320cd927a
6 changed files with 11 additions and 11 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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));

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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) {