summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor/transcoder.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-08-10 13:37:21 +0200
committerChristophe Simonis <chs@odoo.com>2018-08-10 13:37:21 +0200
commit7499b47ffab0712e8a03655365b11450716e5717 (patch)
treee879b3f1dceb3bd3eb0b2c2ffba110a5760cb2c1 /addons/web_editor/static/src/js/editor/transcoder.js
parent78c9084ea207a043e9ae5494292190acf37830f3 (diff)
parentedd586002e985b9a34c6e58f48961a24d5f68387 (diff)
[MERGE] forward port branch saas-11.4 up to edd586002e9
Diffstat (limited to 'addons/web_editor/static/src/js/editor/transcoder.js')
-rw-r--r--addons/web_editor/static/src/js/editor/transcoder.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor/transcoder.js b/addons/web_editor/static/src/js/editor/transcoder.js
index 45962e0df8c..fb161a3887e 100644
--- a/addons/web_editor/static/src/js/editor/transcoder.js
+++ b/addons/web_editor/static/src/js/editor/transcoder.js
@@ -247,6 +247,10 @@ function applyOverDescendants(node, func) {
func(node);
applyOverDescendants(node, func);
}
+ var $node = $(node);
+ if (node.nodeName === 'A' && $node.hasClass('btn') && !$node.children().length && $(node).parents('.o_outlook_hack').length) {
+ node = $(node).parents('.o_outlook_hack')[0];
+ }
node = node.nextSibling;
}
}
@@ -282,7 +286,7 @@ function classToStyle($editable) {
// Outlook
if (node.nodeName === 'A' && $target.hasClass('btn') && !$target.hasClass('btn-link') && !$target.children().length) {
- var $hack = $('<table class="o_outlook_hack" style="display: inline-table;"><tr><td></td></tr></table>');
+ var $hack = $('<table class="o_outlook_hack" style="display: inline-table;vertical-align:middle"><tr><td></td></tr></table>');
$hack.find('td')
.attr('height', $target.outerHeight())
.css({