From d8bd57901e33a7057e26e782e295099ffcc0da89 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 6 Sep 2017 23:04:13 -0700 Subject: Removing webapp --- webapp/components/rhs_header_post.jsx | 217 ---------------------------------- 1 file changed, 217 deletions(-) delete mode 100644 webapp/components/rhs_header_post.jsx (limited to 'webapp/components/rhs_header_post.jsx') diff --git a/webapp/components/rhs_header_post.jsx b/webapp/components/rhs_header_post.jsx deleted file mode 100644 index 1608f90a2..000000000 --- a/webapp/components/rhs_header_post.jsx +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import AppDispatcher from '../dispatcher/app_dispatcher.jsx'; -import Constants from 'utils/constants.jsx'; -import {Tooltip, OverlayTrigger} from 'react-bootstrap'; - -import * as GlobalActions from 'actions/global_actions.jsx'; -import {getFlaggedPosts, getPinnedPosts} from 'actions/post_actions.jsx'; - -import {FormattedMessage} from 'react-intl'; - -const ActionTypes = Constants.ActionTypes; - -import PropTypes from 'prop-types'; - -import React from 'react'; - -export default class RhsHeaderPost extends React.Component { - constructor(props) { - super(props); - - this.handleClose = this.handleClose.bind(this); - this.toggleSize = this.toggleSize.bind(this); - this.handleBack = this.handleBack.bind(this); - - this.state = {}; - } - - handleClose(e) { - e.preventDefault(); - GlobalActions.emitCloseRightHandSide(); - this.props.shrink(); - } - - toggleSize(e) { - e.preventDefault(); - this.props.toggleSize(); - } - - handleBack(e) { - e.preventDefault(); - - if (this.props.fromSearch || this.props.isWebrtc) { - AppDispatcher.handleServerAction({ - type: ActionTypes.RECEIVED_SEARCH_TERM, - term: this.props.fromSearch, - do_search: true, - is_mention_search: this.props.isMentionSearch - }); - - AppDispatcher.handleServerAction({ - type: ActionTypes.RECEIVED_POST_SELECTED, - postId: null - }); - } else if (this.props.fromFlaggedPosts) { - getFlaggedPosts(); - } else if (this.props.fromPinnedPosts) { - getPinnedPosts(); - } - } - - render() { - let back; - const closeSidebarTooltip = ( - - - - ); - - let backToResultsTooltip; - if (this.props.fromSearch) { - backToResultsTooltip = ( - - - - ); - } else if (this.props.fromFlaggedPosts) { - backToResultsTooltip = ( - - - - ); - } else if (this.props.isWebrtc) { - backToResultsTooltip = ( - - - - ); - } else if (this.props.fromPinnedPosts) { - backToResultsTooltip = ( - - - - ); - } - - const expandSidebarTooltip = ( - - - - ); - - const shrinkSidebarTooltip = ( - - - - ); - - if (this.props.fromSearch || this.props.fromFlaggedPosts || this.props.isWebrtc || this.props.fromPinnedPosts) { - back = ( - - - - - - ); - } - - return ( -
- - {back} - - -
- - -
-
- ); - } -} - -RhsHeaderPost.defaultProps = { - isMentionSearch: false, - fromSearch: '' -}; -RhsHeaderPost.propTypes = { - isMentionSearch: PropTypes.bool, - isWebrtc: PropTypes.bool, - fromSearch: PropTypes.string, - fromFlaggedPosts: PropTypes.bool, - fromPinnedPosts: PropTypes.bool, - toggleSize: PropTypes.func, - shrink: PropTypes.func -}; -- cgit v1.2.3-1-g7c22