2015-08-27 16:25:48 +00:00
|
|
|
context = window
|
|
|
|
|
rest = window.JK.Rest()
|
|
|
|
|
logger = context.JK.logger
|
|
|
|
|
|
|
|
|
|
@InstrumentCheckBoxList = React.createClass({
|
|
|
|
|
|
2016-01-04 23:25:29 +00:00
|
|
|
mixins: [Reflux.listenTo(@InstrumentStore,"onInstrumentsChanged")]
|
|
|
|
|
|
2016-01-28 19:55:17 +00:00
|
|
|
propTypes: {
|
|
|
|
|
onItemChanged: React.PropTypes.func.isRequired
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDefaultProps: () ->
|
|
|
|
|
selectedInstruments: []
|
|
|
|
|
|
2016-01-04 23:25:29 +00:00
|
|
|
getInitialState: () ->
|
|
|
|
|
{instruments: []}
|
|
|
|
|
|
|
|
|
|
onInstrumentsChanged: (instruments) ->
|
|
|
|
|
@setState({instruments: instruments})
|
2015-08-27 16:25:48 +00:00
|
|
|
|
|
|
|
|
render: () ->
|
|
|
|
|
`<div className="InstrumentCheckBoxList react-component">
|
2016-01-04 23:25:29 +00:00
|
|
|
<CheckBoxList objectName='instruments' onItemChanged={this.props.onItemChanged} sourceObjects={this.state.instruments} selectedObjects={this.props.selectedInstruments}/>
|
2015-08-27 16:25:48 +00:00
|
|
|
</div>`
|
|
|
|
|
})
|