2018-12-18 14:15:55 +01:00
|
|
|
import React, { Component } from "react";
|
|
|
|
|
import ConnectedToolbarSection from './ConnectedToolbarSection';
|
2019-01-06 21:59:25 +01:00
|
|
|
import ConnectedLayoutButton from './ConnectedLayoutButton';
|
2019-01-10 13:30:39 +01:00
|
|
|
import ConnectedCineDialog from '../components/ConnectedCineDialog.js';
|
2018-12-19 14:53:03 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2018-12-19 09:41:30 +01:00
|
|
|
import { RoundedButtonGroup } from 'react-viewerbase';
|
2018-12-18 14:15:55 +01:00
|
|
|
import './ToolbarRow.css';
|
2019-01-07 11:18:59 +01:00
|
|
|
import Icons from "../images/icons.svg"
|
2018-12-18 14:15:55 +01:00
|
|
|
|
|
|
|
|
class ToolbarRow extends Component {
|
2018-12-19 14:53:03 +01:00
|
|
|
static propTypes = {
|
|
|
|
|
leftSidebarOpen: PropTypes.bool.isRequired,
|
|
|
|
|
rightSidebarOpen: PropTypes.bool.isRequired,
|
|
|
|
|
setLeftSidebarOpen: PropTypes.func,
|
|
|
|
|
setRightSidebarOpen: PropTypes.func
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static defaultProps = {
|
|
|
|
|
leftSidebarOpen: false,
|
|
|
|
|
rightSidebarOpen: false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onLeftSidebarValueChanged = (value) => {
|
|
|
|
|
this.props.setLeftSidebarOpen(!!value);
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-18 14:15:55 +01:00
|
|
|
render() {
|
2018-12-19 09:41:30 +01:00
|
|
|
const leftSidebarToggle = [{
|
|
|
|
|
value: 'studies',
|
2019-01-07 11:18:59 +01:00
|
|
|
svgLink: `${Icons}#icon-studies`,
|
2018-12-19 09:41:30 +01:00
|
|
|
svgWidth: 15,
|
|
|
|
|
svgHeight: 13,
|
|
|
|
|
bottomLabel: 'Series',
|
|
|
|
|
}];
|
|
|
|
|
|
2018-12-19 14:53:03 +01:00
|
|
|
const leftSidebarValue = this.props.leftSidebarOpen ? leftSidebarToggle[0].value : null;
|
|
|
|
|
|
2018-12-18 14:15:55 +01:00
|
|
|
return (<div className="ToolbarRow">
|
2019-01-06 21:59:25 +01:00
|
|
|
<div className="pull-left m-t-1 p-y-1" style={{ padding: '10px' }}>
|
|
|
|
|
<RoundedButtonGroup options={leftSidebarToggle} value={leftSidebarValue} onValueChanged={this.onLeftSidebarValueChanged}/>
|
|
|
|
|
</div>
|
|
|
|
|
<ConnectedToolbarSection/>
|
|
|
|
|
<ConnectedLayoutButton/>
|
2019-01-10 13:30:39 +01:00
|
|
|
{/* TODO: Putting cine dialog here for now */}
|
|
|
|
|
<div style={{ marginLeft: '100px', display: 'inline-block'}}>
|
|
|
|
|
<ConnectedCineDialog/>
|
|
|
|
|
</div>
|
2019-01-06 21:59:25 +01:00
|
|
|
<div className="pull-right m-t-1 rm-x-1">
|
|
|
|
|
{/* > roundedButtonGroup rightSidebarToggleButtonData */}
|
2018-12-18 14:15:55 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default ToolbarRow;
|