Replaced rank button with button going to ladder page

This commit is contained in:
Michael Schmatz 2014-02-20 10:14:25 -08:00
parent 7c5192820f
commit cb0c22f0c9
2 changed files with 5 additions and 9 deletions

View file

@ -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

View file

@ -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)