From 12896bd23eeba79884245c1c29fdc568cf21a7fa Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 14 Mar 2016 08:50:46 -0400 Subject: Converting to Webpack. Stage 1. --- web/react/components/get_link_modal.jsx | 135 -------------------------------- 1 file changed, 135 deletions(-) delete mode 100644 web/react/components/get_link_modal.jsx (limited to 'web/react/components/get_link_modal.jsx') diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx deleted file mode 100644 index dd21f21e0..000000000 --- a/web/react/components/get_link_modal.jsx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import {FormattedMessage} from 'mm-intl'; - -const Modal = ReactBootstrap.Modal; - -export default class GetLinkModal extends React.Component { - constructor(props) { - super(props); - - this.onHide = this.onHide.bind(this); - - this.copyLink = this.copyLink.bind(this); - - this.state = { - copiedLink: false - }; - } - - onHide() { - this.setState({copiedLink: false}); - - this.props.onHide(); - } - - copyLink() { - var copyTextarea = $(ReactDOM.findDOMNode(this.refs.textarea)); - copyTextarea.select(); - - try { - var successful = document.execCommand('copy'); - if (successful) { - this.setState({copiedLink: true}); - } else { - this.setState({copiedLink: false}); - } - } catch (err) { - this.setState({copiedLink: false}); - } - } - - render() { - let helpText = null; - if (this.props.helpText) { - helpText = ( -

- {this.props.helpText} -
-
-

- ); - } - - let copyLink = null; - if (document.queryCommandSupported('copy')) { - copyLink = ( - - ); - } - - const linkText = ( -