summaryrefslogtreecommitdiffstats
path: root/web/react/components/team_settings_modal.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-06-18 10:40:46 -0400
committerJoramWilander <jwawilander@gmail.com>2015-06-18 10:40:46 -0400
commit308c4f3ce9330f4ac04cc04495533e6f2ad87f53 (patch)
tree8b632d86e86855fe52e35ebf32d65a79db605e74 /web/react/components/team_settings_modal.jsx
parent1dc3a5f26d95ca87f2bfe1a57caa4ac9b077434a (diff)
downloadchat-308c4f3ce9330f4ac04cc04495533e6f2ad87f53.tar.gz
chat-308c4f3ce9330f4ac04cc04495533e6f2ad87f53.tar.bz2
chat-308c4f3ce9330f4ac04cc04495533e6f2ad87f53.zip
added team store, team settings menu, and the ability to turn on valet feature from client
Diffstat (limited to 'web/react/components/team_settings_modal.jsx')
-rw-r--r--web/react/components/team_settings_modal.jsx63
1 files changed, 63 insertions, 0 deletions
diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx
new file mode 100644
index 000000000..08a952d2e
--- /dev/null
+++ b/web/react/components/team_settings_modal.jsx
@@ -0,0 +1,63 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+var SettingsSidebar = require('./settings_sidebar.jsx');
+var TeamSettings = require('./team_settings.jsx');
+
+module.exports = React.createClass({
+ componentDidMount: function() {
+ $('body').on('click', '.modal-back', function(){
+ $(this).closest('.modal-dialog').removeClass('display--content');
+ });
+ $('body').on('click', '.modal-header .close', function(){
+ setTimeout(function() {
+ $('.modal-dialog.display--content').removeClass('display--content');
+ }, 500);
+ });
+ },
+ updateTab: function(tab) {
+ this.setState({ active_tab: tab });
+ },
+ updateSection: function(section) {
+ this.setState({ active_section: section });
+ },
+ getInitialState: function() {
+ return { active_tab: "feature", active_section: "" };
+ },
+ render: function() {
+ var tabs = [];
+ tabs.push({name: "feature", ui_name: "Features", icon: "glyphicon glyphicon-wrench"});
+
+ return (
+ <div className="modal fade" ref="modal" id="team_settings" role="dialog" aria-hidden="true">
+ <div className="modal-dialog settings-modal">
+ <div className="modal-content">
+ <div className="modal-header">
+ <button type="button" className="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 className="modal-title" ref="title">Team Settings</h4>
+ </div>
+ <div className="modal-body">
+ <div className="settings-table">
+ <div className="settings-links">
+ <SettingsSidebar
+ tabs={tabs}
+ activeTab={this.state.active_tab}
+ updateTab={this.updateTab}
+ />
+ </div>
+ <div className="settings-content">
+ <TeamSettings
+ activeTab={this.state.active_tab}
+ activeSection={this.state.active_section}
+ updateSection={this.updateSection}
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ }
+});
+