Remove jquery from NotificationController.js

This commit is contained in:
Julian Descottes 2018-04-08 16:11:12 +02:00
parent b9cc2eb4f8
commit 5c4cbbbba1

View File

@ -7,8 +7,8 @@
* @public * @public
*/ */
ns.NotificationController.prototype.init = function() { ns.NotificationController.prototype.init = function() {
$.subscribe(Events.SHOW_NOTIFICATION, $.proxy(this.displayMessage_, this)); $.subscribe(Events.SHOW_NOTIFICATION, this.displayMessage_.bind(this));
$.subscribe(Events.HIDE_NOTIFICATION, $.proxy(this.removeMessage_, this)); $.subscribe(Events.HIDE_NOTIFICATION, this.removeMessage_.bind(this));
}; };
/** /**
@ -35,9 +35,9 @@
* @private * @private
*/ */
ns.NotificationController.prototype.removeMessage_ = function (evt) { ns.NotificationController.prototype.removeMessage_ = function (evt) {
var message = $('#user-message'); var message = document.querySelector('#user-message');
if (message.length) { if (message) {
message.remove(); message.parentNode.removeChild(message);
} }
}; };
})(); })();