codecombat/app/views/courses/HeroSelectModal.coffee
phoenixeliot 5b8d66cd1c Add hero selector to create account modal
Don't show grey border around Anya in signup modal

Refactor reload handling

Fix courses page updating to chosen hero
2016-08-08 15:19:44 -07:00

24 lines
758 B
CoffeeScript

ModalView = require 'views/core/ModalView'
HeroSelectView = require 'views/core/HeroSelectView'
template = require 'templates/courses/hero-select-modal'
Classroom = require 'models/Classroom'
ThangTypes = require 'collections/ThangTypes'
State = require 'models/State'
ThangType = require 'models/ThangType'
User = require 'models/User'
module.exports = class HeroSelectModal extends ModalView
id: 'hero-select-modal'
template: template
retainSubviews: true
events:
'click .select-hero-btn': 'onClickSelectHeroButton'
initialize: ->
@listenTo @insertSubView(new HeroSelectView({ showCurrentHero: true })),
'hero-select:success', (hero) ->
@trigger('hero-select:success', hero)
onClickSelectHeroButton: () ->
@hide()