mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 17:02:18 -05:00
Check anonymous for clicking link.
This commit is contained in:
parent
5ddd2b9109
commit
65c53a9e43
1 changed files with 3 additions and 3 deletions
|
@ -127,18 +127,18 @@ module.exports = class LadderView extends RootView
|
|||
session = (s for s in @sessions.models when s.get('team') is teamID)[0]
|
||||
modal = new LadderPlayModal({}, @level, session, teamID)
|
||||
@openModalView modal
|
||||
|
||||
|
||||
showApologeticSignupModal: ->
|
||||
SignupModal = require 'views/modal/signup_modal'
|
||||
@openModalView(new SignupModal({showRequiredError:true}))
|
||||
|
||||
onClickedLink: (e) ->
|
||||
link = $(e.target).closest('a').attr('href')
|
||||
if link?.startsWith '/play/level'
|
||||
if link?.startsWith('/play/level') and me.get('anonymous')
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
@showApologeticSignupModal()
|
||||
|
||||
|
||||
destroy: ->
|
||||
clearInterval @refreshInterval
|
||||
@simulator.destroy()
|
||||
|
|
Loading…
Reference in a new issue