// Presents existing information about the project to the user.
//
// Various elements of the page *may* be editable if the user has access. This
// will likely be defined by our Project data.
//
// This class should only be relevant when the Location is set to a particular
// project.
var AppActions = require('../actions/AppActions');
var Autosuggest = require('react-autosuggest');
var Location = require('../stores/Location');
var Projects = require('../stores/Projects');
var React = require('react');
var ReactBootstrap = require('react-bootstrap');
var Button = ReactBootstrap.Button;
var FormControls = ReactBootstrap.FormControls;
var Input = ReactBootstrap.Input;
var ListGroup = ReactBootstrap.ListGroup;
var ListGroupItem = ReactBootstrap.ListGroupItem;
var Panel = ReactBootstrap.Panel;
var TabbedArea = ReactBootstrap.TabbedArea;
var TabPane = ReactBootstrap.TabPane;
// Tab pane keys
var DETAILS = 1;
var MEMBERS = 2;
var ProjectDetails = React.createClass({
getInitialState: function () {
return {
project: Location.getLocation().project
};
},
componentDidMount: function() {
Projects.addMemberAddedListener(this.memberAdded);
Projects.addMemberAddFailedListener(this.memberAddFailed);
},
componentWillUnmount: function() {
Projects.removeMemberAddedListener(this.memberAdded);
Projects.removeMemberAddFailedListener(this.memberAddFailed);
},
render: function () {
var details = renderDetails(this);
var members = renderMembers(this);
return (