2015-07-15 15:04:45 +00:00
|
|
|
context = window
|
|
|
|
|
|
|
|
|
|
@SessionNotification = React.createClass({
|
|
|
|
|
|
|
|
|
|
render: () ->
|
|
|
|
|
|
|
|
|
|
classes = classNames({
|
|
|
|
|
'session-notification' : true
|
|
|
|
|
'has-details' : @props.detail?
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
help = `<a rel="external" href={this.props.help} className="notify-help">?</a>` if @props.help?
|
|
|
|
|
|
|
|
|
|
title = `<div className="msg">{this.props.title}{help}</div>`
|
|
|
|
|
extra = `<div className="detail">{this.props.extra}</div>` if @props.extra?
|
|
|
|
|
|
|
|
|
|
`<div className={classes}>
|
|
|
|
|
{title}
|
|
|
|
|
{extra}
|
|
|
|
|
</div>`
|
|
|
|
|
|
|
|
|
|
componentDidMount: () ->
|
|
|
|
|
|
|
|
|
|
$root = $(@getDOMNode())
|
|
|
|
|
context.JK.popExternalLinks($root)
|
|
|
|
|
|
|
|
|
|
if @props.detail?
|
2020-09-27 16:24:22 +00:00
|
|
|
context.JK.hoverBubble($root, @props.detail, {offsetParent:$root.closest('.screen'), positions: ['left', 'bottom']})
|
2015-07-15 15:04:45 +00:00
|
|
|
})
|