summaryrefslogtreecommitdiff
path: root/addons/web/static/src/less
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-11-29 17:58:24 +0100
committerqsm-odoo <qsm@odoo.com>2017-12-01 13:56:58 +0100
commit4974f8edb76e27471bb00c1659c878d0b7a04daf (patch)
tree94f3dd53fe3b4ecb1c56422ca5258b1a01a331f7 /addons/web/static/src/less
parent673b9e6a4a8d3c06a5c91c8d02e8913b91fc433e (diff)
[FIX] web: make submodals backdrop appear on top of parent modals
Commit https://github.com/odoo/odoo/commit/7dcb8fea642858e0bb1d68cea9707cb3c8d4328d (and https://github.com/odoo/odoo/commit/e64cf3d606bd94f7e0d82ec907ce7d1d66222287) were supposed to make submodals backdrop appear on top of parent modals. The feature was however broken by another commit before it was released: https://github.com/odoo/odoo/commit/f997c128c7295b5e76d7f77d79c4a82898debbcf
Diffstat (limited to 'addons/web/static/src/less')
-rw-r--r--addons/web/static/src/less/bootstrap_overridden.less13
-rw-r--r--addons/web/static/src/less/modal.less15
2 files changed, 14 insertions, 14 deletions
diff --git a/addons/web/static/src/less/bootstrap_overridden.less b/addons/web/static/src/less/bootstrap_overridden.less
index 0582ec8c384..ada94dbf4ca 100644
--- a/addons/web/static/src/less/bootstrap_overridden.less
+++ b/addons/web/static/src/less/bootstrap_overridden.less
@@ -72,6 +72,19 @@
@modal-inner-padding: @odoo-horizontal-padding;
@modal-title-padding: @odoo-horizontal-padding;
+// Change the z-index of the modal-backdrop elements to be equal to the
+// modal elements' ones. Bootstrap does not support multi-modals, and without
+// this rule all the modal-backdrops are below all the opened modals.
+// Indeed, bootstrap forces them to a lower z-index as the modal-backdrop
+// element (unique in their supported cases) might be put after the modal
+// element (if the modal is already in the DOM, hidden, then opened). This
+// cannot happen in odoo though as modals are not hidden but removed from
+// the DOM and are always put at the end of the body when opened.
+//
+// Note that the variable @zindex-modal-background may be renamed/removed in
+// newer versions of bootstrap.
+@zindex-modal-background: @zindex-modal;
+
//== Navs
@nav-link-padding: 10px 15px;
@nav-pills-border-radius: 0;
diff --git a/addons/web/static/src/less/modal.less b/addons/web/static/src/less/modal.less
index 95a14420773..ec96d06b67e 100644
--- a/addons/web/static/src/less/modal.less
+++ b/addons/web/static/src/less/modal.less
@@ -77,21 +77,8 @@
}
}
-// Change the z-index of the modal-backdrop elements to be equal to the
-// modal elements' ones. Bootstrap does not support multi-modals, and without
-// this rule all the modal-backdrops are below all the opened modals.
-// Indeed, bootstrap forces them to a lower z-index as the modal-backdrop
-// element (unique in their supported cases) might be put after the modal
-// element (if the modal is already in the DOM, hidden, then opened). This
-// cannot happen in odoo though as modals are not hidden but removed from
-// the DOM and are always put at the end of the body when opened.
-//
-// Note that the variable @zindex-modal-background may be renamed/removed in
-// newer versions of bootstrap.
-@zindex-modal-background: @zindex-modal;
-
// Temporary fix for modals which are not instantiated thanks to the Dialog
-// JS classes (deprecated case) + Frontend.
+// JS classes (deprecated case) (see bootstrap_overridden.less) + Frontend.
:not(body) > .modal {
z-index: @zindex-modal-background + 1;
}