Skip to content

Commit 61933f2

Browse files
committed
A little bit of cleanup
Bumps version number. Fixes unit tests. Moves backdrop fix - was inserted between the button validation.
1 parent f079264 commit 61933f2

13 files changed

+530
-875
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 5.4.0 (Latest Release)
1+
## 5.4.1 (Latest Release)
2+
3+
- Updates to how backdrop is handled. Fixes #766.
4+
5+
### 5.4.0
26

37
- Adds function hooks for `onShow`, `onShown`, `onHide`, and `onHidden` events, which map to their Bootstrap modal equivalents.
48

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(The MIT License)
44

5-
Copyright (C) 2011-2019 by Nick Payne <nick@kurai.co.uk>
5+
Copyright (C) 2011-2020 by Nick Payne <nick@kurai.co.uk>
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Bootbox **3.3.0** is the *last* release to support Bootstrap 2.2.x.
3535

3636
Much more dependency information can be found [on the Bootbox website](http://bootboxjs.com/getting-started.html#bootbox-dependencies).
3737

38-
## 5.4.0 (Latest Release)
38+
## 5.4.1 (Latest Release)
3939

40-
- Adds function hooks for `onShow`, `onShown`, `onHide`, and `onHidden` events, which map to their Bootstrap modal equivalents.
40+
- Updates to how backdrop is handled. Fixes #766.
4141

4242
For a full list of releases and changes please see [the changelog](https://github.com/makeusabrew/bootbox/blob/master/CHANGELOG.md).
4343

bootbox.all.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.js
3-
* version: 5.4.0
3+
* version: 5.4.1
44
* author: Nick Payne <nick@kurai.co.uk>
55
* license: MIT
66
* http://bootboxjs.com/
@@ -1259,6 +1259,13 @@
12591259
// make sure any supplied options take precedence over defaults
12601260
options = $.extend({}, defaults, options);
12611261

1262+
//make sure backdrop is either true, false, or 'static'
1263+
if (!options.backdrop) {
1264+
options.backdrop = (options.backdrop === false || options.backdrop === 0) ? false : 'static';
1265+
} else {
1266+
options.backdrop = typeof options.backdrop === 'string' && options.backdrop.toLowerCase() === 'static' ? 'static' : true;
1267+
}
1268+
12621269
// no buttons is still a valid dialog but it's cleaner to always have
12631270
// a buttons object to iterate over, even if it's empty
12641271
if (!options.buttons) {

bootbox.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.js
3-
* version: 5.4.0
3+
* version: 5.4.1
44
* author: Nick Payne <nick@kurai.co.uk>
55
* license: MIT
66
* http://bootboxjs.com/
@@ -1064,17 +1064,18 @@
10641064
// make sure any supplied options take precedence over defaults
10651065
options = $.extend({}, defaults, options);
10661066

1067-
// no buttons is still a valid dialog but it's cleaner to always have
1068-
// a buttons object to iterate over, even if it's empty
1069-
if (!options.buttons) {
1070-
options.buttons = {};
1071-
}
1072-
//make sure backdrop is either true/false/static
1067+
//make sure backdrop is either true, false, or 'static'
10731068
if (!options.backdrop) {
10741069
options.backdrop = (options.backdrop === false || options.backdrop === 0) ? false : 'static';
10751070
} else {
10761071
options.backdrop = typeof options.backdrop === 'string' && options.backdrop.toLowerCase() === 'static' ? 'static' : true;
10771072
}
1073+
1074+
// no buttons is still a valid dialog but it's cleaner to always have
1075+
// a buttons object to iterate over, even if it's empty
1076+
if (!options.buttons) {
1077+
options.buttons = {};
1078+
}
10781079

10791080
buttons = options.buttons;
10801081

bootbox.locales.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! @preserve
22
* bootbox.locales.js
3-
* version: 5.4.0
3+
* version: 5.4.1
44
* author: Nick Payne <nick@kurai.co.uk>
55
* license: MIT
66
* http://bootboxjs.com/

dist/bootbox.all.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bootbox.locales.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.

dist/bootbox.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

header.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* bootbox.js 5.4.0
2+
* bootbox.js 5.4.1
33
*
44
* http://bootboxjs.com/license.txt
55
*/

0 commit comments

Comments
 (0)