mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
ee89b11a6a
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
21 lines
546 B
JavaScript
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);
|
|
});
|
|
}
|
|
}
|
|
});
|