summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/lib/summernote/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2016-06-13 11:37:09 +0200
committerChristophe Matthieu <chm@odoo.com>2016-06-22 14:26:42 +0200
commitf38f8930f0436a40f675fa1d054a9d46f550d440 (patch)
tree26910c115139b3462c9ca5a0267024a8aeaec502 /addons/web_editor/static/lib/summernote/src
parentcecc12ffc6a26ae61319b358f69d9fc5e0ad5bcc (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')
-rw-r--r--addons/web_editor/static/lib/summernote/src/js/EventHandler.js2
-rw-r--r--addons/web_editor/static/lib/summernote/src/js/summernote.js1
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);