eslint
This commit is contained in:
parent
c1472d93a0
commit
5d3f26edf8
6 changed files with 16 additions and 20 deletions
|
@ -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'
|
||||
|
||||
|
|
|
@ -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 {
|
|||
>
|
||||
<div id="addLinkIcon"></div>
|
||||
<div id="addLinkInput">
|
||||
<input ref={input => this.linkInput = input}
|
||||
<input ref={input => (this.linkInput = input)}
|
||||
placeholder="Enter or paste a link"
|
||||
value={linkEdit}
|
||||
onChange={this.onLinkChangeHandler}
|
||||
|
@ -102,7 +102,7 @@ class Attachments extends Component {
|
|||
{linkEdit && <div id="addLinkReset"></div>}
|
||||
</div>
|
||||
</div>
|
||||
<a style={{ display: hasAttachment ? 'block' : 'none' }}
|
||||
<a style={{ display: hasAttachment ? 'block' : 'none' }}
|
||||
href={topic.get('link')}
|
||||
id="embedlyLink"
|
||||
target="_blank"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React, { PropTypes, Component } from 'react'
|
||||
import { get } from 'lodash'
|
||||
import { RIETextArea } from 'riek'
|
||||
import Util from '../../Metamaps/Util'
|
||||
|
||||
|
@ -13,8 +12,6 @@ class MdTextArea extends RIETextArea {
|
|||
}
|
||||
|
||||
renderNormalComponent = () => {
|
||||
const value = this.state.newValue || this.props.value
|
||||
|
||||
// defaultProps MUST use dangerouslySetInnerHTML
|
||||
return <span tabIndex="0"
|
||||
className={this.makeClassString()}
|
||||
|
@ -32,7 +29,7 @@ class Desc extends Component {
|
|||
: Util.mdToHTML(this.props.desc)
|
||||
|
||||
if (this.props.authorizedToEdit) {
|
||||
return (
|
||||
return (
|
||||
<div className="scroll">
|
||||
<div className="desc">
|
||||
<MdTextArea value={this.props.desc}
|
||||
|
@ -56,7 +53,7 @@ class Desc extends Component {
|
|||
<div className="clearfloat"></div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<div className="scroll">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* global $ */
|
||||
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
|
||||
import Metacode from './Metacode'
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* global $ */
|
||||
|
||||
import React, { PropTypes, Component } from 'react'
|
||||
|
||||
import DataModel from '../../Metamaps/DataModel'
|
||||
|
|
|
@ -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})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue