78 lines
1.5 KiB
CoffeeScript
78 lines
1.5 KiB
CoffeeScript
context = window
|
|
MIX_MODES = context.JK.MIX_MODES
|
|
|
|
|
|
@JamTrackSearchScreen = React.createClass({
|
|
|
|
mixins: [Reflux.listenTo(@AppStore,"onAppInit")]
|
|
|
|
LIMIT: 10
|
|
instrument_logo_map: context.JK.getInstrumentIconMap24()
|
|
|
|
|
|
getInitialState: () ->
|
|
{search: null, type: 'user-input'}
|
|
|
|
logChange: (val) ->
|
|
@logger.debug("CHANGE #{val}")
|
|
render: () ->
|
|
|
|
options = [
|
|
{ value: 'one', label: 'One' },
|
|
{ value: 'two', label: 'Two' }
|
|
];
|
|
|
|
`<div>
|
|
<div className="controls">
|
|
<Select
|
|
name="form-field-name"
|
|
value="one"
|
|
options={options}
|
|
onChange={this.logChange}
|
|
/>
|
|
</div>
|
|
<div className="content-body-scroller">
|
|
|
|
</div>
|
|
</div>`
|
|
|
|
|
|
componentDidMount: () ->
|
|
#@logger.debug("componentDidMount")
|
|
|
|
|
|
afterShow: (data) ->
|
|
@logger.debug("afterShow")
|
|
|
|
beforeShow: () ->
|
|
@setState({user: null})
|
|
|
|
|
|
onAppInit: (@app) ->
|
|
|
|
logger.debug("ON APP INI SEARCH SCREEN")
|
|
|
|
@rest = context.JK.Rest()
|
|
@logger = context.JK.logger
|
|
@screen = null
|
|
@content = null
|
|
@scroller = null
|
|
@genre = null
|
|
@artist = null
|
|
@instrument = null
|
|
@availability = null
|
|
@nextPager = null
|
|
@noMoreJamtracks = null
|
|
@currentPage = 0
|
|
@next = null
|
|
#@currentQuery = this.defaultQuery()
|
|
@expanded = null
|
|
@shownHelperBubbles = false
|
|
|
|
|
|
screenBindings =
|
|
'beforeShow': @beforeShow
|
|
'afterShow': @afterShow
|
|
|
|
@app.bindScreen('jamtrack/search', screenBindings)
|
|
}) |