From efa7b8252fff96e52cca82d332fbf812305049b3 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Thu, 29 Oct 2015 17:49:38 -0400
Subject: Ported ConfirmModal and InviteMemberModal to React-Bootstrap

---
 web/react/components/navbar_dropdown.jsx | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

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

diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index dc21fad21..7d7acf5b9 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -7,6 +7,7 @@ var UserStore = require('../stores/user_store.jsx');
 var TeamStore = require('../stores/team_store.jsx');
 
 var AboutBuildModal = require('./about_build_modal.jsx');
+var InviteMemberModal = require('./invite_member_modal.jsx');
 
 var Constants = require('../utils/constants.jsx');
 
@@ -41,7 +42,10 @@ export default class NavbarDropdown extends React.Component {
         this.onListenerChange = this.onListenerChange.bind(this);
         this.aboutModalDismissed = this.aboutModalDismissed.bind(this);
 
-        this.state = getStateFromStores();
+        const state = getStateFromStores();
+        state.showAboutModal = false;
+        state.showInviteMemberModal = false;
+        this.state = state;
     }
     handleLogoutClick(e) {
         e.preventDefault();
@@ -96,8 +100,7 @@ export default class NavbarDropdown extends React.Component {
                 <li>
                     <a
                         href='#'
-                        data-toggle='modal'
-                        data-target='#invite_member'
+                        onClick={() => this.setState({showInviteMemberModal: true})}
                     >
                         {'Invite New Member'}
                     </a>
@@ -268,6 +271,10 @@ export default class NavbarDropdown extends React.Component {
                             show={this.state.showAboutModal}
                             onModalDismissed={this.aboutModalDismissed}
                         />
+                        <InviteMemberModal
+                            show={this.state.showInviteMemberModal}
+                            onModalDismissed={() => this.setState({showInviteMemberModal: false})}
+                        />
                     </ul>
                 </li>
             </ul>
-- 
cgit v1.2.3-1-g7c22


From 738568e5a9726b3a1b2536a20ab6627c5e9fb01e Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Fri, 30 Oct 2015 11:13:56 -0400
Subject: Ported UserSettingsModal to React-Bootstrap

---
 web/react/components/navbar_dropdown.jsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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

diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index 7d7acf5b9..81ff11fb5 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -8,6 +8,7 @@ var TeamStore = require('../stores/team_store.jsx');
 
 var AboutBuildModal = require('./about_build_modal.jsx');
 var InviteMemberModal = require('./invite_member_modal.jsx');
+var UserSettingsModal = require('./user_settings/user_settings_modal.jsx');
 
 var Constants = require('../utils/constants.jsx');
 
@@ -43,6 +44,7 @@ export default class NavbarDropdown extends React.Component {
         this.aboutModalDismissed = this.aboutModalDismissed.bind(this);
 
         const state = getStateFromStores();
+        state.showUserSettingsModal = false;
         state.showAboutModal = false;
         state.showInviteMemberModal = false;
         this.state = state;
@@ -221,8 +223,7 @@ export default class NavbarDropdown extends React.Component {
                         <li>
                             <a
                                 href='#'
-                                data-toggle='modal'
-                                data-target='#user_settings'
+                                onClick={() => this.setState({showUserSettingsModal: true})}
                             >
                                 {'Account Settings'}
                             </a>
@@ -267,6 +268,10 @@ export default class NavbarDropdown extends React.Component {
                                 {'About Mattermost'}
                             </a>
                         </li>
+                        <UserSettingsModal
+                            show={this.state.showUserSettingsModal}
+                            onModalDismissed={() => this.setState({showUserSettingsModal: false})}
+                        />
                         <AboutBuildModal
                             show={this.state.showAboutModal}
                             onModalDismissed={this.aboutModalDismissed}
-- 
cgit v1.2.3-1-g7c22


From 6428878e20fa54b7bb6b2bf6e0aaaeb637affa59 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Mon, 2 Nov 2015 17:35:59 -0500
Subject: Moved InviteMemberModal to be controlled by a store

---
 web/react/components/navbar_dropdown.jsx | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

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

diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index 81ff11fb5..6c4b278a0 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -46,7 +46,6 @@ export default class NavbarDropdown extends React.Component {
         const state = getStateFromStores();
         state.showUserSettingsModal = false;
         state.showAboutModal = false;
-        state.showInviteMemberModal = false;
         this.state = state;
     }
     handleLogoutClick(e) {
@@ -102,7 +101,7 @@ export default class NavbarDropdown extends React.Component {
                 <li>
                     <a
                         href='#'
-                        onClick={() => this.setState({showInviteMemberModal: true})}
+                        onClick={InviteMemberModal.show}
                     >
                         {'Invite New Member'}
                     </a>
@@ -276,10 +275,6 @@ export default class NavbarDropdown extends React.Component {
                             show={this.state.showAboutModal}
                             onModalDismissed={this.aboutModalDismissed}
                         />
-                        <InviteMemberModal
-                            show={this.state.showInviteMemberModal}
-                            onModalDismissed={() => this.setState({showInviteMemberModal: false})}
-                        />
                     </ul>
                 </li>
             </ul>
-- 
cgit v1.2.3-1-g7c22

