mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-14 17:51:55 -05:00
26 lines
631 B
CoffeeScript
26 lines
631 B
CoffeeScript
ModalView = require '../../core/ModalView'
|
|
template = require 'templates/editor/modal/confirm-modal'
|
|
|
|
module.exports = class ConfirmModal extends ModalView
|
|
id: 'confirm-modal'
|
|
template: template
|
|
closeButton: true
|
|
closeOnConfirm: true
|
|
|
|
events:
|
|
'click #decline-button': 'onDecline'
|
|
'click #confirm-button': 'onConfirm'
|
|
|
|
constructor: (@renderData={}, options={}) ->
|
|
super(options)
|
|
|
|
getRenderData: ->
|
|
context = super()
|
|
context.closeOnConfirm = @closeOnConfirm
|
|
_.extend context, @renderData
|
|
|
|
setRenderData: (@renderData) ->
|
|
|
|
onDecline: -> @trigger 'decline'
|
|
|
|
onConfirm: -> @trigger 'confirm'
|