mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
23 lines
713 B
CoffeeScript
23 lines
713 B
CoffeeScript
|
AuthModal = require 'views/core/AuthModal'
|
||
|
RootView = require 'views/core/RootView'
|
||
|
template = require 'templates/sales-view'
|
||
|
|
||
|
module.exports = class SalesView extends RootView
|
||
|
id: 'sales-view'
|
||
|
template: template
|
||
|
|
||
|
events:
|
||
|
'click .btn-create-account': 'onClickSignup'
|
||
|
'click .btn-login-account': 'onClickLogin'
|
||
|
|
||
|
getTitle: ->
|
||
|
'CodeCombat'
|
||
|
|
||
|
onClickLogin: (e) ->
|
||
|
@openModalView new AuthModal(mode: 'login') if me.get('anonymous')
|
||
|
window.tracker?.trackEvent 'Started Login', category: 'Sales', label: 'Sales Login'
|
||
|
|
||
|
onClickSignup: (e) ->
|
||
|
@openModalView new AuthModal() if me.get('anonymous')
|
||
|
window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create'
|