FIX: Bookmark by keyboard was broken
This commit is contained in:
parent
363cf5c5da
commit
cd412976d7
|
@ -222,10 +222,14 @@ export default {
|
|||
// TODO: We should keep track of the post without a CSS class
|
||||
const selectedPostId = parseInt($('.topic-post.selected article.boxed').data('post-id'), 10);
|
||||
if (selectedPostId) {
|
||||
const topicController = container.lookup('controller:topic'),
|
||||
post = topicController.get('model.postStream.posts').findBy('id', selectedPostId);
|
||||
const topicController = container.lookup('controller:topic');
|
||||
const post = topicController.get('model.postStream.posts').findBy('id', selectedPostId);
|
||||
if (post) {
|
||||
topicController.send(action, post);
|
||||
// TODO: Use ember closure actions
|
||||
const result = topicController._actions[action].call(topicController, post);
|
||||
if (result && result.then) {
|
||||
this.appEvents.trigger('post-stream:refresh', selectedPostId)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -170,6 +170,7 @@ export default class Widget {
|
|||
}
|
||||
|
||||
if (target) {
|
||||
// TODO: Use ember closure actions
|
||||
const actions = target._actions || target.actionHooks;
|
||||
const method = actions[actionName];
|
||||
if (method) {
|
||||
|
|
Loading…
Reference in New Issue