summaryrefslogtreecommitdiffstats
path: root/web/react/components/rhs_root_post.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2016-02-09 13:16:16 -0800
committerReed Garmsen <rgarmsen2295@gmail.com>2016-02-12 13:06:45 -0800
commit081d5c22c795939a2b555fabf9daf42933e6ae99 (patch)
treeb22970ce5630b32b9ffc000fac12c1cdcffb3106 /web/react/components/rhs_root_post.jsx
parent45dfd516aab37c1c336ac3410ee8db0d7c56d65a (diff)
downloadchat-081d5c22c795939a2b555fabf9daf42933e6ae99.tar.gz
chat-081d5c22c795939a2b555fabf9daf42933e6ae99.tar.bz2
chat-081d5c22c795939a2b555fabf9daf42933e6ae99.zip
Added permalink feature to posts in the RHS
Diffstat (limited to 'web/react/components/rhs_root_post.jsx')
-rw-r--r--web/react/components/rhs_root_post.jsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx
index f9f7f8f81..54f2e8262 100644
--- a/web/react/components/rhs_root_post.jsx
+++ b/web/react/components/rhs_root_post.jsx
@@ -21,6 +21,7 @@ export default class RhsRootPost extends React.Component {
super(props);
this.parseEmojis = this.parseEmojis.bind(this);
+ this.handlePermalink = this.handlePermalink.bind(this);
this.state = {};
}
@@ -31,6 +32,10 @@ export default class RhsRootPost extends React.Component {
folder: Emoji.getImagePathForEmoticon()
});
}
+ handlePermalink(e) {
+ e.preventDefault();
+ EventHelpers.showGetPostLinkModal(this.props.post);
+ }
componentDidMount() {
this.parseEmojis();
}
@@ -83,6 +88,23 @@ export default class RhsRootPost extends React.Component {
var dropdownContents = [];
+ dropdownContents.push(
+ <li
+ key='rhs-root-permalink'
+ role='presentation'
+ >
+ <a
+ href='#'
+ onClick={this.handlePermalink}
+ >
+ <FormattedMessage
+ id='rhs_root.permalink'
+ defaultMessage='Permalink'
+ />
+ </a>
+ </li>
+ );
+
if (isOwner) {
dropdownContents.push(
<li