Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Created July 31, 2013 08:00
Show Gist options
  • Save tarlepp/6120180 to your computer and use it in GitHub Desktop.
Save tarlepp/6120180 to your computer and use it in GitHub Desktop.
Quick fix for bootboxjs to work with bootstrap 3.0.0, basically just added parts.push("<div class='modal-dialog'>"); parts.push("<div class='modal-content'>"); and parts.push("</div>"); parts.push("</div>");
var parts = ["<div class='bootbox modal' tabindex='-1' style='overflow:hidden;'>"];
parts.push("<div class='modal-dialog'>");
parts.push("<div class='modal-content'>");
if (options['header']) {
var closeButton = '';
if (typeof options['headerCloseButton'] == 'undefined' || options['headerCloseButton']) {
closeButton = "<a href='"+_defaultHref+"' class='close'>&times;</a>";
}
parts.push("<div class='modal-header'>"+closeButton+"<h3>"+options['header']+"</h3></div>");
}
// push an empty body into which we'll inject the proper content later
parts.push("<div class='modal-body'></div>");
if (buttons) {
parts.push("<div class='modal-footer'>"+buttons+"</div>");
}
parts.push("</div>");
parts.push("</div>");
parts.push("</div>");
var div = $(parts.join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment