diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-06-13 11:37:09 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2016-06-22 14:26:42 +0200 |
| commit | f38f8930f0436a40f675fa1d054a9d46f550d440 (patch) | |
| tree | 26910c115139b3462c9ca5a0267024a8aeaec502 /addons/web_editor/static/lib/summernote/src/js | |
| parent | cecc12ffc6a26ae61319b358f69d9fc5e0ad5bcc (diff) | |
[FIX] web_editor: test jinja content to load editor in codeview
The preview change the content because the browser try to fix the dom.
If a user use jinja and activate the preview, the jinja code is (re)moved by the browser and broke the template.
Diffstat (limited to 'addons/web_editor/static/lib/summernote/src/js')
| -rw-r--r-- | addons/web_editor/static/lib/summernote/src/js/EventHandler.js | 2 | ||||
| -rw-r--r-- | addons/web_editor/static/lib/summernote/src/js/summernote.js | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js index 09a7b00082a..bc605228f54 100644 --- a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js +++ b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js @@ -234,7 +234,7 @@ define([ var hToolbarAndPopoverClick = function (event) { var $btn = $(event.target).closest('[data-event]'); - if (!$btn.length) { + if (!$btn.length || $btn.hasClass('disabled')) { return; } diff --git a/addons/web_editor/static/lib/summernote/src/js/summernote.js b/addons/web_editor/static/lib/summernote/src/js/summernote.js index 329ba7fa126..f6b4277ac83 100644 --- a/addons/web_editor/static/lib/summernote/src/js/summernote.js +++ b/addons/web_editor/static/lib/summernote/src/js/summernote.js @@ -221,6 +221,7 @@ define([ var layoutInfo = renderer.layoutInfoFromHolder($holder); $holder.data('layoutInfo', layoutInfo); + layoutInfo.editable().data('options', options); eventHandler.attach(layoutInfo, options); eventHandler.attachCustomEvent(layoutInfo, options); |
