Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit 7a6ce48

Browse files
committed
Merge branch 'master' of github.com:nakupanda/bootstrap3-dialog
2 parents 5fc9579 + 80eea95 commit 7a6ce48

7 files changed

Lines changed: 31 additions & 10 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bootstrap3-dialog",
33
"description": "Make use of Bootstrap Modal more monkey-friendly. http://nakupanda.github.io/bootstrap3-dialog/",
4-
"version": "1.35.3",
4+
"version": "1.35.4",
55
"keywords": [
66
"css",
77
"js",

changelog.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
LASTEST NOT RELEASED
22
------------------------------
3-
* Merged PR #300 *
4-
* Merged PR #308 *
5-
* Merged PR #232 *
3+
* Merged #347 *
4+
5+
V1.35.4
6+
------------------------------
7+
* Refs #300 *
8+
* Refs #308 *
9+
* Refs #232 *
10+
* Refs #334 *
11+
* Refs #331 *
612

713
V1.35.3
814
------------------------------

dist/js/bootstrap-dialog.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,9 @@
10981098
$(this).remove();
10991099
}
11001100
BootstrapDialog.moveFocus();
1101+
if ($('.modal').hasClass('in')) {
1102+
$('body').addClass('modal-open');
1103+
}
11011104
});
11021105

11031106
// Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.
@@ -1113,7 +1116,7 @@
11131116
var dialog = event.data.dialog;
11141117
if (typeof dialog.registeredButtonHotkeys[event.which] !== 'undefined') {
11151118
var $button = $(dialog.registeredButtonHotkeys[event.which]);
1116-
!$button.prop('disabled') && $button.focus().trigger('click');
1119+
!$button.prop('disabled') && !$button.is(':focus') && $button.focus().trigger('click');
11171120
}
11181121
});
11191122

dist/js/bootstrap-dialog.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/index.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ <h3>Buttons</h3>
151151
label: 'Button 2',
152152
// no title as it is optional
153153
cssClass: 'btn-primary',
154+
data: {
155+
js: 'btn-confirm',
156+
'user-id': '3'
157+
},
154158
action: function(){
155159
alert('Hi Orange!');
156160
}
@@ -996,7 +1000,11 @@ <h2>Available options</h2>
9961000
id: 'btn-ok',
9971001
icon: 'glyphicon glyphicon-check',
9981002
label: 'OK',
999-
cssClass: 'btn-primary',
1003+
cssClass: 'btn-primary',
1004+
data: {
1005+
js: 'btn-confirm',
1006+
'user-id': '3'
1007+
},
10001008
autospin: false,
10011009
action: function(dialogRef){
10021010
dialogRef.close();
@@ -1007,7 +1015,8 @@ <h2>Available options</h2>
10071015
<strong>id</strong>: optional, if id is set, you can use dialogInstance.getButton(id) to get the button later. <br />
10081016
<strong>icon</strong>: optional, if set, the specified icon will be added to the button. <br />
10091017
<strong>cssClass</strong>: optional, additional css class to be added to the button. <br />
1010-
<strong>autospin</strong>: optinal, if it's true, after clicked the button a spinning icon appears. <br />
1018+
<strong>data</strong>: optional, object containing data attributes to be added to the button. <br />
1019+
<strong>autospin</strong>: optional, if it's true, after clicked the button a spinning icon appears. <br />
10111020
<strong>action</strong>: optional, if provided, the callback will be invoked after the button is clicked, and the dialog instance will be passed to the callback function.
10121021
</td>
10131022
</tr>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap3-dialog",
3-
"version": "1.35.3",
3+
"version": "1.35.4",
44
"description": "Make use of Bootstrap Modal more monkey-friendly.",
55
"directories": {
66
"example": "examples"

src/js/bootstrap-dialog.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,9 @@
10981098
$(this).remove();
10991099
}
11001100
BootstrapDialog.moveFocus();
1101+
if ($('.modal').hasClass('in')) {
1102+
$('body').addClass('modal-open');
1103+
}
11011104
});
11021105

11031106
// Backdrop, I did't find a way to change bs3 backdrop option after the dialog is popped up, so here's a new wheel.
@@ -1113,7 +1116,7 @@
11131116
var dialog = event.data.dialog;
11141117
if (typeof dialog.registeredButtonHotkeys[event.which] !== 'undefined') {
11151118
var $button = $(dialog.registeredButtonHotkeys[event.which]);
1116-
!$button.prop('disabled') && $button.focus().trigger('click');
1119+
!$button.prop('disabled') && !$button.is(':focus') && $button.focus().trigger('click');
11171120
}
11181121
});
11191122

0 commit comments

Comments
 (0)