/*** @jsx React.DOM */ var card_management = React.createClass({ getInitialState: function(props) { return { users: window.users, user_search: { card: '', }, searching: false, }; }, searchUsers: function(event) { this.setState({searching: true}); AJAX.post( Link.get('searchusers'), {user_search: this.state.user_search}, function(response) { this.setState({ users: response.users, searching: false, }); }.bind(this) ); event.preventDefault(); }, renderID: function(user) { return {user.id}; }, sortID: function(a, b) { return a.id - b.id; }, renderUsername: function(user) { return user.username ? {user.username} : anonymous account; }, sortUsername: function(a, b) { var au = a.username ? a.username : ''; var bu = b.username ? b.username : ''; return au.localeCompare(bu); }, renderEmail: function(user) { return user.email ? {user.email} : no email; }, sortEmail: function(a, b) { var ae = a.email ? a.email : ''; var be = b.email ? b.email : ''; return ae.localeCompare(be); }, renderEditButton: function(user) { return (