summaryrefslogtreecommitdiffstats
path: root/web/react/components/get_link_modal.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/get_link_modal.jsx')
-rw-r--r--web/react/components/get_link_modal.jsx21
1 files changed, 6 insertions, 15 deletions
diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx
index f0ebe9bce..fc32d946b 100644
--- a/web/react/components/get_link_modal.jsx
+++ b/web/react/components/get_link_modal.jsx
@@ -2,33 +2,24 @@
// See License.txt for license information.
var UserStore = require('../stores/user_store.jsx');
-var ZeroClipboardMixin = require('react-zeroclipboard-mixin');
-
-ZeroClipboardMixin.ZeroClipboard.config({
- swfPath: '../../static/flash/ZeroClipboard.swf'
-});
export default class GetLinkModal extends React.Component {
constructor(props) {
super(props);
- this.zeroclipboardElementsSelector = '[data-copy-btn]';
- this.mixins = [ZeroClipboardMixin];
-
this.handleClick = this.handleClick.bind(this);
this.state = {copiedLink: false};
}
componentDidMount() {
- var self = this;
if (this.refs.modal) {
- $(this.refs.modal.getDOMNode()).on('show.bs.modal', function show(e) {
+ $(React.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) {
var button = e.relatedTarget;
- self.setState({title: $(button).attr('data-title'), value: $(button).attr('data-value')});
- });
- $(this.refs.modal.getDOMNode()).on('hide.bs.modal', function hide() {
- self.setState({copiedLink: false});
- });
+ this.setState({title: $(button).attr('data-title'), value: $(button).attr('data-value')});
+ }.bind(this));
+ $(React.findDOMNode(this.refs.modal)).on('hide.bs.modal', function hide() {
+ this.setState({copiedLink: false});
+ }.bind(this));
}
}
handleClick() {