summaryrefslogtreecommitdiffstats
path: root/web/react/components/search_results_item.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-12-08 12:29:12 -0800
committer=Corey Hulen <corey@hulen.com>2015-12-08 12:29:12 -0800
commit8b29404525f036633be6b25dc18c536d2aafee02 (patch)
tree6db4158ca20f09e282ffb31a1a8e29f5473ac513 /web/react/components/search_results_item.jsx
parent59e4471a63253a1b11a2964ae3b0ee479e6667eb (diff)
downloadchat-8b29404525f036633be6b25dc18c536d2aafee02.tar.gz
chat-8b29404525f036633be6b25dc18c536d2aafee02.tar.bz2
chat-8b29404525f036633be6b25dc18c536d2aafee02.zip
PLT-1418 Adding old style replying in RHS
Diffstat (limited to 'web/react/components/search_results_item.jsx')
-rw-r--r--web/react/components/search_results_item.jsx24
1 files changed, 22 insertions, 2 deletions
diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx
index 1d4983026..7ae64f651 100644
--- a/web/react/components/search_results_item.jsx
+++ b/web/react/components/search_results_item.jsx
@@ -8,11 +8,14 @@ import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import * as utils from '../utils/utils.jsx';
import * as TextFormatting from '../utils/text_formatting.jsx';
+import Constants from '../utils/constants.jsx';
+
export default class SearchResultsItem extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
+ this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
}
handleClick(e) {
@@ -21,6 +24,12 @@ export default class SearchResultsItem extends React.Component {
EventHelpers.emitPostFocusEvent(this.props.post.id);
}
+ handleFocusRHSClick(e) {
+ e.preventDefault();
+
+ EventHelpers.emitPostFocusRightHandSideEvent(this.props.post);
+ }
+
render() {
var channelName = '';
var channel = ChannelStore.get(this.props.post.channel_id);
@@ -65,13 +74,24 @@ export default class SearchResultsItem extends React.Component {
className='search-item__jump'
onClick={this.handleClick}
>
- {<i className='fa fa-mail-reply'></i>}
+ <i className='fa fa-mail-reply'></i>
+ </a>
+ </li>
+ <li>
+ <a
+ href='#'
+ className='comment-icon__container search-item__comment'
+ onClick={this.handleFocusRHSClick}
+ >
+ <span
+ className='comment-icon'
+ dangerouslySetInnerHTML={{__html: Constants.COMMENT_ICON}}
+ />
</a>
</li>
</ul>
<div className='search-item-snippet'>
<span
- onClick={this.handleClick}
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(this.props.post.message, formattingOptions)}}
/>
</div>