summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-01-07 18:21:13 +0100
committerChristophe Simonis <chs@odoo.com>2016-01-07 18:21:13 +0100
commit4852d6033d8d11aa62434a0df22aa24d5760fdb0 (patch)
tree327deda5210017a1514ddc87a64663cca74f63c6 /addons/web_editor/static/src/js
parent5ba5172d9922c76b07f2e510dc676760aba89827 (diff)
parent99b6cd8119211414602c739087c57d1966198f8e (diff)
[MERGE] forward port of branch saas-8 up to 99b6cd8
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/backend.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 3d3b6cb27ee..eca913e1309 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -194,7 +194,7 @@ var FieldTextHtml = widget.extend({
return def;
},
get_url: function (_attr) {
- var src = this.options.editor_url ? this.options.editor_url+"?" : "/web_editor/field/html?";
+ var src = this.options.editor_url || "/web_editor/field/html";
var datarecord = this.view.get_fields_values();
var attr = {
@@ -211,6 +211,9 @@ var FieldTextHtml = widget.extend({
if (this.options.snippets) {
attr.snippets = this.options.snippets;
}
+ if (this.options.template) {
+ attr.template = this.options.template;
+ }
if (!this.get("effective_readonly")) {
attr.enable_editor = 1;
}
@@ -227,6 +230,10 @@ var FieldTextHtml = widget.extend({
attr[k] = _attr[k];
}
+ if (src.indexOf('?') === -1) {
+ src += "?";
+ }
+
for (var k in attr) {
if (attr[k] !== null) {
src += "&"+k+"="+(_.isBoolean(attr[k]) ? +attr[k] : attr[k]);