summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/backend.js')
-rw-r--r--addons/web_editor/static/src/js/backend.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 38f25e42103..468fab0c728 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -220,9 +220,12 @@ var FieldTextHtml = widget.extend({
this.$translate = $();
return def;
},
+ get_datarecord: function() {
+ return this.view.get_fields_values();
+ },
get_url: function (_attr) {
var src = this.options.editor_url || "/web_editor/field/html";
- var datarecord = this.view.get_fields_values();
+ var datarecord = this.get_datarecord();
var attr = {
'model': this.view.model,
@@ -269,7 +272,6 @@ var FieldTextHtml = widget.extend({
delete datarecord[this.name];
src += "&datarecord="+ encodeURIComponent(JSON.stringify(datarecord));
-
return src;
},
initialize_content: function () {
@@ -384,4 +386,9 @@ core.form_widget_registry
.add('html', FieldTextHtmlSimple)
.add('html_frame', FieldTextHtml);
+return {
+ FieldTextHtmlSimple: FieldTextHtmlSimple,
+ FieldTextHtml: FieldTextHtml,
+};
+
});