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:
commit
a38469e0b7
2 changed files with 3 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
||||||
var DeletePostController = Ember.Controller.extend({
|
var DeletePostController = Ember.Controller.extend({
|
||||||
needs: 'posts/post',
|
|
||||||
actions: {
|
actions: {
|
||||||
confirmAccept: function () {
|
confirmAccept: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.get('model').destroyRecord().then(function () {
|
this.get('model').destroyRecord().then(function () {
|
||||||
|
self.get('popover').closePopovers();
|
||||||
self.notifications.showSuccess('Your post has been deleted.');
|
self.notifications.showSuccess('Your post has been deleted.');
|
||||||
self.transitionToRoute('posts.index');
|
self.transitionToRoute('posts.index');
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
|
@ -21,5 +21,6 @@ export default {
|
||||||
|
|
||||||
application.inject('component:gh-popover', 'popover', 'popover:service');
|
application.inject('component:gh-popover', 'popover', 'popover:service');
|
||||||
application.inject('component:gh-popover-button', '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