PLT-2705 - Fixing jump to archive on mobile (#2861)

Этот коммит содержится в:
Asaad Mahmood
2016-05-03 20:53:29 +05:00
коммит произвёл Corey Hulen
родитель 05a203b409
Коммит ffb4cb5e10

Просмотреть файл

@@ -1,6 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import $ from 'jquery';
import UserProfile from './user_profile.jsx';
import UserStore from 'stores/user_store.jsx';
@@ -23,6 +24,10 @@ export default class SearchResultsItem extends React.Component {
this.handleFocusRHSClick = this.handleFocusRHSClick.bind(this);
}
hideSidebar() {
$('.inner-wrap, .sidebar--right').removeClass('move--left');
}
handleFocusRHSClick(e) {
e.preventDefault();
GlobalActions.emitPostFocusRightHandSideFromSearch(this.props.post, this.props.isMentionSearch);
@@ -127,6 +132,8 @@ export default class SearchResultsItem extends React.Component {
type: ActionTypes.RECEIVED_POST_SELECTED,
postId: null
});
this.hideSidebar();
}
browserHistory.push('/' + window.location.pathname.split('/')[1] + '/pl/' + post.id);
}