43 lines
1.1 KiB
CoffeeScript
43 lines
1.1 KiB
CoffeeScript
context = window
|
|
rest = window.JK.Rest()
|
|
logger = context.JK.logger
|
|
EVENTS = context.JK.EVENTS
|
|
SessionsActions = context.SessionsActions
|
|
AppStore = context.AppStore
|
|
MAX_MINUTES_SHOW_START = 15
|
|
|
|
@HoverUser = React.createClass({
|
|
|
|
render: () ->
|
|
|
|
user = this.props.user
|
|
|
|
userId = user.id
|
|
name = user.name
|
|
avatar_url = context.JK.resolveAvatarUrl(user.photo_url)
|
|
profile_url = "/client#/profile/" + userId
|
|
musician_name = name
|
|
|
|
`<tr key={userId} >
|
|
<td width="24">
|
|
<a data-user-id={userId} data-hoveraction="musician" href={profile_url} className="avatar-tiny">
|
|
<img src={avatar_url} />
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a data-user-id={userId} data-hoveraction="musician" href={profile_url}>{musician_name}</a>
|
|
</td>
|
|
<td>
|
|
<div className="instruments nowrap">{this.props.instruments}</div>
|
|
</td>
|
|
<td>
|
|
<div className="latency-badge" data-user-id={userId}>GOOD</div>
|
|
</td>
|
|
{this.props.more}
|
|
</tr>`
|
|
|
|
componentDidMount: () ->
|
|
$root = $(this.getDOMNode())
|
|
context.JK.bindHoverEvents($root, true)
|
|
})
|