Commit fcea94ee authored by Maxime Chaillet's avatar Maxime Chaillet

move new button and take a photo button such that it is always visible on mobiles.

parent dbc7ab2d
......@@ -53,22 +53,31 @@ class EventListMenu extends React.Component {
<Navbar.Header>
<Navbar.Toggle />
<Nav style={{ marginLeft: '0px' }}>
<NavItem eventKey={1} href="#" className="logbookNavItem" >
<NewButton
isNewComponentVisible={isNewEventVisible}
onClick={setNewEventVisibility} />
<span style={{ width: '12px', display: 'inline-block' }} />
<CameraButton investigationId={investigationId} />
</NavItem>
</Nav>
</Navbar.Header>
<Navbar.Collapse>
<Nav>
<NavItem eventKey={1} href="#" className="logbookNavItem" >
{/* <NavItem eventKey={1} href="#" className="logbookNavItem" >
<NewButton
isNewComponentVisible={isNewEventVisible}
onClick={setNewEventVisibility} />
</NavItem>
</NavItem> */}
<NavItem eventKey={2} href="#" className="logbookNavItem" >
<DropdownButton onClick={(e)=> {e.stopPropagation()}}
<DropdownButton onClick={(e) => { e.stopPropagation() }}
bsStyle={'primary'}
title={'View'}
bsSize='small'>
<MenuItem eventKey="1" onSelect={() => setView(DOC_VIEW)} > {view === DOC_VIEW ? <Radio checked> Classic (user's input)</Radio> : <Radio checked={false}> Classic (user's input)</Radio>} </MenuItem>
<MenuItem eventKey="1" onSelect={() => setView(DOC_VIEW)} > {view === DOC_VIEW ? <Radio checked> Classic (user's commented logs)</Radio> : <Radio checked={false}> Classic (user's commented logs)</Radio>} </MenuItem>
<MenuItem eventKey="2" onSelect={() => setView(LIST_VIEW)} > {view === LIST_VIEW ? <Radio checked> Full (all logs)</Radio> : <Radio checked={false}> Full (all logs)</Radio>} </MenuItem>
<MenuItem divider />
<MenuItem eventKey="3" onSelect={() => this.sortByDate(SORT_EVENTS_FROM_OLDEST)} > {getCurrentlyPressedSortButton() === SORT_EVENTS_FROM_OLDEST ? <Radio checked> Oldest log on top</Radio> : <Radio checked={false}> Oldest log on top</Radio>} </MenuItem>
......@@ -84,9 +93,6 @@ class EventListMenu extends React.Component {
sessionId={sessionId}
/>
</NavItem>
<NavItem eventKey={4} href="#" className="logbookNavItem" >
<CameraButton investigationId={investigationId} />
</NavItem>
</Nav>
<Nav pullRight>
......@@ -138,13 +144,13 @@ class EventListMenu extends React.Component {
* Callback triggered when the user clicks an element of the navbar.
* @param {*} eventKey key of the element
*/
onSelectNavbar = (eventKey) =>{
onSelectNavbar = (eventKey) => {
if (eventKey != 6) {
this.onToggleNavbar();
}
}
onSearch = (data) =>{
onSearch = (data) => {
return this.props.searchEvents(data);
}
......@@ -196,7 +202,7 @@ class PDFButton extends React.Component {
bsStyle='primary'
href={getPDF(sessionId, investigationId, selectionFilter)}
target='_blank'
disabled={(isNewEventVisible === undefined || isNewEventVisible === true || numberOfMatchingEventsFound === 0)}
>
<Glyphicon glyph='download' style={{ marginRight: '3px' }} /> PDF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment