From fe217988724c5c74fc02c34180eab504a4d906c1 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Sat, 27 Feb 2016 11:04:24 -0500
Subject: Changed TeamMembersModal to use UserList

---
 web/react/components/team_members_modal.jsx | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'web/react/components/team_members_modal.jsx')

diff --git a/web/react/components/team_members_modal.jsx b/web/react/components/team_members_modal.jsx
index 8ac435742..dfd48b614 100644
--- a/web/react/components/team_members_modal.jsx
+++ b/web/react/components/team_members_modal.jsx
@@ -28,12 +28,13 @@ export default class TeamMembersModal extends React.Component {
     }
 
     onShow() {
-        if ($(window).width() > 768) {
+        // TODO ugh
+        /*if ($(window).width() > 768) {
             $(ReactDOM.findDOMNode(this.refs.modalBody)).perfectScrollbar();
             $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 200);
         } else {
             $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 150);
-        }
+        }*/
     }
 
     render() {
@@ -41,7 +42,7 @@ export default class TeamMembersModal extends React.Component {
 
         return (
             <Modal
-                dialogClassName='team-members-modal'
+                dialogClassName='more-modal'
                 show={this.props.show}
                 onHide={this.props.onHide}
             >
@@ -54,10 +55,8 @@ export default class TeamMembersModal extends React.Component {
                         }}
                     />
                 </Modal.Header>
-                <Modal.Body ref='modalBody'>
-                    <div className='team-member-list'>
-                        <MemberListTeam/>
-                    </div>
+                <Modal.Body>
+                    <MemberListTeam/>
                 </Modal.Body>
                 <Modal.Footer>
                     <button
-- 
cgit v1.2.3-1-g7c22


From 62c09209430e74fb0863cd998497f6ef1c475342 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Wed, 2 Mar 2016 16:10:14 -0500
Subject: Fixed max height for all modals using FilteredUserLists

---
 web/react/components/team_members_modal.jsx | 36 ++++++-----------------------
 1 file changed, 7 insertions(+), 29 deletions(-)

(limited to 'web/react/components/team_members_modal.jsx')

diff --git a/web/react/components/team_members_modal.jsx b/web/react/components/team_members_modal.jsx
index dfd48b614..9bdb16438 100644
--- a/web/react/components/team_members_modal.jsx
+++ b/web/react/components/team_members_modal.jsx
@@ -3,43 +3,21 @@
 
 import MemberListTeam from './member_list_team.jsx';
 import TeamStore from '../stores/team_store.jsx';
+import * as Utils from '../utils/utils.jsx';
 
 import {FormattedMessage} from 'mm-intl';
 
 const Modal = ReactBootstrap.Modal;
 
 export default class TeamMembersModal extends React.Component {
-    constructor(props) {
-        super(props);
-
-        this.onShow = this.onShow.bind(this);
-    }
-
-    componentDidMount() {
-        if (this.props.show) {
-            this.onShow();
-        }
-    }
-
-    componentDidUpdate(prevProps) {
-        if (this.props.show && !prevProps.show) {
-            this.onShow();
-        }
-    }
-
-    onShow() {
-        // TODO ugh
-        /*if ($(window).width() > 768) {
-            $(ReactDOM.findDOMNode(this.refs.modalBody)).perfectScrollbar();
-            $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 200);
-        } else {
-            $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 150);
-        }*/
-    }
-
     render() {
         const team = TeamStore.getCurrent();
 
+        let maxHeight = 1000;
+        if (Utils.windowHeight() <= 1200) {
+            maxHeight = Utils.windowHeight() - 300;
+        }
+
         return (
             <Modal
                 dialogClassName='more-modal'
@@ -56,7 +34,7 @@ export default class TeamMembersModal extends React.Component {
                     />
                 </Modal.Header>
                 <Modal.Body>
-                    <MemberListTeam/>
+                    <MemberListTeam style={{maxHeight}}/>
                 </Modal.Body>
                 <Modal.Footer>
                     <button
-- 
cgit v1.2.3-1-g7c22

