0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Merge pull request #2894 from jaswilli/close-popover

Close post settings popover menu after delete post
This commit is contained in:
Hannah Wolfe 2014-06-06 10:43:02 +01:00
commit a38469e0b7
2 changed files with 3 additions and 2 deletions

View file

@ -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 () {

View file

@ -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');
}
};
};