From 081d5c22c795939a2b555fabf9daf42933e6ae99 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Tue, 9 Feb 2016 13:16:16 -0800 Subject: Added permalink feature to posts in the RHS --- web/react/components/post_info.jsx | 3 ++- web/react/components/rhs_comment.jsx | 22 ++++++++++++++++++++++ web/react/components/rhs_root_post.jsx | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) (limited to 'web/react') diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index 6d82423d5..c44223b1f 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -144,7 +144,8 @@ export default class PostInfo extends React.Component { ); } - handlePermalink() { + handlePermalink(e) { + e.preventDefault(); EventHelpers.showGetPostLinkModal(this.props.post); } 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( +
  • + + + +
  • + ); + if (isOwner) { dropdownContents.push(
  • + + + +
  • + ); + if (isOwner) { dropdownContents.push(