Created
July 31, 2013 08:00
-
-
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>");
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'>×</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