Created
October 22, 2014 15:58
-
-
Save mahemoff/8ff6d3782d2da6f9cbb3 to your computer and use it in GitHub Desktop.
Vertically center BootstrapDialog. Put this code in your own application and ensure Bootstrap and BootstrapDialog were already sourced. Credit: http://stackoverflow.com/a/20486657/18706
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
.centerModal .modal-header{ | |
text-align:left; | |
} | |
.centerModal .modal-body{ | |
text-align:left; | |
} |
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
BootstrapDialog.prototype.open = -> | |
@realize() unless @isRealized() | |
@updateClosable() | |
$mymodal = @getModal() | |
$mymodal = $mymodal.append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\"><tr><td align=\"center\" valign=\"middle\" class=\"cen | |
terModal\"></td></tr></table>") | |
$mymodal = $mymodal.find(".modal-dialog").appendTo($mymodal.find(".centerModal")) | |
@getModal().modal "show" | |
this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment