diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-06-23 11:45:17 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2016-06-23 11:45:17 +0200 |
| commit | 025263d3bfe568ae862fdb227b1a39b079a456fc (patch) | |
| tree | 4464702cbe21fcca42b9ef20ad633a6d44c1190f /addons/mass_mailing/static/src/js/mass_mailing_editor.js | |
| parent | 2e785a886905333758497150b17b0df1d0ef66d6 (diff) | |
Revert "[FIX] web_editor: test jinja content to load editor in codeview"
This reverts commit f38f8930f0436a40f675fa1d054a9d46f550d440.
Revert for internal choice. Odoo want to use qweb in template and remove jinja support on next version.
If users want to use jinja they can change the view to use text widget instead of html widget.
Diffstat (limited to 'addons/mass_mailing/static/src/js/mass_mailing_editor.js')
| -rw-r--r-- | addons/mass_mailing/static/src/js/mass_mailing_editor.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/addons/mass_mailing/static/src/js/mass_mailing_editor.js b/addons/mass_mailing/static/src/js/mass_mailing_editor.js index 95e7bc648b0..7b312373e8d 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_editor.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_editor.js @@ -239,9 +239,9 @@ window.top.odoo[callback+"_updown"] = function (value, fields_values, field_name delete odoo_top[callback+"_updown"]; return; } - var se = snippets_editor.instance; + var $editable = $("#editable_area"); - var _val = se.get_codesource(); + var _val = $editable.prop("innerHTML"); var editor_enable = $('body').hasClass('editor_enable'); value = value || ""; @@ -250,16 +250,12 @@ window.top.odoo[callback+"_updown"] = function (value, fields_values, field_name if (value !== fields_values[field_name]) { rte.history.recordUndo($editable); } - se.make_active(false); + snippets_editor.instance.make_active(false); } if (value.indexOf('on_change_model_and_list') === -1) { - if (!$editable.hasClass('codeview')) { - $('.note-popover button[data-name="codeview"]').click(); - } - $('textarea.codesource').val(value).data('indexOfnit', value); - $('.note-popover button[data-name="codeview"]').click(); + $editable.html(value); if (editor_enable) { web_editor.editor_bar.display_theme_from_html(); |
