summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-01-07 18:19:17 +0100
committerChristophe Simonis <chs@odoo.com>2016-01-07 18:19:17 +0100
commit2a834c22b0570b3a0d5ec5b4a8a0b378e3a6e12b (patch)
treef4e9524c1e48bd7abd6a0a9522a4212c47b43996 /addons/web_editor/static/src/js
parente502b3ea1fe54bb17b2d1daa62a1cf39a1f17ad5 (diff)
parent100d604cb0ebd6aa3f57c9809c6771b0b4b72a07 (diff)
[MERGE] forward port of branch 9.0 up to 100d604
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]);