mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
19 lines
559 B
CoffeeScript
19 lines
559 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': 'onClickDecline'
|
|
'click #confirm-button': 'onClickConfirm'
|
|
|
|
initialize: (options) ->
|
|
_.assign @, _.pick(options, 'title', 'body', 'decline', 'confirm', 'closeOnConfirm', 'closeButton')
|
|
|
|
onClickDecline: -> @trigger 'decline'
|
|
|
|
onClickConfirm: -> @trigger 'confirm'
|