[FIX] base: inline buttons was breaking into multiple lines (outlook hack)
Because we converted buttons into tables so inline buttons was breaking into multiple lines so we need to add display inline and vertical align properties in tables. We allowed display property from mail sensitizer whitelist. Because in this commit https://github.com/odoo/odoo/commit/cf15030ed09f7479f5b2701ba101a5bed71f7409 we use display property for align items
This commit is contained in:
committed by
Christophe Matthieu
parent
c76c21d607
commit
1369272f1a
@@ -287,7 +287,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({
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ class _Cleaner(clean.Cleaner):
|
||||
_style_whitelist = [
|
||||
'font-size', 'font-family', 'font-weight', 'background-color', 'color', 'text-align',
|
||||
'line-height', 'letter-spacing', 'text-transform', 'text-decoration',
|
||||
'float', 'vertical-align',
|
||||
'float', 'vertical-align', 'display',
|
||||
'padding', 'padding-top', 'padding-left', 'padding-bottom', 'padding-right',
|
||||
'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right',
|
||||
# box model
|
||||
|
||||
Reference in New Issue
Block a user