diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-06-09 11:17:43 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2017-06-09 11:36:25 +0200 |
| commit | e64cf3d606bd94f7e0d82ec907ce7d1d66222287 (patch) | |
| tree | 6e263866eb952cba355bc09d5f7d9df41df33e12 /addons/web/static/src/less/modal.less | |
| parent | dd0533897e397dfd78ad456fea42a5a12db51246 (diff) | |
[FIX] web: temporary re-allow inline modals
Odoo modals are supposed to be instantiated thanks to the Dialog JS
class. This allows to not duplicate modal structures and to properly
handle multi modals (which bootstrap is not supposed to).
Problem since commit 7dcb8fea642858e0bb1d68cea9707cb3c8d4328d:
The support for inline modals has been broken without providing a
solution for all cases. Indeed, some modals are placed directly inside
form view xml. See an example here:
https://github.com/odoo/odoo/blob/dd0533897e397dfd78ad456fea42a5a12db51246/addons/website_twitter/views/website_twitter_settings_views.xml#L24
While waiting for a new way to instantiate these inline view modals,
this commit restores their deprecated support.
Diffstat (limited to 'addons/web/static/src/less/modal.less')
| -rw-r--r-- | addons/web/static/src/less/modal.less | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/addons/web/static/src/less/modal.less b/addons/web/static/src/less/modal.less index 025a5f3c91e..598af5815d3 100644 --- a/addons/web/static/src/less/modal.less +++ b/addons/web/static/src/less/modal.less @@ -75,21 +75,21 @@ } } -.modal-backdrop { - // Change the z-index of the modal-backdrop element to be equal to the - // modal element's one. 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 changing the @zindex-modal-background variable would have had - // the same effect but bootstrap removed it in their newest version, so this - // will be the proper fix. Note that they removed it to fix an issue with - // the "close on click on the backdrop" feature, so that is ok as we do not - // use this feature. - // (https://github.com/twbs/bootstrap/commit/4bbe80658a9d32df131e5fb13bc20688b99a70d5) - z-index: @zindex-modal; +// 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). +:not(body) > .modal { + z-index: @zindex-modal-background + 1; } |
