From 7f82bc82512d72b9462f4eec5e11ce2307e52e8c Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 6 Aug 2015 13:16:53 +0930 Subject: [PATCH] Make some changes to facilitate updates to mentions extension --- framework/core/js/forum/src/components/PostPreview.js | 2 +- framework/core/js/forum/src/components/PostStream.js | 1 + framework/core/src/Api/Actions/Posts/ShowAction.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/core/js/forum/src/components/PostPreview.js b/framework/core/js/forum/src/components/PostPreview.js index cbd69f74b..055db98b2 100644 --- a/framework/core/js/forum/src/components/PostPreview.js +++ b/framework/core/js/forum/src/components/PostPreview.js @@ -16,7 +16,7 @@ export default class PostPreview extends Component { view() { const post = this.props.post; const user = post.user(); - const excerpt = highlight(post.contentPlain(), this.props.highlight, 200); + const excerpt = highlight(post.contentPlain(), this.props.highlight, 300); return ( diff --git a/framework/core/js/forum/src/components/PostStream.js b/framework/core/js/forum/src/components/PostStream.js index c08a5a4ab..336d38cd8 100644 --- a/framework/core/js/forum/src/components/PostStream.js +++ b/framework/core/js/forum/src/components/PostStream.js @@ -211,6 +211,7 @@ class PostStream extends mixin(Component, evented) { attrs.config = fadeIn; attrs['data-time'] = time.toISOString(); attrs['data-number'] = post.number(); + attrs['data-id'] = post.id(); // If the post before this one was more than 4 hours ago, we will // display a 'time gap' indicating how long it has been in between diff --git a/framework/core/src/Api/Actions/Posts/ShowAction.php b/framework/core/src/Api/Actions/Posts/ShowAction.php index e2fd92eff..b2ef190a8 100644 --- a/framework/core/src/Api/Actions/Posts/ShowAction.php +++ b/framework/core/src/Api/Actions/Posts/ShowAction.php @@ -26,7 +26,7 @@ class ShowAction extends SerializeResourceAction 'user.groups' => true, 'editUser' => true, 'hideUser' => true, - 'discussion' => false + 'discussion' => true ]; /**