summaryrefslogtreecommitdiffstats
path: root/web/react/utils/channel_intro_mssages.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-12 14:55:52 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-12 14:55:52 -0500
commitc7fe8510ce663feb26056b34fd18c0e833eb3573 (patch)
tree0367dc560667b65a9a5a7011fa277af8aecd5c0e /web/react/utils/channel_intro_mssages.jsx
parent931f4f764cbd18f1f5189e03ece83685e4dc6ffa (diff)
parent10901b4d50db171fa83e0c289d0eb34f4422f156 (diff)
downloadchat-c7fe8510ce663feb26056b34fd18c0e833eb3573.tar.gz
chat-c7fe8510ce663feb26056b34fd18c0e833eb3573.tar.bz2
chat-c7fe8510ce663feb26056b34fd18c0e833eb3573.zip
Merge branch 'release-1.2'
Diffstat (limited to 'web/react/utils/channel_intro_mssages.jsx')
-rw-r--r--web/react/utils/channel_intro_mssages.jsx19
1 files changed, 7 insertions, 12 deletions
diff --git a/web/react/utils/channel_intro_mssages.jsx b/web/react/utils/channel_intro_mssages.jsx
index 161c79761..f27e23a82 100644
--- a/web/react/utils/channel_intro_mssages.jsx
+++ b/web/react/utils/channel_intro_mssages.jsx
@@ -9,15 +9,15 @@ const ChannelStore = require('../stores/channel_store.jsx');
const Constants = require('../utils/constants.jsx');
const TeamStore = require('../stores/team_store.jsx');
-export function createChannelIntroMessage(channel) {
+export function createChannelIntroMessage(channel, showInviteModal) {
if (channel.type === 'D') {
return createDMIntroMessage(channel);
} else if (ChannelStore.isDefault(channel)) {
return createDefaultIntroMessage(channel);
} else if (channel.name === Constants.OFFTOPIC_CHANNEL) {
- return createOffTopicIntroMessage(channel);
+ return createOffTopicIntroMessage(channel, showInviteModal);
} else if (channel.type === 'O' || channel.type === 'P') {
- return createStandardIntroMessage(channel);
+ return createStandardIntroMessage(channel, showInviteModal);
}
}
@@ -71,7 +71,7 @@ export function createDMIntroMessage(channel) {
);
}
-export function createOffTopicIntroMessage(channel) {
+export function createOffTopicIntroMessage(channel, showInviteModal) {
return (
<div className='channel-intro'>
<h4 className='channel-intro__title'>{'Beginning of ' + channel.display_name}</h4>
@@ -91,10 +91,8 @@ export function createOffTopicIntroMessage(channel) {
<i className='fa fa-pencil'></i>{'Set a header'}
</a>
<a
- className='intro-links'
href='#'
- data-toggle='modal'
- data-target='#channel_invite'
+ onClick={showInviteModal}
>
<i className='fa fa-user-plus'></i>{'Invite others to this channel'}
</a>
@@ -155,7 +153,7 @@ export function createDefaultIntroMessage(channel) {
);
}
-export function createStandardIntroMessage(channel) {
+export function createStandardIntroMessage(channel, showInviteModal) {
var uiName = channel.display_name;
var creatorName = '';
@@ -206,14 +204,11 @@ export function createStandardIntroMessage(channel) {
<i className='fa fa-pencil'></i>{'Set a header'}
</a>
<a
- className='intro-links'
href='#'
- data-toggle='modal'
- data-target='#channel_invite'
+ onClick={showInviteModal}
>
<i className='fa fa-user-plus'></i>{'Invite others to this ' + uiType}
</a>
-
</div>
);
}