mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
Merge branch 'master' of https://github.com/codecombat/codecombat
This commit is contained in:
commit
d3111f545d
3 changed files with 7 additions and 6 deletions
|
@ -28,8 +28,11 @@
|
||||||
if playableTeams.length > 1
|
if playableTeams.length > 1
|
||||||
#multiplayer-team-selection
|
#multiplayer-team-selection
|
||||||
for team in playableTeams
|
for team in playableTeams
|
||||||
label(for="multiplayer_team_"+team)= team
|
h4
|
||||||
input(id="multiplayer_team_"+team, type="radio", name="multiplayer", value=team)
|
if team == me.team
|
||||||
|
em= "Playing as " + team
|
||||||
|
else
|
||||||
|
a(href=joinLink + "&skip_protect_api=true&team=" + team)= "Play as " + team
|
||||||
|
|
||||||
.modal-footer
|
.modal-footer
|
||||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||||
|
|
|
@ -28,9 +28,6 @@ module.exports = class MultiplayerModal extends View
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
super()
|
super()
|
||||||
@updateLinkSection()
|
@updateLinkSection()
|
||||||
@$el.find('#multiplayer-team-selection input')
|
|
||||||
.prop('checked', -> $(@).val() is me.team)
|
|
||||||
.bind('change', -> Backbone.Mediator.publish 'level:set-team', team: $(@).val())
|
|
||||||
|
|
||||||
onClickLink: (e) ->
|
onClickLink: (e) ->
|
||||||
e.target.select()
|
e.target.select()
|
||||||
|
|
|
@ -123,7 +123,8 @@ module.exports = class PlayLevelView extends View
|
||||||
@levelLoader.destroy()
|
@levelLoader.destroy()
|
||||||
@levelLoader = null
|
@levelLoader = null
|
||||||
@loadingScreen.destroy()
|
@loadingScreen.destroy()
|
||||||
@setTeam @world.teamForPlayer _.size @session.get 'players' # TODO: players aren't initialized yet?
|
#@setTeam @world.teamForPlayer _.size @session.get 'players' # TODO: players aren't initialized yet?
|
||||||
|
@setTeam @getQueryVariable("team") ? @world.teamForPlayer(0)
|
||||||
@initSurface()
|
@initSurface()
|
||||||
@initGod()
|
@initGod()
|
||||||
@initGoalManager()
|
@initGoalManager()
|
||||||
|
|
Loading…
Reference in a new issue