Commit fcea94ee authored by Maxime Chaillet's avatar Maxime Chaillet
Browse files

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 { ...@@ -53,22 +53,31 @@ class EventListMenu extends React.Component {
<Navbar.Header> <Navbar.Header>
<Navbar.Toggle /> <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.Header>
<Navbar.Collapse> <Navbar.Collapse>
<Nav> <Nav>
<NavItem eventKey={1} href="#" className="logbookNavItem" > {/* <NavItem eventKey={1} href="#" className="logbookNavItem" >
<NewButton <NewButton
isNewComponentVisible={isNewEventVisible} isNewComponentVisible={isNewEventVisible}
onClick={setNewEventVisibility} /> onClick={setNewEventVisibility} />
</NavItem> </NavItem> */}
<NavItem eventKey={2} href="#" className="logbookNavItem" > <NavItem eventKey={2} href="#" className="logbookNavItem" >
<DropdownButton onClick={(e)=> {e.stopPropagation()}} <DropdownButton onClick={(e) => { e.stopPropagation() }}
bsStyle={'primary'} bsStyle={'primary'}
title={'View'} title={'View'}
bsSize='small'> 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 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 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> <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 { ...@@ -84,9 +93,6 @@ class EventListMenu extends React.Component {
sessionId={sessionId} sessionId={sessionId}
/> />
</NavItem> </NavItem>
<NavItem eventKey={4} href="#" className="logbookNavItem" >
<CameraButton investigationId={investigationId} />
</NavItem>
</Nav> </Nav>
<Nav pullRight> <Nav pullRight>
...@@ -138,13 +144,13 @@ class EventListMenu extends React.Component { ...@@ -138,13 +144,13 @@ class EventListMenu extends React.Component {
* Callback triggered when the user clicks an element of the navbar. * Callback triggered when the user clicks an element of the navbar.
* @param {*} eventKey key of the element * @param {*} eventKey key of the element
*/ */
onSelectNavbar = (eventKey) =>{ onSelectNavbar = (eventKey) => {
if (eventKey != 6) { if (eventKey != 6) {
this.onToggleNavbar(); this.onToggleNavbar();
} }
} }
onSearch = (data) =>{ onSearch = (data) => {
return this.props.searchEvents(data); return this.props.searchEvents(data);
} }
...@@ -196,7 +202,7 @@ class PDFButton extends React.Component { ...@@ -196,7 +202,7 @@ class PDFButton extends React.Component {
bsStyle='primary' bsStyle='primary'
href={getPDF(sessionId, investigationId, selectionFilter)} href={getPDF(sessionId, investigationId, selectionFilter)}
target='_blank' target='_blank'
disabled={(isNewEventVisible === undefined || isNewEventVisible === true || numberOfMatchingEventsFound === 0)} disabled={(isNewEventVisible === undefined || isNewEventVisible === true || numberOfMatchingEventsFound === 0)}
> >
<Glyphicon glyph='download' style={{ marginRight: '3px' }} /> PDF <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