mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Close post settings popover menu after delete post
No issue -inject popover:service into modal component delete post controller so popover close can be triggered as part of the delete action -remove unnecessary 'needs' from the delete post controller
This commit is contained in:
parent
b7aca05d95
commit
4898f721ee
2 changed files with 3 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
|||
var DeletePostController = Ember.Controller.extend({
|
||||
needs: 'posts/post',
|
||||
actions: {
|
||||
confirmAccept: function () {
|
||||
var self = this;
|
||||
|
||||
this.get('model').destroyRecord().then(function () {
|
||||
self.get('popover').closePopovers();
|
||||
self.notifications.showSuccess('Your post has been deleted.');
|
||||
self.transitionToRoute('posts.index');
|
||||
}, function () {
|
||||
|
|
|
@ -21,5 +21,6 @@ export default {
|
|||
|
||||
application.inject('component:gh-popover', 'popover', 'popover:service');
|
||||
application.inject('component:gh-popover-button', 'popover', 'popover:service');
|
||||
application.inject('controller:modals.delete-post', 'popover', 'popover:service');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue