summaryrefslogtreecommitdiffstats
path: root/webapp/components/search_results_item.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-24 20:04:40 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-29 09:54:55 -0400
commit5ce1a4368bafbd2ed50b1953658fca285cfd349b (patch)
tree9609d2ee90371ee0393a95f5fe67d27b5621257c /webapp/components/search_results_item.jsx
parentbf636404d25e943d869a32d8fe145eaa57a64039 (diff)
downloadchat-5ce1a4368bafbd2ed50b1953658fca285cfd349b.tar.gz
chat-5ce1a4368bafbd2ed50b1953658fca285cfd349b.tar.bz2
chat-5ce1a4368bafbd2ed50b1953658fca285cfd349b.zip
Refactoring center panel away. Moving tutorial to a route. Fixing a
bunch of bugs.
Diffstat (limited to 'webapp/components/search_results_item.jsx')
-rw-r--r--webapp/components/search_results_item.jsx23
1 files changed, 5 insertions, 18 deletions
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 35769d06b..219aa7093 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -1,37 +1,25 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import $ from 'jquery';
import UserStore from 'stores/user_store.jsx';
import UserProfile from './user_profile.jsx';
import * as GlobalActions from 'action_creators/global_actions.jsx';
import * as TextFormatting from 'utils/text_formatting.jsx';
+import * as Utils from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
import {FormattedMessage, FormattedDate} from 'react-intl';
-
import React from 'react';
+import {Link} from 'react-router';
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) {
- e.preventDefault();
-
- GlobalActions.emitPostFocusEvent(this.props.post.id);
-
- if ($(window).width() < 768) {
- $('.sidebar--right').removeClass('move--left');
- $('.inner-wrap').removeClass('move--left');
- }
- }
-
handleFocusRHSClick(e) {
e.preventDefault();
GlobalActions.emitPostFocusRightHandSideFromSearch(this.props.post, this.props.isMentionSearch);
@@ -99,16 +87,15 @@ export default class SearchResultsItem extends React.Component {
</time>
</li>
<li>
- <a
- href='#'
+ <Link
+ to={Utils.getTeamURLFromAddressBar() + '/pl/' + this.props.post.id}
className='search-item__jump'
- onClick={this.handleClick}
>
<FormattedMessage
id='search_item.jump'
defaultMessage='Jump'
/>
- </a>
+ </Link>
</li>
<li>
<a