Skip to content

Commit

Permalink
Cater for bootstrap modal switch "in" to "show"
Browse files Browse the repository at this point in the history
  • Loading branch information
GedMarc committed Oct 7, 2021
1 parent 473a349 commit c510258
Show file tree
Hide file tree
Showing 6 changed files with 1,459 additions and 1,471 deletions.
18 changes: 9 additions & 9 deletions dist/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,14 @@
updateType: function () {
if (this.isRealized()) {
var types = [BootstrapDialog.TYPE_DEFAULT,
BootstrapDialog.TYPE_INFO,
BootstrapDialog.TYPE_PRIMARY,
BootstrapDialog.TYPE_SECONDARY,
BootstrapDialog.TYPE_SUCCESS,
BootstrapDialog.TYPE_WARNING,
BootstrapDialog.TYPE_DARK,
BootstrapDialog.TYPE_LIGHT,
BootstrapDialog.TYPE_DANGER];
BootstrapDialog.TYPE_INFO,
BootstrapDialog.TYPE_PRIMARY,
BootstrapDialog.TYPE_SECONDARY,
BootstrapDialog.TYPE_SUCCESS,
BootstrapDialog.TYPE_WARNING,
BootstrapDialog.TYPE_DARK,
BootstrapDialog.TYPE_LIGHT,
BootstrapDialog.TYPE_DANGER];

this.getModal().removeClass(types.join(' ')).addClass(this.getType());
}
Expand Down Expand Up @@ -1145,7 +1145,7 @@
$(this).remove();
}
BootstrapDialog.moveFocus();
if ($('.modal').hasClass('in')) {
if ($('.modal').hasClass('in') || $('.modal').hasClass('show')) {
$('body').addClass('modal-open');
}
});
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap-dialog.min.js

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions examples/index_multiscroll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html>
<head>
<link href="libs/bootstrap.min.css?v=5.10" rel="stylesheet" type="text/css">

<link href="../dist/css/bootstrap-dialog.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css"/>
<script src="libs/jquery.min.js?v=3.31" type="text/javascript"></script>
<script src="libs/popper.min.js?v=4.13" type="text/javascript"></script>
<script src="libs/bootstrap.min.js?v=5.10" type="text/javascript"></script>

<script src="../dist/js/bootstrap-dialog.min.js" type="text/javascript"></script>

<meta charset="utf-8" />
<title>BootstrapDialog examples</title>
<style>
.login-dialog .modal-dialog {
width: 300px;
}
</style>
</head>
<body style="padding-bottom: 100px;">
<div class="container">
</div>

<script type="text/javascript">

$( document ).ready(function(){
BootstrapDialog.show({
title: 'Example',
message: `Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br>Write your example here.<br> THE END.`,
buttons: [{
label: 'Close',
action: function(dialog) {
dialog.close();
}
}]
});
BootstrapDialog.show({
title: 'Example',
message: 'Write your example here.',
buttons: [{
label: 'Close',
action: function(dialog) {
dialog.close();
}
}]
});
BootstrapDialog.show({
title: 'Example',
message: 'Write your example here.',
buttons: [{
label: 'Close',
action: function(dialog) {
dialog.close();
}
}]
});
});


</script>
</body>
</html>
Loading

0 comments on commit c510258

Please sign in to comment.