diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-19 08:08:28 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-19 08:08:28 -0500 |
commit | 5f848b74793f679772473a3b5b2ab247bcc927a9 (patch) | |
tree | 1d53e4c9dd6351e7a56c0f67dcf3bac4c38a8369 /web/react/components/navbar.jsx | |
parent | 0dbbdaa45e639d508a4e75933a42ac4c313202d2 (diff) | |
parent | 70c957d4546016ff2d981d4e1704699b008d1ca5 (diff) | |
download | chat-5f848b74793f679772473a3b5b2ab247bcc927a9.tar.gz chat-5f848b74793f679772473a3b5b2ab247bcc927a9.tar.bz2 chat-5f848b74793f679772473a3b5b2ab247bcc927a9.zip |
Merge pull request #1457 from hmhealey/plt729
PLT-729 Added search button to mobile header
Diffstat (limited to 'web/react/components/navbar.jsx')
-rw-r--r-- | web/react/components/navbar.jsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/react/components/navbar.jsx b/web/react/components/navbar.jsx index 1fcfabccd..845c33f3b 100644 --- a/web/react/components/navbar.jsx +++ b/web/react/components/navbar.jsx @@ -32,6 +32,7 @@ export default class Navbar extends React.Component { this.onChange = this.onChange.bind(this); this.handleLeave = this.handleLeave.bind(this); + this.showSearch = this.showSearch.bind(this); this.createCollapseButtons = this.createCollapseButtons.bind(this); this.createDropdown = this.createDropdown.bind(this); @@ -100,6 +101,11 @@ export default class Navbar extends React.Component { $('.inner__wrap').toggleClass('move--left-small'); $('.sidebar--menu').toggleClass('move--left'); } + showSearch() { + AppDispatcher.handleServerAction({ + type: ActionTypes.SHOW_SEARCH + }); + } onChange() { this.setState(this.getStateFromStores()); $('#navbar .navbar-brand .description').popover({placement: 'bottom', trigger: 'click', html: true}); @@ -411,6 +417,16 @@ export default class Navbar extends React.Component { var collapseButtons = this.createCollapseButtons(currentId); + const searchButton = ( + <button + type='button' + className='navbar-toggle pull-right' + onClick={this.showSearch} + > + <span className='glyphicon glyphicon-search icon--white' /> + </button> + ); + var channelMenuDropdown = this.createDropdown(channel, channelTitle, isAdmin, isDirect, popoverContent); return ( @@ -422,6 +438,7 @@ export default class Navbar extends React.Component { <div className='container-fluid theme'> <div className='navbar-header'> {collapseButtons} + {searchButton} {channelMenuDropdown} </div> </div> |