codecombat/app/views/play/level/modal/ReloadLevelModal.coffee
2014-11-26 06:58:23 -08:00

16 lines
484 B
CoffeeScript

ModalView = require 'views/kinds/ModalView'
template = require 'templates/play/level/modal/reload-level-modal'
module.exports = class ReloadLevelModal extends ModalView
id: '#reload-level-modal'
template: template
events:
'click #restart-level-confirm-button': 'onClickRestart'
onClickRestart: (e) ->
@playSound 'menu-button-click'
if key.shift
Backbone.Mediator.publish 'level:restart', {}
else
Backbone.Mediator.publish 'tome:reload-code', {}