From 6237631a85b79311a60b87df423abbdce56c7876 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Mon, 16 Nov 2015 12:08:05 -0500
Subject: Ported EditChannelModal to React-Bootstrap

---
 web/react/components/channel_header.jsx | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

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

diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 8c721348f..06d5db8b0 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -4,6 +4,7 @@
 import NavbarSearchBox from './search_bar.jsx';
 import MessageWrapper from './message_wrapper.jsx';
 import PopoverListMembers from './popover_list_members.jsx';
+import EditChannelModal from './edit_channel_modal.jsx';
 import EditChannelPurposeModal from './edit_channel_purpose_modal.jsx';
 import ChannelInfoModal from './channel_info_modal.jsx';
 import ChannelInviteModal from './channel_invite_modal.jsx';
@@ -167,17 +168,13 @@ export default class ChannelHeader extends React.Component {
                     key='edit_header_direct'
                     role='presentation'
                 >
-                    <a
+                    <ToggleModalButton
                         role='menuitem'
-                        href='#'
-                        data-toggle='modal'
-                        data-target='#edit_channel'
-                        data-header={channel.header}
-                        data-title={channel.display_name}
-                        data-channelid={channel.id}
+                        dialogType={EditChannelModal}
+                        dialogProps={{channel}}
                     >
                         {'Set Channel Header...'}
-                    </a>
+                    </ToggleModalButton>
                 </li>
             );
         } else {
@@ -235,17 +232,13 @@ export default class ChannelHeader extends React.Component {
                     key='set_channel_header'
                     role='presentation'
                 >
-                    <a
+                    <ToggleModalButton
                         role='menuitem'
-                        href='#'
-                        data-toggle='modal'
-                        data-target='#edit_channel'
-                        data-header={channel.header}
-                        data-title={channel.display_name}
-                        data-channelid={channel.id}
+                        dialogType={EditChannelModal}
+                        dialogProps={{channel}}
                     >
-                        {'Set '}{channelTerm}{' Header...'}
-                    </a>
+                        {`Set ${channelTerm} Header...`}
+                    </ToggleModalButton>
                 </li>
             );
             dropdownContents.push(
-- 
cgit v1.2.3-1-g7c22


From 6c3a1d7039febd991db76dc176e9e57fd48ab9a4 Mon Sep 17 00:00:00 2001
From: hmhealey <harrisonmhealey@gmail.com>
Date: Mon, 16 Nov 2015 12:14:03 -0500
Subject: Renamed EditChannelModal to EditChannelHeaderModal

---
 web/react/components/channel_header.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 06d5db8b0..6e12c7c14 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -4,7 +4,7 @@
 import NavbarSearchBox from './search_bar.jsx';
 import MessageWrapper from './message_wrapper.jsx';
 import PopoverListMembers from './popover_list_members.jsx';
-import EditChannelModal from './edit_channel_modal.jsx';
+import EditChannelHeaderModal from './edit_channel_header_modal.jsx';
 import EditChannelPurposeModal from './edit_channel_purpose_modal.jsx';
 import ChannelInfoModal from './channel_info_modal.jsx';
 import ChannelInviteModal from './channel_invite_modal.jsx';
@@ -170,7 +170,7 @@ export default class ChannelHeader extends React.Component {
                 >
                     <ToggleModalButton
                         role='menuitem'
-                        dialogType={EditChannelModal}
+                        dialogType={EditChannelHeaderModal}
                         dialogProps={{channel}}
                     >
                         {'Set Channel Header...'}
@@ -234,7 +234,7 @@ export default class ChannelHeader extends React.Component {
                 >
                     <ToggleModalButton
                         role='menuitem'
-                        dialogType={EditChannelModal}
+                        dialogType={EditChannelHeaderModal}
                         dialogProps={{channel}}
                     >
                         {`Set ${channelTerm} Header...`}
-- 
cgit v1.2.3-1-g7c22

