diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-12-09 09:35:28 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-12-09 09:35:28 -0500 |
commit | 3daa830ab1054d18d730b21ea89977a2d7a467c8 (patch) | |
tree | ea60f193b460f361703d47c3ff4bb01031a5d4dc /web/react/components/search_results_item.jsx | |
parent | 34cf264a08890f494144bd11663770b191bae9ef (diff) | |
parent | 69ecfe4cb1763b10f1690b543ee1828aed94aefa (diff) | |
download | chat-3daa830ab1054d18d730b21ea89977a2d7a467c8.tar.gz chat-3daa830ab1054d18d730b21ea89977a2d7a467c8.tar.bz2 chat-3daa830ab1054d18d730b21ea89977a2d7a467c8.zip |
Merge pull request #1663 from mattermost/PLT-1418
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.jsx | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index cd8359df5..f71abf971 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) { @@ -26,6 +29,12 @@ export default class SearchResultsItem extends React.Component { } } + handleFocusRHSClick(e) { + e.preventDefault(); + + EventHelpers.emitPostFocusRightHandSideEvent(this.props.post); + } + render() { var channelName = ''; var channel = ChannelStore.get(this.props.post.channel_id); @@ -73,10 +82,21 @@ export default class SearchResultsItem extends React.Component { {'Jump'} </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> |