summaryrefslogtreecommitdiff
path: root/addons/website/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/website/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/website/static/src/xml')
-rw-r--r--addons/website/static/src/xml/website.gallery.xml4
-rw-r--r--addons/website/static/src/xml/website.translator.xml2
-rw-r--r--addons/website/static/src/xml/website.xml2
3 files changed, 4 insertions, 4 deletions
diff --git a/addons/website/static/src/xml/website.gallery.xml b/addons/website/static/src/xml/website.gallery.xml
index 8f2a387e78b..269795082f1 100644
--- a/addons/website/static/src/xml/website.gallery.xml
+++ b/addons/website/static/src/xml/website.gallery.xml
@@ -10,7 +10,7 @@
-->
<t t-name="website.gallery.dialog.upload">
- <div class="modal o_website_modal fade" >
+ <div class="modal o_technical_modal fade" >
<div class="modal-dialog" style="max-width: 50%;">
<div class="modal-content">
<div class="modal-header">
@@ -88,7 +88,7 @@
-->
<t t-name="website.gallery.slideshow.lightbox">
- <div class="modal o_website_modal fade" aria-labbelledby="Image Gallery Dialog" aria-hidden="true">
+ <div class="modal o_technical_modal fade" aria-labbelledby="Image Gallery Dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="Picture Gallery"
t-attf-style="min-width: #{dim.min_width}px ; min-height: #{dim.min_height}px ; max-width: #{dim.max_width}px ; max-height: #{dim.max_height}px ; height: #{dim.height}px ;">
diff --git a/addons/website/static/src/xml/website.translator.xml b/addons/website/static/src/xml/website.translator.xml
index 4185f418fcc..7af85d55f9a 100644
--- a/addons/website/static/src/xml/website.translator.xml
+++ b/addons/website/static/src/xml/website.translator.xml
@@ -6,7 +6,7 @@
</t>
<t t-name="website.TranslatorDialog">
- <div class="modal o_website_modal fade oe_website_translator" tabindex="-1" role="dialog">
+ <div class="modal o_technical_modal fade oe_website_translator" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
diff --git a/addons/website/static/src/xml/website.xml b/addons/website/static/src/xml/website.xml
index e42405ce156..d58534f5ded 100644
--- a/addons/website/static/src/xml/website.xml
+++ b/addons/website/static/src/xml/website.xml
@@ -32,7 +32,7 @@
</t>
<t t-name="website.modal_base">
- <div class="modal o_website_modal " tabindex="-1" role="dialog" aria-hidden="true">
+ <div class="modal o_technical_modal " tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<t t-call="website.modal_header" />