Skip to content

Commit

Permalink
Fix geosolutions-it#1163 improved styler layout (geosolutions-it#1164)
Browse files Browse the repository at this point in the history
- removes also some warnings as for geosolutions-it#1151
  • Loading branch information
offtherailz authored Oct 17, 2016
1 parent fb0cc20 commit 1ffcfb3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions web/client/components/TOC/fragments/LayersTool.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const LayersTool = React.createClass({
onClick: React.PropTypes.func,
style: React.PropTypes.object,
glyph: React.PropTypes.string,
tooltip: React.PropTypes.tooltip
tooltip: React.PropTypes.string
},
getDefaultProps() {
return {
Expand All @@ -32,7 +32,7 @@ const LayersTool = React.createClass({
glyph={this.props.glyph}
onClick={(options) => this.props.onClick(this.props.node, options || {})}/>);
return this.props.tooltip ? (
<OverlayTrigger placement="bottom" overlay={(<Tooltip><strong><Message msgId={this.props.tooltip}/></strong></Tooltip>)}>
<OverlayTrigger placement="bottom" overlay={(<Tooltip id={"Tooltip-" + this.props.tooltip}><strong><Message msgId={this.props.tooltip}/></strong></Tooltip>)}>
{tool}
</OverlayTrigger>) : tool;

Expand Down
2 changes: 1 addition & 1 deletion web/client/components/file/FileUploader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const FileUploader = React.createClass({
height: "100px",
textAlign: "center"
}}>
<Glyphicon glyph="open-file" />
<Glyphicon glyph="upload" />
{this.props.dropMessage}
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/misc/Dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const Dialog = React.createClass({
return React.Children.toArray(this.props.children).filter((child) => child.props.role === role);
},
render() {
const dialog = (<Draggable className="modal-content" start={this.props.start} handle=".draggable-header, .draggable-header *">
const dialog = (<Draggable start={this.props.start} handle=".draggable-header, .draggable-header *">
<div id={this.props.id} style={{zIndex: 3, ...this.props.style}} className={this.props.className + " modal-dialog-container"}>
<div className={this.props.headerClassName + " draggable-header"}>
{this.renderRole('header')}
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/MetadataExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const MetadataExplorerComponent = React.createClass({
panelClassName: React.PropTypes.string,
toggleControl: React.PropTypes.func,
closeGlyph: React.PropTypes.string,
buttonStyle: React.PropTypes.string,
buttonStyle: React.PropTypes.object,
style: React.PropTypes.object
},
getDefaultProps() {
Expand Down
13 changes: 6 additions & 7 deletions web/client/plugins/Styler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const Styler = React.createClass({

if (layer && layer.params && layer.params.SLD_BODY && this.props.layer && this.getRestURL(this.props.layer.url)) {
return (
<Button style={{margin: "4px"}} onClick={this.saveStyle}>Save</Button>
<Button style={{marginRight: "4px"}} onClick={this.saveStyle}>Save</Button>
);
}

Expand All @@ -207,20 +207,19 @@ const Styler = React.createClass({
renderZoom() {
let originalLayer = this.findOriginalLayer(this.props, this.props);
if (originalLayer && originalLayer.capabilities) {
return <Button key="zoom-btn" onClick={this.zoomToLayerExtent} ><Glyphicon glyph="search" />Zoom To Layer</Button>;
return (<Button key="zoom-btn" style={{
"float": "right"
}}onClick={this.zoomToLayerExtent} ><Glyphicon glyph="search" />Zoom To Layer</Button>);
}
},
renderBody() {

return (<Grid fluid>
{this.renderSelector()}
{this.props.layer ? this.renderStyler() : this.renderWaitOrError()}
<Row>
<Row style={{margin: "4px 0"}}>
{this.props.layer && this.props.canSave ? this.renderSave() : null}
{this.renderReset()}
</Row>
<Row>
{this.renderZoom()}
{this.renderReset()}{this.renderZoom()}
</Row>
</Grid>);
},
Expand Down
4 changes: 2 additions & 2 deletions web/client/plugins/VectorStyler.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ const VectorStyler = React.createClass({
return (
<Row>
<Col sm={3} style={{padding: 0}}><Button onClick={this.props.addRule}>
<Message msgId="vectorstyler.addrulebtn"/></Button></Col>
<Glyphicon glyph="plus" /><Message msgId="vectorstyler.addrulebtn"/></Button></Col>
<Col sm={3} style={{padding: 0}}>
<Button disabled={disabled}
onClick={() => this.props.removeRule(this.props.rule.id)}>
<Message msgId="vectorstyler.removerulebtn"/></Button></Col>
<Glyphicon glyph="minus" /><Message msgId="vectorstyler.removerulebtn"/></Button></Col>
<Col sm={4} smOffset={2} style={{padding: 0}}>
<Button style={{"float": "right"}} onClick={this.apply}
disabled={disabled} ><Message msgId="vectorstyler.applybtn"/></Button>
Expand Down
2 changes: 1 addition & 1 deletion web/client/reducers/vectorstyler.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function vectorstyler(state = initialSpec, action) {
const newRule = {
id: action.id,
symbol: getBaseSymbol(getType(state.layer)),
name: 'Test Name'
name: 'New Rule'
};

return assign({}, state, {rule: newRule.id, rules: (state.rules ? [...state.rules, newRule] : [newRule])});
Expand Down

0 comments on commit 1ffcfb3

Please sign in to comment.