From c76c21d607271fdc5440ba3319e31586fcfd3d73 Mon Sep 17 00:00:00 2001 From: Deep Patel Date: Wed, 20 Jun 2018 18:20:54 +0530 Subject: [FIX] mass_mailing: fixed multiple buttons transcoding issues (outlook hack fix) Because of outlook hack node was not find next sibling of current element. Due to this only first button is transcoded into inline css. --- addons/web_editor/static/src/js/editor/transcoder.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/web_editor/static/src/js/editor/transcoder.js') diff --git a/addons/web_editor/static/src/js/editor/transcoder.js b/addons/web_editor/static/src/js/editor/transcoder.js index 175f920fa86..bdc801b3a4b 100644 --- a/addons/web_editor/static/src/js/editor/transcoder.js +++ b/addons/web_editor/static/src/js/editor/transcoder.js @@ -248,6 +248,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; } } -- cgit v1.2.3