Skip to content

Instantly share code, notes, and snippets.

@atelic
Created November 6, 2015 21:15
Show Gist options
  • Save atelic/2c931582a9764b7573a2 to your computer and use it in GitHub Desktop.
Save atelic/2c931582a9764b7573a2 to your computer and use it in GitHub Desktop.
var koBootboxTemplate = function(title, template, viewModel, buttons) {
bootbox.dialog({
title: title,
message: function() {
ko.renderTemplate(template, viewModel, {}, this, 'replaceNode');
},
buttons: buttons
});
};
/* Buttons Example:
var buttons = {
select: {
label: 'Okay',
className: 'btn-primary pull-left',
callback: function() {
// do stuff
}
}
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment