Ghost/ghost/admin/app/controllers/settings/code-injection.js
Kevin Ansfield ee89b11a6a Refactor notifications service & components
issue #5409

- change persistent/passive notification status to alert/notification
- replace showSuccess/Info/Warn/Error with showNotification/showAlert
- fix and clean up notification/alert components
2015-07-28 12:26:11 +01:00

21 lines
546 B
JavaScript

import Ember from 'ember';
export default Ember.Controller.extend({
notifications: Ember.inject.service(),
actions: {
save: function () {
var notifications = this.get('notifications');
return this.get('model').save().then(function (model) {
notifications.closeNotifications();
return model;
}).catch(function (errors) {
notifications.closeNotifications();
notifications.showErrors(errors);
});
}
}
});