Code simplification and rebasing

Этот коммит содержится в:
Reed Garmsen
2015-07-16 09:21:51 -07:00
родитель 15b90ff72f
Коммит cb4cd741a4
2 изменённых файлов: 6 добавлений и 32 удалений

Просмотреть файл

@@ -6,19 +6,8 @@ module.exports = React.createClass({
handleClick: function() {
this.props.handleClick(this.props.username);
},
select: function() {
this.setState({ isFocused: "mentions-focus" });
},
deselect: function() {
this.setState({ isFocused: "" });
},
getInitialState: function() {
if (this.props.isFocus) {
return { isFocused: "mentions-focus" };
}
else {
return { isFocused: "" };
}
return null;
},
render: function() {
var self = this;
@@ -32,7 +21,7 @@ module.exports = React.createClass({
icon = <span><i className="mention-img fa fa-users fa-2x"></i></span>;
}
return (
<div className={"mentions-name " + this.state.isFocused} id={this.props.id + "_mentions"} onClick={this.handleClick} onMouseEnter={function(){self.props.handleMouseEnter(self.props.listId)}}>
<div className={"mentions-name " + this.props.isFocused} id={this.props.id + "_mentions"} onClick={this.handleClick} onMouseEnter={this.props.handleMouseEnter}>
<div className="pull-left">{icon}</div>
<div className="pull-left mention-align"><span>@{this.props.username}</span><span className="mention-fullname">{this.props.secondary_text}</span></div>
</div>