Add delete post shortcut to content screen

Proposal :: No issue
- cmd/ctrl+backspace deletes a post on the content screen
This commit is contained in:
Matt Enlow 2014-09-16 12:02:27 -06:00
parent 411e8dc44f
commit a3bb8cb588

View File

@ -55,11 +55,15 @@ var PostsPostRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, load
},
shortcuts: {
'enter': 'openEditor'
'enter': 'openEditor',
'command+backspace, ctrl+backspace': 'deletePost'
},
actions: {
openEditor: function () {
this.transitionTo('editor.edit', this.get('controller.model'));
},
deletePost: function () {
this.send('openModal', 'delete-post', this.get('controller.model'));
}
}
});