summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-07-28 10:57:21 +0200
committerqsm-odoo <qsm@odoo.com>2017-08-03 10:50:55 +0200
commit5658e337c3e0385d3d116e34404ef4086b3e94f0 (patch)
tree503cc52139059bd2013d2567b601445c39341a9b /addons/web/static/src/xml
parent6d4900826b14e6b6fb252bc6c539737cf04281a1 (diff)
[REF] web, website: o_website_modal -> o_technical_modal
Opening a modal in Odoo should be done thanks to the 'Dialog' class. In the frontend, there can also be modals which are meant to be shown to the unconnected frontend visitors and those should then get the style of the website (bootstrap) and not the one of odoo. To manage this, the website JS code was extending the Dialog class so that it adds the 'o_website_modal' class on modals which are opened thanks to the class. The LESS code was then in charge of forcing the Odoo style on those. This behavior is not the right one. "Visitors" modals should also be able to be opened with the Dialog class. This commit is a first step towards to the right behavior: - The standard 'Dialog' adds the 'o_technical_modal' class on its root element by default and allows to not put it thanks to 'technical' options. - 'o_website_modal' is then replaced by 'o_technical_modal'. What should be done next is: - Use the Dialog class when it is possible - Move modal.less in the common assets and make it style only technical modals -> remove some forcing of the style on 'o_technical_modal' in the frontend This behavior also allows future improvements, like building a completely different structure for technical modals which would allow better designing and the end of visitor/technical bootstrap conflicts (and so LESS efficiency).
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/dialog.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/dialog.xml b/addons/web/static/src/xml/dialog.xml
index ae9b33ca373..8f5779e0eb8 100644
--- a/addons/web/static/src/xml/dialog.xml
+++ b/addons/web/static/src/xml/dialog.xml
@@ -3,7 +3,7 @@
<!-- These templates are accessible in backend and frontend -->
-<div t-name="Dialog" class="modal" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true" t-att-id="_.uniqueId('modal_')">
+<div t-name="Dialog" t-attf-class="modal#{technical ? ' o_technical_modal' : ''}" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true" t-att-id="_.uniqueId('modal_')">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">