diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-08-26 14:57:43 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-08-26 14:57:43 +0200 |
| commit | 717a4a51a5bf03f853aa2e4c229b929e2b87ea2d (patch) | |
| tree | bc0a9d2c758e7055cb0cd23f12c1c33b04b2a872 /addons/web_editor/static/src/js/backend.js | |
| parent | 438a3742e238ba074b880d5d563f2c7151a767c6 (diff) | |
| parent | 7a4116cd03c56d694a1b6d39a523ac1cc3306f52 (diff) | |
[MERGE] forward port branch saas-10 up to 7a4116c
Diffstat (limited to 'addons/web_editor/static/src/js/backend.js')
| -rw-r--r-- | addons/web_editor/static/src/js/backend.js | 11 |
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, +}; + }); |
