0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/components/ghost-notification.js
Fabian Becker a4f8088697 Implement Notifications for Ember
closes #2417
- Adds Notification(s)Component
- Render notifications in application.hbs
- Adds handleError in application route
2014-04-09 00:36:15 +00:00

21 lines
No EOL
593 B
JavaScript

var NotificationComponent = Ember.Component.extend({
classNames: ['js-bb-notification'],
didInsertElement: function () {
var self = this;
self.$().on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', function (event) {
/* jshint unused: false */
self.notifications.removeObject(self.get('message'));
});
},
actions: {
closeNotification: function () {
var self = this;
self.notifications.removeObject(self.get('message'));
}
}
});
export default NotificationComponent;