summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/dialog.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-07-13 18:38:18 +0200
committerqsm-odoo <qsm@odoo.com>2017-07-24 14:28:35 +0200
commit5f1ef0910bec16415989835b30727b976c80ea4f (patch)
tree504f8196a5186e146ecae49221aa53eae2301721 /addons/web/static/src/xml/dialog.xml
parent68766764bc9c2c824c7844bb721a48189d812ef6 (diff)
[IMP] web, *: lazy load dialog xml template
* web_editor, web_planner, website The 'Dialog' class is used in both backend and frontend. Also, lots of actions can be done without the use of any modal. It thus makes sense to lazy load its related xml only when a first modal is opened. This change also allows to get rid of the "base_common.xml" file as the dialog template is the only remaining one in there and, in the future website update, it will allow to not load any static XML file on website page loadings.
Diffstat (limited to 'addons/web/static/src/xml/dialog.xml')
-rw-r--r--addons/web/static/src/xml/dialog.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/web/static/src/xml/dialog.xml b/addons/web/static/src/xml/dialog.xml
new file mode 100644
index 00000000000..ae9b33ca373
--- /dev/null
+++ b/addons/web/static/src/xml/dialog.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templates id="template" xml:space="preserve">
+
+<!-- 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 class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title"><t t-raw="title"/><span class="o_subtitle text-muted small"><t t-esc="subtitle"/></span></h4>
+ </div>
+ <div class="modal-body"/>
+ <div class="modal-footer"/>
+ </div>
+ </div>
+</div>
+
+</templates>