diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-11-18 11:30:50 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-18 19:28:21 +0000 |
| commit | a9a2fba6830bb7f1eaf14c6155b5dace10bb9c03 (patch) | |
| tree | e6787b24a23e44db59e9fc259e18a5786d2958c1 | |
| parent | 760ae910d46f36957e61353290f6edc58b29c5da (diff) | |
[FIX] web_editor: remove forced source mode
In e29c08969 source mode was reintroduced. Since complex template seemed
broken when it was edited, the feature of forcing source mode when there
is a `% if ` or `% set` template directive of 12.3 was reintroduced.
Since the direct breaking of the template was mostly solved with the
added line:
`options.prettifyHtml = false;`
the force source mode is not so much necessary and there was report that
it was not very clear.
In this commit it is removed, and if necessary could be reintroduced
later with clearer implementation.
opw-2123730
fix #40410
closes #40421
closes odoo/odoo#40458
X-original-commit: be30a3ba431cf24a5fcfdfedd0f9d9f73163c717
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
| -rw-r--r-- | addons/web_editor/static/src/js/backend/field_html.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/addons/web_editor/static/src/js/backend/field_html.js b/addons/web_editor/static/src/js/backend/field_html.js index 28613d9e0a7..5b98ef8e7c3 100644 --- a/addons/web_editor/static/src/js/backend/field_html.js +++ b/addons/web_editor/static/src/js/backend/field_html.js @@ -485,12 +485,6 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, { top: '+5px', }); this.$el.append($button); - // force source editor if it contains multiline Jinja directives - if (jinjaRegex.test(this._getValue())) { - var layoutInfo = $.summernote.core.dom.makeLayoutInfo(this.wysiwyg.$editor); - layoutInfo.toolbar().hide(); - $.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo, true); - } }, /** * @private |
