diff --git a/frontend/src/Metamaps/Views/TopicCard.js b/frontend/src/Metamaps/Views/TopicCard.js index 3cbe5f9a..a7e176ac 100644 --- a/frontend/src/Metamaps/Views/TopicCard.js +++ b/frontend/src/Metamaps/Views/TopicCard.js @@ -4,11 +4,6 @@ import React from 'react' import ReactDOM from 'react-dom' import Active from '../Active' -import DataModel from '../DataModel' -import GlobalUI from '../GlobalUI' -import Mapper from '../Mapper' -import Router from '../Router' -import Visualize from '../Visualize' import ReactTopicCard from '../../components/TopicCard' diff --git a/frontend/src/components/TopicCard/Attachments.js b/frontend/src/components/TopicCard/Attachments.js index de7d1e39..a45cf197 100644 --- a/frontend/src/components/TopicCard/Attachments.js +++ b/frontend/src/components/TopicCard/Attachments.js @@ -1,4 +1,4 @@ -/* global $, CanvasLoader, Countable, Hogan, embedly */ +/* global $, embedly */ import React, { PropTypes, Component } from 'react' class Attachments extends Component { @@ -14,7 +14,7 @@ class Attachments extends Component { } componentDidMount = () => { - const { topic, ActiveMapper } = this.props + const { topic } = this.props embedly('on', 'card.rendered', this.embedlyCardRendered) topic.get('link') && topic.get('link') !== '' && this.loadLink() } @@ -49,8 +49,8 @@ class Attachments extends Component { if (e.which === ENTER_KEY) { // TODO evaluate converting this to '//' no matter what (infer protocol) if (linkEdit.slice(0, 7) !== 'http://' && - linkEdit.slice(0, 8) !== 'https://' && - linkEdit.slice(0, 2) !== '//') { + linkEdit.slice(0, 8) !== 'https://' && + linkEdit.slice(0, 2) !== '//') { finalLink = '//' + linkEdit } this.setState({ linkEdit: '' }) @@ -94,7 +94,7 @@ class Attachments extends Component { >
- this.linkInput = input} + (this.linkInput = input)} placeholder="Enter or paste a link" value={linkEdit} onChange={this.onLinkChangeHandler} @@ -102,7 +102,7 @@ class Attachments extends Component { {linkEdit &&
}
- { - const value = this.state.newValue || this.props.value - // defaultProps MUST use dangerouslySetInnerHTML return
- ) + ) } else { return (
diff --git a/frontend/src/components/TopicCard/Links.js b/frontend/src/components/TopicCard/Links.js index 1eb85a44..93517965 100644 --- a/frontend/src/components/TopicCard/Links.js +++ b/frontend/src/components/TopicCard/Links.js @@ -1,3 +1,5 @@ +/* global $ */ + import React, { PropTypes, Component } from 'react' import Metacode from './Metacode' diff --git a/frontend/src/components/TopicCard/Metacode.js b/frontend/src/components/TopicCard/Metacode.js index 3add80fe..0306f35d 100644 --- a/frontend/src/components/TopicCard/Metacode.js +++ b/frontend/src/components/TopicCard/Metacode.js @@ -1,3 +1,5 @@ +/* global $ */ + import React, { PropTypes, Component } from 'react' import DataModel from '../../Metamaps/DataModel' diff --git a/frontend/src/components/TopicCard/Permission.js b/frontend/src/components/TopicCard/Permission.js index fbe9b7c7..cc4e48db 100644 --- a/frontend/src/components/TopicCard/Permission.js +++ b/frontend/src/components/TopicCard/Permission.js @@ -3,22 +3,22 @@ import React, { PropTypes, Component } from 'react' // TODO how do we make it so that clicking elsewhere on the topic // card cancels this class Permission extends Component { - + constructor(props) { super(props) this.state = { selectingPermission: false } } - + togglePermissionSelect = () => { this.setState({selectingPermission: !this.state.selectingPermission}) } - + openPermissionSelect = () => { this.setState({selectingPermission: true}) } - + closePermissionSelect = () => { this.setState({selectingPermission: false}) }