mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
remove constructor, handle load async process
This commit is contained in:
parent
b88ca10f21
commit
e7f221813e
1 changed files with 3 additions and 5 deletions
|
@ -39,12 +39,10 @@ module.exports = class LadderView extends RootView
|
||||||
'click a:not([data-toggle])': 'onClickedLink'
|
'click a:not([data-toggle])': 'onClickedLink'
|
||||||
'click .spectate-button': 'onClickSpectateButton'
|
'click .spectate-button': 'onClickSpectateButton'
|
||||||
|
|
||||||
constructor: (options, @levelID, @leagueType, @leagueID) ->
|
initialize: (options, @levelID, @leagueType, @leagueID) ->
|
||||||
super(options)
|
|
||||||
|
|
||||||
initialize: ->
|
|
||||||
@level = @supermodel.loadModel(new Level(_id: @levelID)).model
|
@level = @supermodel.loadModel(new Level(_id: @levelID)).model
|
||||||
@levelDescription = marked(@level.get('description')) if @level.get('description')
|
@level.once 'sync', =>
|
||||||
|
@levelDescription = marked(@level.get('description')) if @level.get('description')
|
||||||
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model
|
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model
|
||||||
@winners = require('./tournament_results')[@levelID]
|
@winners = require('./tournament_results')[@levelID]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue