summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/debug_manager.js
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/js/widgets/debug_manager.js
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/js/widgets/debug_manager.js')
-rw-r--r--addons/web/static/src/js/widgets/debug_manager.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js
index 912a30edb2c..baa147d9a1f 100644
--- a/addons/web/static/src/js/widgets/debug_manager.js
+++ b/addons/web/static/src/js/widgets/debug_manager.js
@@ -351,10 +351,14 @@ DebugManager.include({
this._active_view.controller.open_defaults_dialog();
},
fvg: function() {
- var dialog = new Dialog(this, { title: _t("Fields View Get") }).open();
- $('<pre>').text(utils.json_node_to_xml(
- this._active_view.controller.renderer.arch, true)
- ).appendTo(dialog.$el);
+ var self = this;
+ var dialog = new Dialog(this, { title: _t("Fields View Get") });
+ dialog.opened().then(function () {
+ $('<pre>').text(utils.json_node_to_xml(
+ self._active_view.controller.renderer.arch, true)
+ ).appendTo(dialog.$el);
+ });
+ dialog.open();
},
});
function make_context(width, height, fn) {