Change filter layout again

This commit is contained in:
Lukas Martinelli 2017-01-09 21:30:49 +01:00
parent 0a0400a297
commit e19a41d015
2 changed files with 21 additions and 21 deletions

View file

@ -12,8 +12,8 @@ import SingleFilterEditor from './SingleFilterEditor'
import FilterEditorBlock from './FilterEditorBlock' import FilterEditorBlock from './FilterEditorBlock'
import Button from '../Button' import Button from '../Button'
import AddIcon from 'react-icons/lib/md/add-circle-outline'
import DeleteIcon from 'react-icons/lib/md/delete' import DeleteIcon from 'react-icons/lib/md/delete'
import AddIcon from 'react-icons/lib/fa/plus'
function hasCombiningFilter(filter) { function hasCombiningFilter(filter) {
return combiningFilterOps.indexOf(filter[0]) >= 0 return combiningFilterOps.indexOf(filter[0]) >= 0
@ -91,29 +91,29 @@ export default class CombiningFilterEditor extends React.Component {
} }
return <div> return <div>
<div> <div style={{ marginBottom: margins[2] }}>
<DocLabel
label={"Compound Filter"}
doc={GlSpec.layer.filter.doc + " Combine multiple filters together by using a compound filter."}
style={{
display: 'inline-block',
width: '30%',
}}
/>
<Button onClick={this.addFilterItem.bind(this)} style={{ <Button onClick={this.addFilterItem.bind(this)} style={{
display: 'inline-block', display: 'inline-block',
width: '18.5%', width: '18%',
marginLeft: '8%', marginRight: '2%',
}}>Add filter</Button> }}>
Add filter
</Button>
<SelectInput <SelectInput
value={combiningOp} value={combiningOp}
onChange={this.onFilterPartChanged.bind(this, 0)} onChange={this.onFilterPartChanged.bind(this, 0)}
options={combiningFilterOps} options={[["all", "every filter matches"], ["none", "no filter matches"], ["any", "any filter matches"]]}
style={{ style={{
display: 'inline-block', display: 'inline-block',
marginLeft: '10.5%', width: '50%',
width: '18%',
}}
/>
<DocLabel
label={"of the filters match"}
doc={GlSpec.layer.filter.doc}
style={{
marginLeft: '2%',
display: 'inline-block',
width: '42%',
}} }}
/> />
</div> </div>

View file

@ -36,7 +36,7 @@ class SingleFilterEditor extends React.Component {
}}> }}>
<AutocompleteInput <AutocompleteInput
wrapperStyle={{ wrapperStyle={{
width: '30%' width: '22%'
}} }}
value={propertyName} value={propertyName}
options={Object.keys(this.props.properties).map(propName => [propName, propName])} options={Object.keys(this.props.properties).map(propName => [propName, propName])}
@ -44,7 +44,7 @@ class SingleFilterEditor extends React.Component {
/> />
<SelectInput <SelectInput
style={{ style={{
width: '19.5%', width: '19%',
marginLeft: '2%' marginLeft: '2%'
}} }}
value={filterOp} value={filterOp}
@ -53,8 +53,8 @@ class SingleFilterEditor extends React.Component {
/> />
<StringInput <StringInput
style={{ style={{
width: '47%', width: '54%',
marginLeft: '1.5%' marginLeft: '2%'
}} }}
value={filterArgs.join(',')} value={filterArgs.join(',')}
onChange={ v=> this.onFilterPartChanged(filterOp, propertyName, v.split(','))} onChange={ v=> this.onFilterPartChanged(filterOp, propertyName, v.split(','))}