Skip to content

Commit

Permalink
refs #248
Browse files Browse the repository at this point in the history
  • Loading branch information
nakupanda committed Mar 16, 2016
1 parent 8d66eee commit 5304d56
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap3-dialog",
"description": "Make use of Bootstrap Modal more monkey-friendly. http://nakupanda.github.io/bootstrap3-dialog/",
"version": "1.34.9",
"version": "1.35.0",
"keywords": [
"css",
"js",
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
LASTEST NOT RELEASED
------------------------------
NONE

V1.35.0
------------------------------
* Refs #224 *
* Refs #208 *
* Refs #233 *
* Refs #247 *
* Refs #248 *

V1.34.9
------------------------------
Expand Down
32 changes: 17 additions & 15 deletions dist/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,20 @@
* Will be removed in later version, after Bootstrap Modal >= 3.3.0, updating z-index is unnecessary.
*/
updateZIndex: function () {
var zIndexBackdrop = 1040;
var zIndexModal = 1050;
var dialogCount = 0;
$.each(BootstrapDialog.dialogs, function (dialogId, dialogInstance) {
if (dialogInstance.isRealized() && dialogInstance.isOpened()) {
dialogCount++;
}
});
var $modal = this.getModal();
var $backdrop = $modal.data('bs.modal').$backdrop;
$modal.css('z-index', zIndexModal + (dialogCount - 1) * 20);
$backdrop.css('z-index', zIndexBackdrop + (dialogCount - 1) * 20);
if (this.isOpened()) {
var zIndexBackdrop = 1040;
var zIndexModal = 1050;
var dialogCount = 0;
$.each(BootstrapDialog.dialogs, function (dialogId, dialogInstance) {
if (dialogInstance.isRealized() && dialogInstance.isOpened()) {
dialogCount++;
}
});
var $modal = this.getModal();
var $backdrop = $modal.data('bs.modal').$backdrop;
$modal.css('z-index', zIndexModal + (dialogCount - 1) * 20);
$backdrop.css('z-index', zIndexBackdrop + (dialogCount - 1) * 20);
}

return this;
},
Expand Down Expand Up @@ -1240,11 +1242,11 @@
if (!dialog.getData('btnClicked') && dialog.isClosable() && typeof dialog.getData('callback') === 'function') {
hideIt = dialog.getData('callback')(false);
}
if(hideIt === false) {
if (hideIt === false) {
return false;
}
hideIt = this.onhide(dialog);

return hideIt;
}.bind({
onhide: dialog.options.onhide
Expand All @@ -1255,7 +1257,7 @@
if (!dialog.getData('btnClicked') && dialog.isClosable() && typeof dialog.getData('callback') === 'function') {
hideIt = dialog.getData('callback')(false);
}

return hideIt;
});
}
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap-dialog.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap3-dialog",
"version": "1.34.9",
"version": "1.35.0",
"description": "Make use of Bootstrap Modal more monkey-friendly.",
"private": true,
"directories": {
Expand Down
32 changes: 17 additions & 15 deletions src/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,20 @@
* Will be removed in later version, after Bootstrap Modal >= 3.3.0, updating z-index is unnecessary.
*/
updateZIndex: function () {
var zIndexBackdrop = 1040;
var zIndexModal = 1050;
var dialogCount = 0;
$.each(BootstrapDialog.dialogs, function (dialogId, dialogInstance) {
if (dialogInstance.isRealized() && dialogInstance.isOpened()) {
dialogCount++;
}
});
var $modal = this.getModal();
var $backdrop = $modal.data('bs.modal').$backdrop;
$modal.css('z-index', zIndexModal + (dialogCount - 1) * 20);
$backdrop.css('z-index', zIndexBackdrop + (dialogCount - 1) * 20);
if (this.isOpened()) {
var zIndexBackdrop = 1040;
var zIndexModal = 1050;
var dialogCount = 0;
$.each(BootstrapDialog.dialogs, function (dialogId, dialogInstance) {
if (dialogInstance.isRealized() && dialogInstance.isOpened()) {
dialogCount++;
}
});
var $modal = this.getModal();
var $backdrop = $modal.data('bs.modal').$backdrop;
$modal.css('z-index', zIndexModal + (dialogCount - 1) * 20);
$backdrop.css('z-index', zIndexBackdrop + (dialogCount - 1) * 20);
}

return this;
},
Expand Down Expand Up @@ -1240,11 +1242,11 @@
if (!dialog.getData('btnClicked') && dialog.isClosable() && typeof dialog.getData('callback') === 'function') {
hideIt = dialog.getData('callback')(false);
}
if(hideIt === false) {
if (hideIt === false) {
return false;
}
hideIt = this.onhide(dialog);

return hideIt;
}.bind({
onhide: dialog.options.onhide
Expand All @@ -1255,7 +1257,7 @@
if (!dialog.getData('btnClicked') && dialog.isClosable() && typeof dialog.getData('callback') === 'function') {
hideIt = dialog.getData('callback')(false);
}

return hideIt;
});
}
Expand Down

0 comments on commit 5304d56

Please sign in to comment.