diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-04 14:37:04 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-04 14:37:04 -0500 |
commit | 41af72bff64217e39e082c5bc0cba37b0795b8ef (patch) | |
tree | c5b527a3194a119f8858085b128217939a757deb /web/react/components/more_channels.jsx | |
parent | 04b59e1a3e13f1a2af8d45846a5a4884f3cfa5df (diff) | |
download | chat-41af72bff64217e39e082c5bc0cba37b0795b8ef.tar.gz chat-41af72bff64217e39e082c5bc0cba37b0795b8ef.tar.bz2 chat-41af72bff64217e39e082c5bc0cba37b0795b8ef.zip |
Re-added max height to MoreChannels modal
Diffstat (limited to 'web/react/components/more_channels.jsx')
-rw-r--r-- | web/react/components/more_channels.jsx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index 577922577..d91a42b87 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -1,7 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as utils from '../utils/utils.jsx'; +import * as Utils from '../utils/utils.jsx'; import * as client from '../utils/client.jsx'; import * as AsyncClient from '../utils/async_client.jsx'; import ChannelStore from '../stores/channel_store.jsx'; @@ -49,7 +49,7 @@ export default class MoreChannels extends React.Component { } onListenerChange() { var newState = getStateFromStores(); - if (!utils.areObjectsEqual(newState.channels, this.state.channels)) { + if (!Utils.areObjectsEqual(newState.channels, this.state.channels)) { this.setState(newState); } } @@ -59,7 +59,7 @@ export default class MoreChannels extends React.Component { () => { $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); AsyncClient.getChannel(channel.id); - utils.switchChannel(channel); + Utils.switchChannel(channel); this.setState({joiningChannel: -1}); }, (err) => { @@ -109,6 +109,11 @@ export default class MoreChannels extends React.Component { ); } render() { + let maxHeight = 1000; + if (Utils.windowHeight() <= 1200) { + maxHeight = Utils.windowHeight() - 300; + } + var serverError; if (this.state.serverError) { serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>; @@ -195,7 +200,10 @@ export default class MoreChannels extends React.Component { onModalDismissed={() => this.setState({showNewChannelModal: false})} /> </div> - <div className='modal-body'> + <div + className='modal-body' + style={{maxHeight}} + > {moreChannels} {serverError} </div> |