mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Replaced rank button with button going to ladder page
This commit is contained in:
parent
7c5192820f
commit
cb0c22f0c9
2 changed files with 5 additions and 9 deletions
|
@ -29,7 +29,8 @@
|
|||
if me.get('anonymous')
|
||||
p Sign in or create an account and get your solution on the leaderboard!
|
||||
else
|
||||
#submit-session-button.btn.btn-primary Update Ladder Score
|
||||
a#go-to-leaderboard-button.btn.btn-primary(href="/play/ladder/#{levelSlug}/team/#{team}") Go to the leaderboard!
|
||||
p You can submit your game to be ranked from the leaderboard page.
|
||||
|
||||
.modal-footer
|
||||
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = class MultiplayerModal extends View
|
|||
events:
|
||||
'click textarea': 'onClickLink'
|
||||
'change #multiplayer': 'updateLinkSection'
|
||||
'click #submit-session-button': 'submitSession'
|
||||
|
||||
|
||||
constructor: (options) ->
|
||||
super(options)
|
||||
|
@ -24,6 +24,8 @@ module.exports = class MultiplayerModal extends View
|
|||
'?session=' +
|
||||
@session.id)
|
||||
c.multiplayer = @session.get('multiplayer')
|
||||
c.team = @session.get 'team'
|
||||
c.levelSlug = @level?.get('slug')
|
||||
c.playableTeams = @playableTeams
|
||||
c.ladderGame = @level?.get('name') is 'Project DotA' and not me.get('isAnonymous')
|
||||
c
|
||||
|
@ -41,13 +43,6 @@ module.exports = class MultiplayerModal extends View
|
|||
la.toggle Boolean(multiplayer)
|
||||
true
|
||||
|
||||
submitSession: ->
|
||||
$.ajax('/queue/scoring', {
|
||||
method: 'POST'
|
||||
data:
|
||||
session: @session.id
|
||||
})
|
||||
|
||||
onHidden: ->
|
||||
multiplayer = Boolean(@$el.find('#multiplayer').prop('checked'))
|
||||
@session.set('multiplayer', multiplayer)
|
||||
|
|
Loading…
Reference in a new issue