summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-03-01 14:07:15 +0100
committerChristophe Simonis <chs@odoo.com>2017-03-01 14:07:15 +0100
commit5c4744cd1fa177eeed679ff4ba46f90b0bc82005 (patch)
tree29bb9696176428214631c3f53837ae14a3407e44 /addons/web_editor/static/src/js
parent1730dca101616135dfdc0073520e92506b52a0b0 (diff)
parent5f9f4f4d9dbb8222a894548e11f43c6ea7c2c0d0 (diff)
[MERGE] forward port branch 9.0 up to 5f9f4f4d9db
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/backend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index ef0dfe7ed09..611cdb1a1f7 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -351,7 +351,12 @@ var FieldTextHtml = widget.extend({
});
},
render_value: function () {
- if (this.lang !== this.view.dataset.context.lang || this.$iframe.attr('src').match(/[?&]edit_translations=1/)) {
+ if (this.$iframe.attr('src').match(/[?&]edit_translations=1/)) {
+ return;
+ }
+ // ONLY HAVE THIS IN 9.0 AND SAAS-11
+ var is_editor_onchange = this.get('value') === '<p>on_change_model_and_list</p>';
+ if (this.lang !== this.view.dataset.context.lang && !is_editor_onchange) {
return;
}
var value = (this.get('value') || "").replace(/^<p[^>]*>(\s*|<br\/?>)<\/p>$/, '');