RootView = require 'views/core/RootView' Level = require 'models/Level' LevelSession = require 'models/LevelSession' WebSurfaceView = require './WebSurfaceView' module.exports = class PlayWebDevLevelView extends RootView id: 'play-web-dev-level-view' template: require 'templates/play/level/play-web-dev-level-view' # events: # 'click #play-btn': 'onClickPlayButton' initialize: (@options, @levelID, @sessionID) -> @courseID = @getQueryVariable 'course' @level = @supermodel.loadModel(new Level _id: @levelID).model @session = @supermodel.loadModel(new LevelSession _id: @sessionID).model onLoaded: -> super() @insertSubView @webSurface = new WebSurfaceView {level: @level} Backbone.Mediator.publish 'tome:html-updated', html: @getHTML() ? '