summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--doc/README.md20
-rw-r--r--doc/help/Markdown.md180
-rw-r--r--doc/help/README.md18
-rw-r--r--doc/process/overview.md2
-rw-r--r--doc/usage/Markdown.md179
-rw-r--r--web/react/components/member_list_team.jsx47
-rw-r--r--web/react/components/navbar_dropdown.jsx10
-rw-r--r--web/react/components/rhs_root_post.jsx82
-rw-r--r--web/react/components/sidebar_right_menu.jsx11
-rw-r--r--web/react/components/team_members.jsx130
-rw-r--r--web/react/components/team_members_modal.jsx69
-rw-r--r--web/react/components/user_settings/user_settings_general.jsx4
-rw-r--r--web/react/pages/channel.jsx6
14 files changed, 379 insertions, 388 deletions
diff --git a/Makefile b/Makefile
index 8e7cfe3ed..b3875ffc7 100644
--- a/Makefile
+++ b/Makefile
@@ -52,9 +52,11 @@ start-docker:
echo starting mattermost-postgres; \
docker run --name mattermost-postgres -p 5432:5432 -e POSTGRES_USER=mmuser -e POSTGRES_PASSWORD=mostest \
-d postgres:9.4 > /dev/null; \
+ sleep 10; \
elif [ $(shell docker ps | grep -ci mattermost-postgres) -eq 0 ]; then \
echo restarting mattermost-postgres; \
docker start mattermost-postgres > /dev/null; \
+ sleep 10; \
fi
build-server:
@@ -74,9 +76,10 @@ build-server:
fi
cp ./model/version.go ./model/version.go.bak
- sed -i 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
- sed -i 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
- sed -i 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
+ sed -i'.make_mac_work' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
+ sed -i'.make_mac_work' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
+ sed -i'.make_mac_work' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
+ rm ./model/version.go.make_mac_work
$(GO) build $(GOFLAGS) ./...
$(GO) install $(GOFLAGS) ./...
diff --git a/doc/README.md b/doc/README.md
index d062dee65..15d1d731b 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -51,22 +51,4 @@ Procedures for upgrading the Mattermost server
## Help
-_Note: End user help documentation is a new feature being completed for the v1.2 release. The materials below are work in progress._
-
-- Getting Started
- - [Sign-in](help/Sign-in.md)
-
-- User Interface
- - Main Menu
- - [Team Settings ](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md)
- - [General Settings](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md#general)
- - [Slack Import](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md#import-from-slack-beta)
- - [Manage Members](help/Manage-Members.md)
- - Messaging
- - [Mattermost Markdown Formatting](usage/Markdown.md)
- - [Search](help/Search.md)
-
-- System Console
- - Team
- - [Team Statistics](help/system-console/Team-Statistics.md)
-
+See [End User Help](help/README.md).
diff --git a/doc/help/Markdown.md b/doc/help/Markdown.md
new file mode 100644
index 000000000..1befed8d4
--- /dev/null
+++ b/doc/help/Markdown.md
@@ -0,0 +1,180 @@
+# Markdown Help
+
+Markdown makes it easy to format messages. Type a message as you normally would, and use these rules to render it with special formatting.
+
+## Text Style:
+
+You can use either `_` or `*` around a word to make it italic. Use two to make it bold.
+
+* `_italics_` renders as _italics_
+* `**bold**` renders as **bold**
+* `**_bold-italic_**` renders as **_bold-italics_**
+* `~~strikethrough~~` renders as ~~strikethrough~~
+
+## Code Block:
+
+Create a code block by indenting each line by four spaces, or by placing ``` on the line above and below your code.
+
+Example:
+
+ ```
+ code block
+ ```
+
+Renders as:
+```
+code block
+```
+
+### Syntax Highlighting
+
+To add syntax highlighting, type the language to be highlighted after the ``` at the beginning of the code block.
+
+Supported languages are:
+`diff, apache, makefile, http, json, markdown, javascript, css, nginx, objectivec, python, xml, perl, bash, php, coffee (CoffeeScript), cs (C#), cpp (C++), sql, go, ruby, java, ini, latex`
+
+Example:
+
+ ``` go
+ package main
+ import "fmt"
+ func main() {
+ fmt.Println("Hello, 世界")
+ }
+ ```
+
+Renders as:
+``` go
+package main
+import "fmt"
+func main() {
+ fmt.Println("Hello, 世界")
+}
+```
+
+## In-line Code:
+
+Create in-line monospaced font by surrounding it with backticks.
+```
+`monospace`
+```
+Renders as: `monospace`.
+
+## Links:
+
+Create labeled links by putting the desired text in square brackets and the associated link in normal brackets.
+
+`[Check out Mattermost!](www.mattermost.com)`
+
+Renders as: [Check out Mattermost!](www.mattermost.com)
+
+## In-line Images
+
+Create in-line images using an `!` followed by the alt text in square brackets and the link in normal brackets. Add hover text by placing it in quotes after the link.
+```
+![alt text](link "hover text")
+
+and
+
+[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)
+```
+Renders as:
+
+![alt text](link "hover text")
+
+and
+
+[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)
+
+## Emojis
+
+Check out a full list of emojis [here](http://www.emoji-cheat-sheet.com/).
+
+```
+:smile: :+1: :sheep:
+```
+Renders as:
+:smile: :+1: :sheep:
+
+## Lines:
+
+Create a line by using three `*`, `_`, or `-`.
+
+`***` renders as:
+***
+
+## Block quotes:
+
+Create block quotes using `>`.
+
+`> block quotes` renders as:
+> block quotes
+
+## Lists:
+
+Create a list by using `*` or `-` as bullets. Indent a bullet point by adding two spaces in front of it.
+```
+* list item one
+* list item two
+ * item two sub-point
+```
+Renders as:
+* list item one
+* list item two
+ * item two sub-point
+
+Make it an ordered list by using numbers instead:
+```
+1. Item one
+2. Item two
+```
+Renders as:
+1. Item one
+2. Item two
+
+## Tables:
+
+Create a table by placing a dashed line under the header row and separating the columns with a pipe `|`. (The columns don’t need to line up exactly for it to work). Choose how to align table columns by including colons `:` within the header row.
+```
+| Left-Aligned | Center Aligned | Right Aligned |
+| :------------ |:---------------:| -----:|
+| Left column 1 | this text | $100 |
+| Left column 2 | is | $10 |
+| Left column 3 | centered | $1 |
+```
+
+Renders as:
+
+| Left-Aligned | Center Aligned | Right Aligned |
+| :------------ |:---------------:| -----:|
+| Left column 1 | this text | $100 |
+| Left column 2 | is | $10 |
+| Left column 3 | centered | $1 |
+
+## Headings:
+
+Make a heading by typing # and a space before your title. For smaller headings, use more #’s.
+```
+# Large heading
+## Smaller heading
+### Even smaller heading
+```
+Renders as:
+# Large Heading
+## Smaller Heading
+### Even smaller heading
+
+Alternatively, for the large heading you can underline the text using `===`. For the smaller heading you can underline using `---`
+```
+Large Heading
+=============
+
+Smaller Heading
+--------------
+```
+Renders as:
+Large Heading
+=============
+
+Smaller Heading
+--------------
diff --git a/doc/help/README.md b/doc/help/README.md
new file mode 100644
index 000000000..3b3c1709b
--- /dev/null
+++ b/doc/help/README.md
@@ -0,0 +1,18 @@
+## Help
+
+- Getting Started
+ - [Sign-in](Sign-in.md)
+
+- User Interface
+ - Main Menu
+ - [Team Settings ](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md)
+ - [General Settings](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md#general)
+ - [Slack Import](https://github.com/mattermost/platform/blob/help-docs-update/doc/help/Team-Settings.md#import-from-slack-beta)
+ - [Manage Members](Manage-Members.md)
+ - Messaging
+ - [Mattermost Markdown Formatting](help/Markdown.md)
+ - [Search](Search.md)
+
+- System Console
+ - Team
+ - [Team Statistics](system-console/Team-Statistics.md)
diff --git a/doc/process/overview.md b/doc/process/overview.md
index ca15de3a7..8109163d9 100644
--- a/doc/process/overview.md
+++ b/doc/process/overview.md
@@ -136,8 +136,6 @@ Examples:
- [Do not clear LastActivityAt for GetProfiles #1396](https://github.com/mattermost/platform/pull/1396/files)
- [Update to proxy_pass #1331](https://github.com/mattermost/platform/pull/1331)
-In general, it's
-
## Release
Mattermost ships stable releases on the 16th of the month. Releases begin with a planning process reviewing internal designs and community feedback in the context of the product purpose. Feature development is done in weekly sprints, and releases end with feature complete, stablization, code complete and release candidate milestones prior to final release.
diff --git a/doc/usage/Markdown.md b/doc/usage/Markdown.md
index dd90ede19..65e6f2121 100644
--- a/doc/usage/Markdown.md
+++ b/doc/usage/Markdown.md
@@ -1,180 +1,3 @@
# Markdown Help
-Markdown makes it easy to format messages. Type a message as you normally would, and use these rules to render it with special formatting.
-
-## Text Style:
-
-You can use either `_` or `*` around a word to make it italic. Use two to make it bold.
-
-* `_italics_` renders as _italics_
-* `**bold**` renders as **bold**
-* `**_bold-italic_**` renders as **_bold-italics_**
-* `~~strikethrough~~` renders as ~~strikethrough~~
-
-## Code Block:
-
-Create a code block by indenting each line by four spaces, or by placing ``` on the line above and below your code.
-
-Example:
-
- ```
- code block
- ```
-
-Renders as:
-```
-code block
-```
-
-### Syntax Highlighting
-
-To add syntax highlighting, type the language to be highlighted after the ``` at the beginning of the code block.
-
-Supported languages are:
-`diff, apache, makefile, http, json, markdown, javascript, css, nginx, objectivec, python, xml, perl, bash, php, coffee (CoffeeScript), cs (C#), cpp (C++), sql, go, ruby, java, ini, latex`
-
-Example:
-
- ``` go
- package main
- import "fmt"
- func main() {
- fmt.Println("Hello, 世界")
- }
- ```
-
-Renders as:
-``` go
-package main
-import "fmt"
-func main() {
- fmt.Println("Hello, 世界")
-}
-```
-
-## In-line Code:
-
-Create in-line monospaced font by surrounding it with backticks.
-```
-`monospace`
-```
-Renders as: `monospace`.
-
-## Links:
-
-Create labeled links by putting the desired text in square brackets and the associated link in normal brackets.
-
-`[Check out Mattermost!](www.mattermost.com)`
-
-Renders as: [Check out Mattermost!](www.mattermost.com)
-
-## In-line Images
-
-Create in-line images using an `!` followed by the alt text in square brackets and the link in normal brackets. Add hover text by placing it in quotes after the link.
-```
-![alt text](link "hover text")
-
-and
-
-[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)
-```
-Renders as:
-
-![alt text](link "hover text")
-
-and
-
-[![Build Status](https://travis-ci.org/mattermost/platform.svg?branch=master)](https://travis-ci.org/mattermost/platform) [![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform)
-
-## Emojis
-
-Check out a full list of emojis [here](http://www.emoji-cheat-sheet.com/).
-
-```
-:smile: :+1: :sheep:
-```
-Renders as:
-:smile: :+1: :sheep:
-
-## Lines:
-
-Create a line by using three `*`, `_`, or `-`.
-
-`***` renders as:
-***
-
-## Block quotes:
-
-Create block quotes using `>`.
-
-`> block quotes` renders as:
-> block quotes
-
-## Lists:
-
-Create a list by using `*` or `-` as bullets. Indent a bullet point by adding two spaces in front of it.
-```
-* list item one
-* list item two
- * item two sub-point
-```
-Renders as:
-* list item one
-* list item two
- * item two sub-point
-
-Make it an ordered list by using numbers instead:
-```
-1. Item one
-2. Item two
-```
-Renders as:
-1. Item one
-2. Item two
-
-## Tables:
-
-Create a table by placing a dashed line under the header row and separating the columns with a pipe `|`. (The columns don’t need to line up exactly for it to work). Choose how to align table columns by including colons `:` within the header row.
-```
-| Left-Aligned  | Center Aligned  | Right Aligned |
-| :------------ |:---------------:| -----:|
-| Left column 1 | this text       |  $100 |
-| Left column 2 | is              |   $10 |
-| Left column 3 | centered        |    $1 |
-```
-
-Renders as:
-
-| Left-Aligned  | Center Aligned  | Right Aligned |
-| :------------ |:---------------:| -----:|
-| Left column 1 | this text       |  $100 |
-| Left column 2 | is              |   $10 |
-| Left column 3 | centered        |    $1 |
-
-## Headings:
-
-Make a heading by typing # and a space before your title. For smaller headings, use more #’s.
-```
-# Large heading
-## Smaller heading
-### Even smaller heading
-```
-Renders as:
-# Large Heading
-## Smaller Heading
-### Even smaller heading
-
-Alternatively, for the large heading you can underline the text using `===`. For the smaller heading you can underline using `---`
-```
-Large Heading
-=============
-
-Smaller Heading
---------------
-```
-Renders as:
-Large Heading
-=============
-
-Smaller Heading
---------------
+Moved to [help/Markdown.md](../help/Markdown.md)
diff --git a/web/react/components/member_list_team.jsx b/web/react/components/member_list_team.jsx
index 72fdb7be9..f1c31131f 100644
--- a/web/react/components/member_list_team.jsx
+++ b/web/react/components/member_list_team.jsx
@@ -2,17 +2,56 @@
// See License.txt for license information.
import MemberListTeamItem from './member_list_team_item.jsx';
+import UserStore from '../stores/user_store.jsx';
export default class MemberListTeam extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.getUsers = this.getUsers.bind(this);
+ this.onChange = this.onChange.bind(this);
+
+ this.state = {
+ users: this.getUsers()
+ };
+ }
+
+ componentDidMount() {
+ UserStore.addChangeListener(this.onChange);
+ }
+
+ componentWillUnmount() {
+ UserStore.removeChangeListener(this.onChange);
+ }
+
+ getUsers() {
+ const profiles = UserStore.getProfiles();
+ const users = [];
+
+ for (const id of Object.keys(profiles)) {
+ users.push(profiles[id]);
+ }
+
+ users.sort((a, b) => a.username.localeCompare(b.username));
+
+ return users;
+ }
+
+ onChange() {
+ this.setState({
+ users: this.getUsers()
+ });
+ }
+
render() {
- const memberList = this.props.users.map(function makeListItem(user) {
+ const memberList = this.state.users.map((user) => {
return (
<MemberListTeamItem
key={user.id}
user={user}
/>
);
- }, this);
+ });
return (
<table className='table more-table member-list-holder'>
@@ -23,7 +62,3 @@ export default class MemberListTeam extends React.Component {
);
}
}
-
-MemberListTeam.propTypes = {
- users: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
-};
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index a14434bfc..c286ee6f9 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -8,6 +8,8 @@ import TeamStore from '../stores/team_store.jsx';
import * as EventHelpers from '../dispatcher/event_helpers.jsx';
import AboutBuildModal from './about_build_modal.jsx';
+import TeamMembersModal from './team_members_modal.jsx';
+import ToggleModalButton from './toggle_modal_button.jsx';
import UserSettingsModal from './user_settings/user_settings_modal.jsx';
import Constants from '../utils/constants.jsx';
@@ -117,13 +119,9 @@ export default class NavbarDropdown extends React.Component {
if (isAdmin) {
manageLink = (
<li>
- <a
- href='#'
- data-toggle='modal'
- data-target='#team_members'
- >
+ <ToggleModalButton dialogType={TeamMembersModal}>
{'Manage Members'}
- </a>
+ </ToggleModalButton>
</li>
);
diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx
index 8142888ba..3d3d9e13f 100644
--- a/web/react/components/rhs_root_post.jsx
+++ b/web/react/components/rhs_root_post.jsx
@@ -38,7 +38,9 @@ export default class RhsRootPost extends React.Component {
}
render() {
var post = this.props.post;
- var isOwner = UserStore.getCurrentId() === post.user_id;
+ var currentUser = UserStore.getCurrentUser();
+ var isOwner = currentUser.id === post.user_id;
+ var isAdmin = utils.isAdmin(currentUser.roles);
var timestamp = UserStore.getProfile(post.user_id).update_at;
var channel = ChannelStore.get(post.channel_id);
@@ -61,11 +63,54 @@ export default class RhsRootPost extends React.Component {
}
}
- var ownerOptions;
+ var dropdownContents = [];
+
if (isOwner) {
- ownerOptions = (
- <div>
- <a href='#'
+ dropdownContents.push(
+ <li
+ key='rhs-root-edit'
+ role='presentation'
+ >
+ <a
+ href='#'
+ role='menuitem'
+ data-toggle='modal'
+ data-target='#edit_post'
+ data-refocusid='#reply_textbox'
+ data-title={type}
+ data-message={post.message}
+ data-postid={post.id}
+ data-channelid={post.channel_id}
+ >
+ {'Edit'}
+ </a>
+ </li>
+ );
+ }
+
+ if (isOwner || isAdmin) {
+ dropdownContents.push(
+ <li
+ key='rhs-root-delete'
+ role='presentation'
+ >
+ <a
+ href='#'
+ role='menuitem'
+ onClick={() => EventHelpers.showDeletePostModal(post, this.props.commentCount)}
+ >
+ {'Delete'}
+ </a>
+ </li>
+ );
+ }
+
+ var rootOptions = '';
+ if (dropdownContents.length > 0) {
+ rootOptions = (
+ <div className='dropdown'>
+ <a
+ href='#'
className='post__dropdown dropdown-toggle'
type='button'
data-toggle='dropdown'
@@ -75,30 +120,7 @@ export default class RhsRootPost extends React.Component {
className='dropdown-menu'
role='menu'
>
- <li role='presentation'>
- <a
- href='#'
- role='menuitem'
- data-toggle='modal'
- data-target='#edit_post'
- data-refocusid='#reply_textbox'
- data-title={type}
- data-message={post.message}
- data-postid={post.id}
- data-channelid={post.channel_id}
- >
- {'Edit'}
- </a>
- </li>
- <li role='presentation'>
- <a
- href='#'
- role='menuitem'
- onClick={() => EventHelpers.showDeletePostModal(post, this.props.commentCount)}
- >
- {'Delete'}
- </a>
- </li>
+ {dropdownContents}
</ul>
</div>
);
@@ -166,7 +188,7 @@ export default class RhsRootPost extends React.Component {
</li>
<li className='col col__reply'>
<div className='dropdown'>
- {ownerOptions}
+ {rootOptions}
</div>
</li>
</ul>
diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx
index 0525eca4b..1f268a2f7 100644
--- a/web/react/components/sidebar_right_menu.jsx
+++ b/web/react/components/sidebar_right_menu.jsx
@@ -1,6 +1,8 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
+import TeamMembersModal from './team_members_modal.jsx';
+import ToggleModalButton from './toggle_modal_button.jsx';
import UserSettingsModal from './user_settings/user_settings_modal.jsx';
import UserStore from '../stores/user_store.jsx';
import * as client from '../utils/client.jsx';
@@ -78,12 +80,9 @@ export default class SidebarRightMenu extends React.Component {
);
manageLink = (
<li>
- <a
- href='#'
- data-toggle='modal'
- data-target='#team_members'
- >
- <i className='fa fa-users'></i>Manage Members</a>
+ <ToggleModalButton dialogType={TeamMembersModal}>
+ <i className='fa fa-users'></i>{'Manage Members'}
+ </ToggleModalButton>
</li>
);
}
diff --git a/web/react/components/team_members.jsx b/web/react/components/team_members.jsx
deleted file mode 100644
index cd0766012..000000000
--- a/web/react/components/team_members.jsx
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import UserStore from '../stores/user_store.jsx';
-import MemberListTeam from './member_list_team.jsx';
-import * as utils from '../utils/utils.jsx';
-
-function getStateFromStores() {
- var users = UserStore.getProfiles();
- var memberList = [];
- for (var id in users) {
- if (users.hasOwnProperty(id)) {
- memberList.push(users[id]);
- }
- }
-
- memberList.sort(function sort(a, b) {
- if (a.username < b.username) {
- return -1;
- }
-
- if (a.username > b.username) {
- return 1;
- }
-
- return 0;
- });
-
- return {
- member_list: memberList
- };
-}
-
-export default class TeamMembers extends React.Component {
- constructor(props) {
- super(props);
-
- this.onChange = this.onChange.bind(this);
-
- this.state = getStateFromStores();
- }
-
- componentDidMount() {
- UserStore.addChangeListener(this.onChange);
-
- var self = this;
- $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', function show() {
- self.setState({render_members: false});
- });
-
- $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function hide() {
- self.setState({render_members: true});
- });
- }
-
- componentWillUnmount() {
- UserStore.removeChangeListener(this.onChange);
- }
-
- onChange() {
- var newState = getStateFromStores();
- if (!utils.areObjectsEqual(newState, this.state)) {
- this.setState(newState);
- }
- }
-
- render() {
- var serverError = null;
-
- if (this.state.server_error) {
- serverError = <label className='has-error control-label'>{this.state.server_error}</label>;
- }
-
- var renderMembers = '';
-
- if (this.state.render_members) {
- renderMembers = <MemberListTeam users={this.state.member_list} />;
- }
-
- return (
- <div
- className='modal fade more-modal'
- ref='modal'
- id='team_members'
- tabIndex='-1'
- role='dialog'
- aria-hidden='true'
- >
- <div className='modal-dialog'>
- <div className='modal-content'>
- <div className='modal-header'>
- <button
- type='button'
- className='close'
- data-dismiss='modal'
- aria-label='Close'
- >
- <span aria-hidden='true'>×</span>
- </button>
- <h4
- className='modal-title'
- id='myModalLabel'
- >{this.props.teamDisplayName + ' Members'}</h4>
- </div>
- <div
- ref='modalBody'
- className='modal-body'
- >
- <div className='team-member-list'>
- {renderMembers}
- </div>
- {serverError}
- </div>
- <div className='modal-footer'>
- <button
- type='button'
- className='btn btn-default'
- data-dismiss='modal'
- >Close</button>
- </div>
- </div>
- </div>
- </div>
- );
- }
-}
-
-TeamMembers.propTypes = {
- teamDisplayName: React.PropTypes.string
-};
diff --git a/web/react/components/team_members_modal.jsx b/web/react/components/team_members_modal.jsx
new file mode 100644
index 000000000..0a30a2202
--- /dev/null
+++ b/web/react/components/team_members_modal.jsx
@@ -0,0 +1,69 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import MemberListTeam from './member_list_team.jsx';
+import TeamStore from '../stores/team_store.jsx';
+
+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() {
+ $(ReactDOM.findDOMNode(this.refs.modalBody)).css('max-height', $(window).height() - 300);
+ if ($(window).width() > 768) {
+ $(ReactDOM.findDOMNode(this.refs.modalBody)).perfectScrollbar();
+ }
+ }
+
+ render() {
+ const team = TeamStore.getCurrent();
+
+ return (
+ <Modal
+ dialogClassName='team-members-modal'
+ show={this.props.show}
+ onHide={this.props.onHide}
+ >
+ <Modal.Header closeButton={true}>
+ {team.display_name + ' Members'}
+ </Modal.Header>
+ <Modal.Body ref='modalBody'>
+ <div className='team-member-list'>
+ <MemberListTeam />
+ </div>
+ </Modal.Body>
+ <Modal.Footer>
+ <button
+ type='button'
+ className='btn btn-default'
+ onClick={this.props.onHide}
+ >
+ {'Close'}
+ </button>
+ </Modal.Footer>
+ </Modal>
+ );
+ }
+}
+
+TeamMembersModal.propTypes = {
+ show: React.PropTypes.bool.isRequired,
+ onHide: React.PropTypes.func.isRequired
+};
diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx
index b3ec7ddd7..962efd7a2 100644
--- a/web/react/components/user_settings/user_settings_general.jsx
+++ b/web/react/components/user_settings/user_settings_general.jsx
@@ -438,12 +438,12 @@ export default class UserSettingsGeneralTab extends React.Component {
if (this.props.activeSection === 'email') {
const emailEnabled = global.window.mm_config.SendEmailNotifications === 'true';
const emailVerificationEnabled = global.window.mm_config.RequireEmailVerification === 'true';
- let helpText = 'Email is used for notifications, and requires verification if changed.';
+ let helpText = 'Email is used for sign-in, notifications, and password reset. Email requires verification if changed.';
if (!emailEnabled) {
helpText = <div className='setting-list__hint text-danger'>{'Email has been disabled by your system administrator. No notification emails will be sent until it is enabled.'}</div>;
} else if (!emailVerificationEnabled) {
- helpText = 'Email is used for notifications.';
+ helpText = 'Email is used for sign-in, notifications, and password reset.';
} else if (this.state.emailChangeInProgress) {
const newEmail = UserStore.getCurrentUser().email;
if (newEmail) {
diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx
index 161e6ab22..b73dfdafe 100644
--- a/web/react/pages/channel.jsx
+++ b/web/react/pages/channel.jsx
@@ -14,7 +14,6 @@ import DeletePostModal from '../components/delete_post_modal.jsx';
import MoreChannelsModal from '../components/more_channels.jsx';
import PostDeletedModal from '../components/post_deleted_modal.jsx';
import TeamSettingsModal from '../components/team_settings_modal.jsx';
-import TeamMembersModal from '../components/team_members.jsx';
import RemovedFromChannelModal from '../components/removed_from_channel_modal.jsx';
import RegisterAppModal from '../components/register_app_modal.jsx';
import ImportThemeModal from '../components/user_settings/import_theme_modal.jsx';
@@ -87,11 +86,6 @@ function setupChannelPage(props, team, channel) {
);
ReactDOM.render(
- <TeamMembersModal teamDisplayName={props.TeamDisplayName} />,
- document.getElementById('team_members_modal')
- );
-
- ReactDOM.render(
<RenameChannelModal />,
document.getElementById('rename_channel_modal')
);