mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
7e2e8b3376
closes #3057 - add Notification model - update injected Notifications object to handle persistent notifications - load server notifications on setup if logged in otherwise on successful sign-in - changed all existing notifications.closeAll calls to closePassive - fixed dismissable/dismissible spelling in server API & tests - add notifications.closeNotification method so DELETE calls can be made for server-originating notifications
21 lines
599 B
JavaScript
21 lines
599 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.closeNotification(self.get('message'));
|
|
}
|
|
}
|
|
});
|
|
|
|
export default NotificationComponent;
|