mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 14:33:59 -04:00
Add loading indicators, hide UI pre-load for /play
This commit is contained in:
parent
8838095a0c
commit
aee2f7c219
1 changed files with 10 additions and 1 deletions
|
@ -70,7 +70,7 @@ module.exports = class CampaignView extends RootView
|
|||
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(), 'your_sessions', {cache: false}, 0).model
|
||||
@listenToOnce @sessions, 'sync', @onSessionsLoaded
|
||||
unless @terrain
|
||||
@campaigns = @supermodel.loadCollection(new CampaignsCollection(), 'campaigns', null, 0).model
|
||||
@campaigns = @supermodel.loadCollection(new CampaignsCollection(), 'campaigns', null, 1).model
|
||||
@listenToOnce @campaigns, 'sync', @onCampaignsLoaded
|
||||
return
|
||||
|
||||
|
@ -127,6 +127,15 @@ module.exports = class CampaignView extends RootView
|
|||
clearInterval @portalScrollInterval
|
||||
super()
|
||||
|
||||
showLoading: ($el) ->
|
||||
unless @campaign
|
||||
@$el.find('.game-controls, .user-status').addClass 'hidden'
|
||||
@$el.find('.portal .campaign-name span').text $.i18n.t 'common.loading'
|
||||
|
||||
hideLoading: ->
|
||||
unless @campaign
|
||||
@$el.find('.game-controls, .user-status').removeClass 'hidden'
|
||||
|
||||
getLevelPlayCounts: ->
|
||||
return unless me.isAdmin()
|
||||
return # TODO: get rid of all this? It's redundant with new campaign editor analytics, unless we want to show player counts on leaderboards buttons.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue