2016-05-25 18:24:51 -04:00
|
|
|
ModalView = require 'views/core/ModalView'
|
2016-08-05 17:41:29 -04:00
|
|
|
HeroSelectView = require 'views/core/HeroSelectView'
|
2016-05-25 18:24:51 -04:00
|
|
|
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
|
2016-08-05 17:41:29 -04:00
|
|
|
retainSubviews: true
|
2016-05-25 18:24:51 -04:00
|
|
|
|
|
|
|
events:
|
|
|
|
'click .select-hero-btn': 'onClickSelectHeroButton'
|
|
|
|
|
2016-08-05 17:41:29 -04:00
|
|
|
initialize: ->
|
|
|
|
@listenTo @insertSubView(new HeroSelectView({ showCurrentHero: true })),
|
|
|
|
'hero-select:success', (hero) ->
|
|
|
|
@trigger('hero-select:success', hero)
|
2016-05-25 18:24:51 -04:00
|
|
|
|
|
|
|
onClickSelectHeroButton: () ->
|
|
|
|
@hide()
|