diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-01-09 19:59:27 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-01-09 19:59:27 +0100 |
| commit | d7c5bc02cc2b27442f0d4c8aca70266762be2a32 (patch) | |
| tree | 3a675d15b539a4474be38704405b318bebecdce7 /addons/web_editor/static | |
| parent | 37b518f1749aff3d6ffb2246c32f2aa1e67d9067 (diff) | |
| parent | 8aa8548d8ab68feb13f3bde51c557db84877e809 (diff) | |
[MERGE] forward port branch saas-12.1 up to 8aa8548d8ab
Diffstat (limited to 'addons/web_editor/static')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/transcoder.js | 10 | ||||
| -rw-r--r-- | addons/web_editor/static/src/scss/web_editor.ui.scss | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor/transcoder.js b/addons/web_editor/static/src/js/editor/transcoder.js index fb161a3887e..85903f6b4eb 100644 --- a/addons/web_editor/static/src/js/editor/transcoder.js +++ b/addons/web_editor/static/src/js/editor/transcoder.js @@ -251,6 +251,9 @@ function applyOverDescendants(node, func) { if (node.nodeName === 'A' && $node.hasClass('btn') && !$node.children().length && $(node).parents('.o_outlook_hack').length) { node = $(node).parents('.o_outlook_hack')[0]; } + else if (node.nodeName === 'IMG' && $node.parent('p').hasClass('o_outlook_hack')) { + node = $node.parent()[0]; + } node = node.nextSibling; } } @@ -307,6 +310,9 @@ function classToStyle($editable) { $(node).remove(); } } + else if (node.nodeName === 'IMG' && $target.is('.mx-auto.d-block')) { + $target.wrap('<p class="o_outlook_hack" style="text-align:center;margin:0"/>'); + } }); } @@ -318,8 +324,8 @@ function classToStyle($editable) { */ function styleToClass($editable) { // Outlook revert - $editable.find('table.o_outlook_hack').each(function () { - $(this).after($('a', this)); + $editable.find('.o_outlook_hack').each(function () { + $(this).after($('a,img', this)); }).remove(); getMatchedCSSRules($editable[0]); diff --git a/addons/web_editor/static/src/scss/web_editor.ui.scss b/addons/web_editor/static/src/scss/web_editor.ui.scss index ad9da79f788..06e56ee657f 100644 --- a/addons/web_editor/static/src/scss/web_editor.ui.scss +++ b/addons/web_editor/static/src/scss/web_editor.ui.scss @@ -1239,6 +1239,7 @@ body.editor_enable { height: 70%; // in case flex is not supported flex: 1 1 auto; .ace_gutter { + display: block!important; // display even with aria-hidden cursor: ew-resize; .ace_gutter-cell.o_error { |
