36 lines
1004 B
CoffeeScript
36 lines
1004 B
CoffeeScript
context = window
|
|
|
|
@SessionRecordBtn = React.createClass({
|
|
|
|
mixins: [Reflux.listenTo(@MixerStore,"onSessionMixerChange")]
|
|
|
|
onSessionMixerChange: (sessionMixers) ->
|
|
|
|
this.setState({isRecording: sessionMixers.session.isRecording})
|
|
|
|
getInitialState: () ->
|
|
{childWindow: null, isRecording: false}
|
|
|
|
openRecording: () ->
|
|
|
|
if this.state.childWindow?
|
|
this.state.childWindow.close()
|
|
|
|
childWindow = window.open("/popups/recording-controls", 'Recording', 'scrollbars=yes,toolbar=no,status=no,height=315,width=350')
|
|
childWindow.ParentRecordingStore = context.RecordingStore
|
|
childWindow.ParentIsRecording = this.state.isRecording
|
|
|
|
###
|
|
$(childWindow).on('load', ()=>
|
|
childWindow.focus()
|
|
)
|
|
###
|
|
|
|
this.setState({childWindow: childWindow})
|
|
|
|
render: () ->
|
|
`<a className="session-record button-grey left" onClick={this.openRecording}>
|
|
<img src="/assets/content/icon_settings_sm.png" align="texttop" height="12" width="12"/>
|
|
RECORD
|
|
</a>`
|
|
}) |