summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmood@users.noreply.github.com>2016-11-12 00:54:53 +0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-11 14:54:53 -0500
commit29efeff09532397a33bb971e91324f673b296559 (patch)
tree3d50210d23d487740482b12d987ff2d7d290f435 /webapp/components
parent2f488b13c7e6e3e89fd603c1e1c4d9e9e21dbb8c (diff)
downloadchat-29efeff09532397a33bb971e91324f673b296559.tar.gz
chat-29efeff09532397a33bb971e91324f673b296559.tar.bz2
chat-29efeff09532397a33bb971e91324f673b296559.zip
PLT-4609 - Fixing list modals on mobile (#4536)
* PLT-4609 - Fixing list modals on mobile * PLT-4609 - Adjust more modal height
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/channel_invite_modal.jsx6
-rw-r--r--webapp/components/channel_members_modal.jsx7
-rw-r--r--webapp/components/member_list_team.jsx2
-rw-r--r--webapp/components/more_channels.jsx10
-rw-r--r--webapp/components/more_direct_channels.jsx7
-rw-r--r--webapp/components/searchable_user_list.jsx6
-rw-r--r--webapp/components/team_members_modal.jsx7
7 files changed, 2 insertions, 43 deletions
diff --git a/webapp/components/channel_invite_modal.jsx b/webapp/components/channel_invite_modal.jsx
index 89185435a..cffc73705 100644
--- a/webapp/components/channel_invite_modal.jsx
+++ b/webapp/components/channel_invite_modal.jsx
@@ -11,7 +11,6 @@ import TeamStore from 'stores/team_store.jsx';
import {searchUsers} from 'actions/user_actions.jsx';
-import * as Utils from 'utils/utils.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import React from 'react';
@@ -133,13 +132,8 @@ export default class ChannelInviteModal extends React.Component {
if (this.state.loading) {
content = (<LoadingScreen/>);
} else {
- let maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
content = (
<SearchableUserList
- style={{maxHeight}}
users={this.state.users}
usersPerPage={USERS_PER_PAGE}
total={this.state.total}
diff --git a/webapp/components/channel_members_modal.jsx b/webapp/components/channel_members_modal.jsx
index 85226fd02..aa511086d 100644
--- a/webapp/components/channel_members_modal.jsx
+++ b/webapp/components/channel_members_modal.jsx
@@ -13,7 +13,6 @@ import {removeUserFromChannel} from 'actions/channel_actions.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
-import * as Utils from 'utils/utils.jsx';
import React from 'react';
import {Modal} from 'react-bootstrap';
@@ -144,11 +143,6 @@ export default class ChannelMembersModal extends React.Component {
if (this.state.loading) {
content = (<LoadingScreen/>);
} else {
- let maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
-
let removeButton = null;
if (this.props.isAdmin) {
removeButton = [this.createRemoveMemberButton];
@@ -156,7 +150,6 @@ export default class ChannelMembersModal extends React.Component {
content = (
<SearchableUserList
- style={{maxHeight}}
users={this.state.users}
usersPerPage={USERS_PER_PAGE}
total={this.state.total}
diff --git a/webapp/components/member_list_team.jsx b/webapp/components/member_list_team.jsx
index 4795604e3..a48283b96 100644
--- a/webapp/components/member_list_team.jsx
+++ b/webapp/components/member_list_team.jsx
@@ -125,7 +125,6 @@ export default class MemberListTeam extends React.Component {
return (
<SearchableUserList
- style={this.props.style}
users={usersToDisplay}
usersPerPage={USERS_PER_PAGE}
total={this.state.total}
@@ -139,6 +138,5 @@ export default class MemberListTeam extends React.Component {
}
MemberListTeam.propTypes = {
- style: React.PropTypes.object,
isAdmin: React.PropTypes.bool
};
diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx
index b35f5b997..e57c5d25f 100644
--- a/webapp/components/more_channels.jsx
+++ b/webapp/components/more_channels.jsx
@@ -96,11 +96,6 @@ export default class MoreChannels extends React.Component {
}
render() {
- let maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
-
let serverError;
if (this.state.serverError) {
serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>;
@@ -204,10 +199,7 @@ export default class MoreChannels extends React.Component {
onModalDismissed={() => this.setState({showNewChannelModal: false})}
/>
</div>
- <div
- className='modal-body'
- style={{maxHeight}}
- >
+ <div className='modal-body'>
{moreChannels}
{serverError}
</div>
diff --git a/webapp/components/more_direct_channels.jsx b/webapp/components/more_direct_channels.jsx
index 4cb7db28a..50ab5224a 100644
--- a/webapp/components/more_direct_channels.jsx
+++ b/webapp/components/more_direct_channels.jsx
@@ -12,7 +12,6 @@ import TeamStore from 'stores/team_store.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
import * as UserAgent from 'utils/user_agent.jsx';
-import * as Utils from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
import React from 'react';
@@ -185,11 +184,6 @@ export default class MoreDirectChannels extends React.Component {
}
render() {
- let maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
-
let teamToggle;
if (global.window.mm_config.RestrictDirectMessage === 'any') {
teamToggle = (
@@ -245,7 +239,6 @@ export default class MoreDirectChannels extends React.Component {
{teamToggle}
<SearchableUserList
key={'moreDirectChannelsList_' + this.state.listType}
- style={{maxHeight}}
users={this.state.users}
usersPerPage={USERS_PER_PAGE}
nextPage={this.nextPage}
diff --git a/webapp/components/searchable_user_list.jsx b/webapp/components/searchable_user_list.jsx
index faa1b441c..3fa912d6d 100644
--- a/webapp/components/searchable_user_list.jsx
+++ b/webapp/components/searchable_user_list.jsx
@@ -156,10 +156,7 @@ export default class SearchableUserList extends React.Component {
}
return (
- <div
- className='filtered-user-list'
- style={this.props.style}
- >
+ <div className='filtered-user-list'>
<div className='filter-row'>
<div className='col-xs-9 col-sm-5'>
<input
@@ -229,6 +226,5 @@ SearchableUserList.propTypes = {
actions: React.PropTypes.arrayOf(React.PropTypes.func),
actionProps: React.PropTypes.object,
actionUserProps: React.PropTypes.object,
- style: React.PropTypes.object,
focusOnMount: React.PropTypes.bool.isRequired
};
diff --git a/webapp/components/team_members_modal.jsx b/webapp/components/team_members_modal.jsx
index 76ffafe27..b58a93157 100644
--- a/webapp/components/team_members_modal.jsx
+++ b/webapp/components/team_members_modal.jsx
@@ -3,7 +3,6 @@
import MemberListTeam from './member_list_team.jsx';
import TeamStore from 'stores/team_store.jsx';
-import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -46,11 +45,6 @@ export default class TeamMembersModal extends React.Component {
teamDisplayName = this.state.team.display_name;
}
- let maxHeight = 1000;
- if (Utils.windowHeight() <= 1200) {
- maxHeight = Utils.windowHeight() - 300;
- }
-
return (
<Modal
dialogClassName='more-modal'
@@ -71,7 +65,6 @@ export default class TeamMembersModal extends React.Component {
</Modal.Header>
<Modal.Body>
<MemberListTeam
- style={{maxHeight}}
isAdmin={this.props.isAdmin}
/>
</Modal.Body>