diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-08-26 16:59:45 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-08-26 16:59:45 +0200 |
| commit | de0d503421f0eb7ee14e98f2a627d11fd79aa7fd (patch) | |
| tree | 1ac0adbeaf08ebbe13f969b940afbae3c9d581b2 /addons/web_editor/static/src | |
| parent | c8551260696f8979d67a5ae2d48d3cfca1128581 (diff) | |
| parent | f0c8224175159d4fad8f511ede16cec7824d58c4 (diff) | |
[MERGE] forward port branch saas-11 up to f0c8224
Diffstat (limited to 'addons/web_editor/static/src')
| -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, +}; + }); |
