pahans/reactive-modal — pull request #4 by patte (2014-05-27 14:29:04+00:00)
Title: customisable CSS classes, doc passed to template

add {{modalDialogClass}}, {{modalBodyClass}}, {{modalFooterClass}}, {{button.class}}

usage:
@showRuleModal = (rule)->
modalAttrs =
template: Template.ruleModal
doc: rule
title: "Rule #"+rule.index
modalDialogClass: "rule-modal-dialog"
modalBodyClass: "rule-modal-body"
modalFooterClass: "rule-modal-footer"
buttons:
delete:
closeModalOnClick: false
id: "deleteRule"
class: "btn-danger pull-left"
label: "Delete"
cancel:
closeModalOnClick: true
class: "btn-default"
label: "Cancel"
save:
closeModalOnClick: true
id: "saveRule"
class: "btn-primary"
label: "Save"

if !@ruleModal?
@ruleModal = ReactiveModal.initDialog(modalAttrs)
@ruleModal.show()

@hideRuleModal = ->
if @ruleModal?
@ruleModal.hide()