summaryrefslogtreecommitdiffstats
path: root/web/react/pages
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/pages')
-rw-r--r--web/react/pages/channel.jsx31
-rw-r--r--web/react/pages/find_team.jsx6
-rw-r--r--web/react/pages/home.jsx9
-rw-r--r--web/react/pages/login.jsx11
-rw-r--r--web/react/pages/password_reset.jsx12
-rw-r--r--web/react/pages/signup_team.jsx6
-rw-r--r--web/react/pages/signup_team_complete.jsx13
-rw-r--r--web/react/pages/signup_user_complete.jsx15
-rw-r--r--web/react/pages/verify.jsx5
9 files changed, 69 insertions, 39 deletions
diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx
index 98014ed12..d56b309fa 100644
--- a/web/react/pages/channel.jsx
+++ b/web/react/pages/channel.jsx
@@ -26,13 +26,13 @@ var ChannelMembersModal = require('../components/channel_members.jsx');
var ChannelInviteModal = require('../components/channel_invite_modal.jsx');
var TeamMembersModal = require('../components/team_members.jsx');
var DirectChannelModal = require('../components/more_direct_channels.jsx');
-var ErrorBar = require('../components/error_bar.jsx')
+var ErrorBar = require('../components/error_bar.jsx');
var ChannelLoader = require('../components/channel_loader.jsx');
var MentionList = require('../components/mention_list.jsx');
var ChannelInfoModal = require('../components/channel_info_modal.jsx');
var AccessHistoryModal = require('../components/access_history_modal.jsx');
var ActivityLogModal = require('../components/activity_log_modal.jsx');
-var RemovedFromChannelModal = require('../components/removed_from_channel_modal.jsx')
+var RemovedFromChannelModal = require('../components/removed_from_channel_modal.jsx');
var FileUploadOverlay = require('../components/file_upload_overlay.jsx');
var AsyncClient = require('../utils/async_client.jsx');
@@ -40,18 +40,18 @@ var AsyncClient = require('../utils/async_client.jsx');
var Constants = require('../utils/constants.jsx');
var ActionTypes = Constants.ActionTypes;
-global.window.setup_channel_page = function(team_name, team_type, team_id, channel_name, channel_id) {
+function setupChannelPage(teamName, teamType, teamId, channelName, channelId) {
AsyncClient.getConfig();
AppDispatcher.handleViewAction({
type: ActionTypes.CLICK_CHANNEL,
- name: channel_name,
- id: channel_id
+ name: channelName,
+ id: channelId
});
AppDispatcher.handleViewAction({
type: ActionTypes.CLICK_TEAM,
- id: team_id
+ id: teamId
});
// ChannelLoader must be rendered first
@@ -66,12 +66,14 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
- <Navbar teamDisplayName={team_name} />,
+ <Navbar teamDisplayName={teamName} />,
document.getElementById('navbar')
);
React.render(
- <Sidebar teamDisplayName={team_name} teamType={team_type} />,
+ <Sidebar
+ teamDisplayName={teamName}
+ teamType={teamType} />,
document.getElementById('sidebar-left')
);
@@ -86,17 +88,17 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
- <TeamSettingsModal teamDisplayName={team_name} />,
+ <TeamSettingsModal teamDisplayName={teamName} />,
document.getElementById('team_settings_modal')
);
React.render(
- <TeamMembersModal teamDisplayName={team_name} />,
+ <TeamMembersModal teamDisplayName={teamName} />,
document.getElementById('team_members_modal')
);
React.render(
- <MemberInviteModal teamType={team_type} />,
+ <MemberInviteModal teamType={teamType} />,
document.getElementById('invite_member_modal')
);
@@ -186,7 +188,9 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
);
React.render(
- <SidebarRightMenu teamDisplayName={team_name} teamType={team_type} />,
+ <SidebarRightMenu
+ teamDisplayName={teamName}
+ teamType={teamType} />,
document.getElementById('sidebar-menu')
);
@@ -225,5 +229,6 @@ global.window.setup_channel_page = function(team_name, team_type, team_id, chann
overlayType='center' />,
document.getElementById('file_upload_overlay')
);
+}
-};
+global.window.setup_channel_page = setupChannelPage;
diff --git a/web/react/pages/find_team.jsx b/web/react/pages/find_team.jsx
index 5346c0cf0..dd11857ac 100644
--- a/web/react/pages/find_team.jsx
+++ b/web/react/pages/find_team.jsx
@@ -3,11 +3,11 @@
var FindTeam = require('../components/find_team.jsx');
-global.window.setup_find_team_page = function() {
-
+function setupFindTeamPage() {
React.render(
<FindTeam />,
document.getElementById('find-team')
);
+}
-};
+global.window.setup_find_team_page = setupFindTeamPage;
diff --git a/web/react/pages/home.jsx b/web/react/pages/home.jsx
index b12fa4949..18553542c 100644
--- a/web/react/pages/home.jsx
+++ b/web/react/pages/home.jsx
@@ -2,14 +2,15 @@
// See License.txt for license information.
var ChannelStore = require('../stores/channel_store.jsx');
-var TeamStore = require('../stores/team_store.jsx');
var Constants = require('../utils/constants.jsx');
-global.window.setup_home_page = function(teamURL) {
+function setupHomePage(teamURL) {
var last = ChannelStore.getLastVisitedName();
if (last == null || last.length === 0) {
- window.location = teamURL + "/channels/" + Constants.DEFAULT_CHANNEL;
+ window.location = teamURL + '/channels/' + Constants.DEFAULT_CHANNEL;
} else {
- window.location = teamURL + "/channels/" + last;
+ window.location = teamURL + '/channels/' + last;
}
}
+
+global.window.setup_home_page = setupHomePage;
diff --git a/web/react/pages/login.jsx b/web/react/pages/login.jsx
index 6e7528373..e7305889d 100644
--- a/web/react/pages/login.jsx
+++ b/web/react/pages/login.jsx
@@ -3,9 +3,14 @@
var Login = require('../components/login.jsx');
-global.window.setup_login_page = function(team_display_name, team_name, auth_services) {
+function setupLoginPage(teamDisplayName, teamName, authServices) {
React.render(
- <Login teamDisplayName={team_display_name} teamName={team_name} authServices={auth_services} />,
+ <Login
+ teamDisplayName={teamDisplayName}
+ teamName={teamName}
+ authServices={authServices} />,
document.getElementById('login')
);
-};
+}
+
+global.window.setup_login_page = setupLoginPage;
diff --git a/web/react/pages/password_reset.jsx b/web/react/pages/password_reset.jsx
index c7a208973..2ca468bea 100644
--- a/web/react/pages/password_reset.jsx
+++ b/web/react/pages/password_reset.jsx
@@ -3,17 +3,17 @@
var PasswordReset = require('../components/password_reset.jsx');
-global.window.setup_password_reset_page = function(is_reset, team_display_name, team_name, hash, data) {
-
+function setupPasswordResetPage(isReset, teamDisplayName, teamName, hash, data) {
React.render(
<PasswordReset
- isReset={is_reset}
- teamDisplayName={team_display_name}
- teamName={team_name}
+ isReset={isReset}
+ teamDisplayName={teamDisplayName}
+ teamName={teamName}
hash={hash}
data={data}
/>,
document.getElementById('reset')
);
+}
-};
+global.window.setup_password_reset_page = setupPasswordResetPage;
diff --git a/web/react/pages/signup_team.jsx b/web/react/pages/signup_team.jsx
index 4b58025ac..e9e803aa4 100644
--- a/web/react/pages/signup_team.jsx
+++ b/web/react/pages/signup_team.jsx
@@ -5,7 +5,7 @@ var SignupTeam = require('../components/signup_team.jsx');
var AsyncClient = require('../utils/async_client.jsx');
-global.window.setup_signup_team_page = function(authServices) {
+function setupSignupTeamPage(authServices) {
AsyncClient.getConfig();
var services = JSON.parse(authServices);
@@ -14,4 +14,6 @@ global.window.setup_signup_team_page = function(authServices) {
<SignupTeam services={services} />,
document.getElementById('signup-team')
);
-};
+}
+
+global.window.setup_signup_team_page = setupSignupTeamPage;
diff --git a/web/react/pages/signup_team_complete.jsx b/web/react/pages/signup_team_complete.jsx
index 71806c2ea..43e3aae65 100644
--- a/web/react/pages/signup_team_complete.jsx
+++ b/web/react/pages/signup_team_complete.jsx
@@ -1,11 +1,16 @@
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
-var SignupTeamComplete =require('../components/signup_team_complete.jsx');
+var SignupTeamComplete = require('../components/signup_team_complete.jsx');
-global.window.setup_signup_team_complete_page = function(email, data, hash) {
+function setupSignupTeamCompletePage(email, data, hash) {
React.render(
- <SignupTeamComplete email={email} hash={hash} data={data}/>,
+ <SignupTeamComplete
+ email={email}
+ hash={hash}
+ data={data}/>,
document.getElementById('signup-team-complete')
);
-};
+}
+
+global.window.setup_signup_team_complete_page = setupSignupTeamCompletePage;
diff --git a/web/react/pages/signup_user_complete.jsx b/web/react/pages/signup_user_complete.jsx
index 8f9be1f94..71b526e5d 100644
--- a/web/react/pages/signup_user_complete.jsx
+++ b/web/react/pages/signup_user_complete.jsx
@@ -3,9 +3,18 @@
var SignupUserComplete = require('../components/signup_user_complete.jsx');
-global.window.setup_signup_user_complete_page = function(email, name, ui_name, id, data, hash, auth_services) {
+function setupSignupUserCompletePage(email, name, uiName, id, data, hash, authServices) {
React.render(
- <SignupUserComplete teamId={id} teamName={name} teamDisplayName={ui_name} email={email} hash={hash} data={data} authServices={auth_services} />,
+ <SignupUserComplete
+ teamId={id}
+ teamName={name}
+ teamDisplayName={uiName}
+ email={email}
+ hash={hash}
+ data={data}
+ authServices={authServices} />,
document.getElementById('signup-user-complete')
);
-};
+}
+
+global.window.setup_signup_user_complete_page = setupSignupUserCompletePage;
diff --git a/web/react/pages/verify.jsx b/web/react/pages/verify.jsx
index 96b556983..f42913315 100644
--- a/web/react/pages/verify.jsx
+++ b/web/react/pages/verify.jsx
@@ -5,7 +5,10 @@ var EmailVerify = require('../components/email_verify.jsx');
global.window.setupVerifyPage = function setupVerifyPage(isVerified, teamURL, userEmail) {
React.render(
- <EmailVerify isVerified={isVerified} teamURL={teamURL} userEmail={userEmail} />,
+ <EmailVerify
+ isVerified={isVerified}
+ teamURL={teamURL}
+ userEmail={userEmail} />,
document.getElementById('verify')
);
};