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 ReactDOM from 'react-dom'
|
||||||
|
|
||||||
import Active from '../Active'
|
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'
|
import ReactTopicCard from '../../components/TopicCard'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* global $, CanvasLoader, Countable, Hogan, embedly */
|
/* global $, embedly */
|
||||||
import React, { PropTypes, Component } from 'react'
|
import React, { PropTypes, Component } from 'react'
|
||||||
|
|
||||||
class Attachments extends Component {
|
class Attachments extends Component {
|
||||||
|
@ -14,7 +14,7 @@ class Attachments extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
const { topic, ActiveMapper } = this.props
|
const { topic } = this.props
|
||||||
embedly('on', 'card.rendered', this.embedlyCardRendered)
|
embedly('on', 'card.rendered', this.embedlyCardRendered)
|
||||||
topic.get('link') && topic.get('link') !== '' && this.loadLink()
|
topic.get('link') && topic.get('link') !== '' && this.loadLink()
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ class Attachments extends Component {
|
||||||
if (e.which === ENTER_KEY) {
|
if (e.which === ENTER_KEY) {
|
||||||
// TODO evaluate converting this to '//' no matter what (infer protocol)
|
// TODO evaluate converting this to '//' no matter what (infer protocol)
|
||||||
if (linkEdit.slice(0, 7) !== 'http://' &&
|
if (linkEdit.slice(0, 7) !== 'http://' &&
|
||||||
linkEdit.slice(0, 8) !== 'https://' &&
|
linkEdit.slice(0, 8) !== 'https://' &&
|
||||||
linkEdit.slice(0, 2) !== '//') {
|
linkEdit.slice(0, 2) !== '//') {
|
||||||
finalLink = '//' + linkEdit
|
finalLink = '//' + linkEdit
|
||||||
}
|
}
|
||||||
this.setState({ linkEdit: '' })
|
this.setState({ linkEdit: '' })
|
||||||
|
@ -94,7 +94,7 @@ class Attachments extends Component {
|
||||||
>
|
>
|
||||||
<div id="addLinkIcon"></div>
|
<div id="addLinkIcon"></div>
|
||||||
<div id="addLinkInput">
|
<div id="addLinkInput">
|
||||||
<input ref={input => this.linkInput = input}
|
<input ref={input => (this.linkInput = input)}
|
||||||
placeholder="Enter or paste a link"
|
placeholder="Enter or paste a link"
|
||||||
value={linkEdit}
|
value={linkEdit}
|
||||||
onChange={this.onLinkChangeHandler}
|
onChange={this.onLinkChangeHandler}
|
||||||
|
@ -102,7 +102,7 @@ class Attachments extends Component {
|
||||||
{linkEdit && <div id="addLinkReset"></div>}
|
{linkEdit && <div id="addLinkReset"></div>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a style={{ display: hasAttachment ? 'block' : 'none' }}
|
<a style={{ display: hasAttachment ? 'block' : 'none' }}
|
||||||
href={topic.get('link')}
|
href={topic.get('link')}
|
||||||
id="embedlyLink"
|
id="embedlyLink"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import React, { PropTypes, Component } from 'react'
|
import React, { PropTypes, Component } from 'react'
|
||||||
import { get } from 'lodash'
|
|
||||||
import { RIETextArea } from 'riek'
|
import { RIETextArea } from 'riek'
|
||||||
import Util from '../../Metamaps/Util'
|
import Util from '../../Metamaps/Util'
|
||||||
|
|
||||||
|
@ -13,8 +12,6 @@ class MdTextArea extends RIETextArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderNormalComponent = () => {
|
renderNormalComponent = () => {
|
||||||
const value = this.state.newValue || this.props.value
|
|
||||||
|
|
||||||
// defaultProps MUST use dangerouslySetInnerHTML
|
// defaultProps MUST use dangerouslySetInnerHTML
|
||||||
return <span tabIndex="0"
|
return <span tabIndex="0"
|
||||||
className={this.makeClassString()}
|
className={this.makeClassString()}
|
||||||
|
@ -32,7 +29,7 @@ class Desc extends Component {
|
||||||
: Util.mdToHTML(this.props.desc)
|
: Util.mdToHTML(this.props.desc)
|
||||||
|
|
||||||
if (this.props.authorizedToEdit) {
|
if (this.props.authorizedToEdit) {
|
||||||
return (
|
return (
|
||||||
<div className="scroll">
|
<div className="scroll">
|
||||||
<div className="desc">
|
<div className="desc">
|
||||||
<MdTextArea value={this.props.desc}
|
<MdTextArea value={this.props.desc}
|
||||||
|
@ -56,7 +53,7 @@ class Desc extends Component {
|
||||||
<div className="clearfloat"></div>
|
<div className="clearfloat"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className="scroll">
|
<div className="scroll">
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* global $ */
|
||||||
|
|
||||||
import React, { PropTypes, Component } from 'react'
|
import React, { PropTypes, Component } from 'react'
|
||||||
|
|
||||||
import Metacode from './Metacode'
|
import Metacode from './Metacode'
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* global $ */
|
||||||
|
|
||||||
import React, { PropTypes, Component } from 'react'
|
import React, { PropTypes, Component } from 'react'
|
||||||
|
|
||||||
import DataModel from '../../Metamaps/DataModel'
|
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
|
// TODO how do we make it so that clicking elsewhere on the topic
|
||||||
// card cancels this
|
// card cancels this
|
||||||
class Permission extends Component {
|
class Permission extends Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
selectingPermission: false
|
selectingPermission: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePermissionSelect = () => {
|
togglePermissionSelect = () => {
|
||||||
this.setState({selectingPermission: !this.state.selectingPermission})
|
this.setState({selectingPermission: !this.state.selectingPermission})
|
||||||
}
|
}
|
||||||
|
|
||||||
openPermissionSelect = () => {
|
openPermissionSelect = () => {
|
||||||
this.setState({selectingPermission: true})
|
this.setState({selectingPermission: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
closePermissionSelect = () => {
|
closePermissionSelect = () => {
|
||||||
this.setState({selectingPermission: false})
|
this.setState({selectingPermission: false})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue