codecombat/app/views/editor/modal/ConfirmModal.coffee

20 lines
559 B
CoffeeScript
Raw Normal View History

ModalView = require '../../core/ModalView'
template = require 'templates/editor/modal/confirm-modal'
module.exports = class ConfirmModal extends ModalView
2014-06-30 22:16:26 -04:00
id: 'confirm-modal'
template: template
closeButton: true
closeOnConfirm: true
events:
'click #decline-button': 'onClickDecline'
'click #confirm-button': 'onClickConfirm'
initialize: (options) ->
_.assign @, _.pick(options, 'title', 'body', 'decline', 'confirm', 'closeOnConfirm', 'closeButton')
onClickDecline: -> @trigger 'decline'
onClickConfirm: -> @trigger 'confirm'