summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/menu/edit.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2019-01-28 09:39:56 +0000
committerChristophe Matthieu <chm@odoo.com>2019-02-14 15:11:19 +0000
commitb49745e52d7a7bc27afd416206dcd5fa242aa07a (patch)
treeae6a047da7e77b951db241e1342278ce543972e2 /addons/website/static/src/js/menu/edit.js
parent7daa85dd12ff522be510bc2f8db1d968cae7d891 (diff)
[IMP] web_editor: lazy load the wysiwyg
Issue: wysiwyg asset slow down the loading of the website, error inadvertently introduced: https://github.com/odoo/odoo/pull/29775 The assets are now loaded assynchroneously, when the editor is needed, its assets will be loaded. closes odoo/odoo#30700
Diffstat (limited to 'addons/website/static/src/js/menu/edit.js')
-rw-r--r--addons/website/static/src/js/menu/edit.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/website/static/src/js/menu/edit.js b/addons/website/static/src/js/menu/edit.js
index bc9e4646135..a3e68873a7b 100644
--- a/addons/website/static/src/js/menu/edit.js
+++ b/addons/website/static/src/js/menu/edit.js
@@ -11,6 +11,8 @@ var _t = core._t;
* Adds the behavior when clicking on the 'edit' button (+ editor interaction)
*/
var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
+ assetLibs: ['web_editor.compiled_assets_wysiwyg', 'website.compiled_assets_wysiwyg'],
+
xmlDependencies: ['/website/static/src/xml/website.editor.xml'],
actions: _.extend({}, websiteNavbarData.WebsiteNavbarActionWidget.prototype.actions, {
edit: '_startEditMode',