diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-02-09 13:16:16 -0800 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2016-02-12 13:06:45 -0800 |
commit | 081d5c22c795939a2b555fabf9daf42933e6ae99 (patch) | |
tree | b22970ce5630b32b9ffc000fac12c1cdcffb3106 /web/react/components/rhs_comment.jsx | |
parent | 45dfd516aab37c1c336ac3410ee8db0d7c56d65a (diff) | |
download | chat-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_comment.jsx')
-rw-r--r-- | web/react/components/rhs_comment.jsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index 9c85e9940..0d15c8599 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -31,6 +31,7 @@ class RhsComment extends React.Component { this.retryComment = this.retryComment.bind(this); this.parseEmojis = this.parseEmojis.bind(this); + this.handlePermalink = this.handlePermalink.bind(this); this.state = {}; } @@ -67,6 +68,10 @@ class RhsComment extends React.Component { parseEmojis() { twemoji.parse(ReactDOM.findDOMNode(this), {size: Constants.EMOJI_SIZE}); } + handlePermalink(e) { + e.preventDefault(); + EventHelpers.showGetPostLinkModal(this.props.post); + } componentDidMount() { this.parseEmojis(); } @@ -92,6 +97,23 @@ class RhsComment extends React.Component { var dropdownContents = []; + dropdownContents.push( + <li + key='rhs-root-permalink' + role='presentation' + > + <a + href='#' + onClick={this.handlePermalink} + > + <FormattedMessage + id='rhs_comment.permalink' + defaultMessage='Permalink' + /> + </a> + </li> + ); + if (isOwner) { dropdownContents.push( <li |