X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ab07f7df6cc4b60768d385064a970d05db8234eb..refs/pull/752/head:/resources/assets/js/components/notification.js diff --git a/resources/assets/js/components/notification.js b/resources/assets/js/components/notification.js index 1a9819702..c352a9c85 100644 --- a/resources/assets/js/components/notification.js +++ b/resources/assets/js/components/notification.js @@ -6,7 +6,7 @@ class Notification { this.type = elem.getAttribute('notification'); this.textElem = elem.querySelector('span'); this.autohide = this.elem.hasAttribute('data-autohide'); - window.Events.listen(this.type, text => { + window.$events.listen(this.type, text => { this.show(text); }); elem.addEventListener('click', this.hide.bind(this)); @@ -18,7 +18,7 @@ class Notification { show(textToShow = '') { this.elem.removeEventListener('transitionend', this.hideCleanup); this.textElem.textContent = textToShow; - this.elem.style.display = 'block'; + this.elem.style.display = 'grid'; setTimeout(() => { this.elem.classList.add('showing'); }, 1);