Skip to content

Commit

Permalink
Changed create map/dashboard buttons (#2871)
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap authored and offtherailz committed May 7, 2018
1 parent cd9a6ba commit 76f30b9
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 15 deletions.
14 changes: 8 additions & 6 deletions web/client/plugins/CreateNewMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ const React = require('react');
const PropTypes = require('prop-types');
const {connect} = require('react-redux');

const {ButtonToolbar, Button, Grid, Col} = require('react-bootstrap');
const Message = require('../components/I18N/Message');
const {ButtonToolbar, Button: ButtonB, Grid, Col, Glyphicon} = require('react-bootstrap');
const tooltip = require('../components/misc/enhancers/tooltip');
const Button = tooltip(ButtonB);
const {mapTypeSelector} = require('../selectors/maptype');


Expand Down Expand Up @@ -42,17 +43,18 @@ class CreateNewMap extends React.Component {
},
fluid: false
};

render() {
const display = this.isAllowed() ? null : "none";
return (<Grid fluid={this.props.fluid} style={{marginBottom: "30px", padding: 0, display}}>
<Col {...this.props.colProps} >
<ButtonToolbar>
<Button bsStyle="primary" onClick={() => { this.context.router.history.push("/viewer/" + this.props.mapType + "/new"); }}>
<Message msgId="newMap" />
<Button tooltipId="newMap" className="square-button" bsStyle="primary" onClick={() => { this.context.router.history.push("/viewer/" + this.props.mapType + "/new"); }}>
<Glyphicon glyph="add-map" />
</Button>
{this.props.dashboardsAvailable ?
<Button bsStyle="primary" onClick={() => { this.context.router.history.push("/dashboard/"); }}>
<Message msgId="resources.dashboards.newDashboard" />
<Button tooltipId="resources.dashboards.newDashboard" className="square-button" bsStyle="primary" onClick={() => { this.context.router.history.push("/dashboard/"); }}>
<Glyphicon glyph="add-dashboard" />
</Button>
: null}
</ButtonToolbar>
Expand Down
8 changes: 8 additions & 0 deletions web/client/themes/default/icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,14 @@
content: "\00b3";
}

.glyphicon-add-map:before {
content: "\00c0";
}

.glyphicon-add-dashboard:before {
content: "\00c1";
}

/* TODO: icons table positions (ie/firefox compatibility) */

.glyphicon-polyline-remove:before {
Expand Down
Binary file modified web/client/themes/default/icons/icons.eot
Binary file not shown.
31 changes: 22 additions & 9 deletions web/client/themes/default/icons/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/client/themes/default/icons/icons.ttf
Binary file not shown.
Binary file modified web/client/themes/default/icons/icons.woff
Binary file not shown.

0 comments on commit 76f30b9

Please sign in to comment.