mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
1c6216777c
Closes #3511, Closes #3512, Closes #3526 - show* methods now close existing passive notifications by default. They also now take an optional options object where existing parameters such as "delayed" and "defaultErrorText" can be passed in as well as the new "doNotClosePassive" flag. - Removed all explicit calls to notifications.closePassive except for the few places where it makes sense to call it separately.
19 lines
526 B
JavaScript
19 lines
526 B
JavaScript
var PostController = Ember.ObjectController.extend({
|
|
isPublished: Ember.computed.equal('status', 'published'),
|
|
classNameBindings: ['featured'],
|
|
|
|
actions: {
|
|
toggleFeatured: function () {
|
|
var options = {disableNProgress: true},
|
|
self = this;
|
|
|
|
this.toggleProperty('featured');
|
|
this.get('model').save(options).catch(function (errors) {
|
|
self.notifications.showErrors(errors);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default PostController;
|