makeusabrew/bootbox — pull request #221 by nilcolor (2014-02-16 11:50:06+00:00)
Title: Add support for data attributes for custom buttons (dialog)

POC for #156
Something like this - to be able to set additional data attributes for custom dialog buttons. This way we can localize 'em using L20n (for example)

```coffeescript
showChangelog: (text) ->
html = "

#{text.replace(/\n/g, '
')}

"
dlg = bootbox.dialog(html, [{
'label' : '__ACK__',
'class' : 'btn-success',
'data': { 'l10n-id': 'ack_changelog_action' },
'callback': => @acknowledgeVersion()
}, {
'label' : '__LATER__',
'data': { 'l10n-id': 'later_changelog_action' },
}],
{ className: 'changelog' })
document.l10n.localizeNode($('.bootbox').get(0))
```

P.S.
I'm still using Bootbox 3.x so - PR is for v3.x branch.