Skip to content

Commit

Permalink
used Message
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosanmartino committed Mar 8, 2017
1 parent f441ee4 commit 7f4b130
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/client/plugins/drawer/Menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var React = require('react');
var {Glyphicon, Button, OverlayTrigger, Tooltip} = require('react-bootstrap');
var Sidebar = require('react-sidebar').default;
var Message = require('../../components/I18N/Message');

var Menu = React.createClass({
propTypes: {
Expand Down Expand Up @@ -62,9 +63,9 @@ var Menu = React.createClass({
const button = (<Button key={child.props.eventKey} bsSize="large" className={(child.props.buttonConfig && child.props.buttonConfig.buttonClassName) ? child.props.buttonConfig.buttonClassName : "square-button"} onClick={this.props.onChoose.bind(null, child.props.eventKey)} bsStyle={this.props.activeKey === child.props.eventKey ? 'default' : 'primary'}>
{child.props.glyph ? <Glyphicon glyph={child.props.glyph} /> : child.props.icon}
</Button>);
const tooltip = <Tooltip key={"tooltip." + child.props.eventKey} id={"tooltip." + child.props.eventKey}>{child.props.buttonConfig.tooltip || ''}</Tooltip>;
const tooltip = <Tooltip key={"tooltip." + child.props.eventKey} id={"tooltip." + child.props.eventKey}><Message msgId={child.props.buttonConfig.tooltip}/></Tooltip>;
return child.props.buttonConfig.tooltip ? (
<OverlayTrigger placement={"top"} key={"overlay-trigger." + child.props.eventKey}
<OverlayTrigger placement={"bottom"} key={"overlay-trigger." + child.props.eventKey}
overlay={tooltip}>
{button}
</OverlayTrigger>
Expand Down

0 comments on commit 7f4b130

Please sign in to comment.