From c0769308638d00cb983f84d9fa8736400463fef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 4 Sep 2019 11:11:05 +0000 Subject: [PATCH] [FIX] portal: allow portal discuss attachment css to be applied on popup composer PURPOSE Allow to manage attachments when updating a frontend review. SPECIFICATIONS Popup composer used notably in website_rating (eLearning, eCommerce) is not instantiated inside a frontend chatter. It does not get all available CSS rules as those are all set inside o_portal_chatter. In this commit we move some CSS rules to allow using them in composer or chatter independently of how they are instantiated. LINKS Task 2066600 (manage attachments) Task 2058595 (eLearning v13 testing) --- addons/portal/static/src/scss/portal.scss | 108 ++++++++++++---------- 1 file changed, 60 insertions(+), 48 deletions(-) diff --git a/addons/portal/static/src/scss/portal.scss b/addons/portal/static/src/scss/portal.scss index 5f24609f233..5bd0b6ff02d 100644 --- a/addons/portal/static/src/scss/portal.scss +++ b/addons/portal/static/src/scss/portal.scss @@ -418,54 +418,6 @@ img.o_we_custom_image { width: 50px; } -.o_portal_chatter { - padding: 10px; - - .o_portal_chatter_avatar{ - width: 45px; - height: 45px; - margin-right: 1rem; - } - - .o_portal_chatter_header { - margin-bottom: 15px; - } - - .o_portal_chatter_composer { - margin-bottom: 15px; - } - - .o_portal_chatter_messages { - margin-bottom: 15px; - - .o_portal_chatter_message_title { - p { - font-size:85%; - color:$o-main-color-muted; - margin: 0px; - } - } - } - - .o_portal_chatter_pager { - text-align: center; - } - - .o_portal_chatter_attachment { - .o_portal_chatter_attachment_name { - word-wrap: break-word; - } - - .o_portal_chatter_attachment_delete { - @include o-position-absolute($top: 0, $right: 0); - opacity: 0; - } - &:hover .o_portal_chatter_attachment_delete { - opacity: 1; - } - } -} - form label { font-weight: $font-weight-bold; &.label-optional { @@ -512,3 +464,63 @@ form label { } } } + +// ------------------------------------------------------------ +// Frontend Discuss widget +// ------------------------------------------------------------ + +// Readonly display +.o_portal_chatter { + padding: 10px; + + .o_portal_chatter_avatar { + width: 45px; + height: 45px; + margin-right: 1rem; + } + + .o_portal_chatter_header { + margin-bottom: 15px; + } + + .o_portal_chatter_composer { + margin-bottom: 15px; + } + + .o_portal_chatter_messages { + margin-bottom: 15px; + + .o_portal_chatter_message_title { + p { + font-size:85%; + color:$o-main-color-muted; + margin: 0px; + } + } + } + + .o_portal_chatter_pager { + text-align: center; + } + + +} + +// Readonly / Composer mix display +.o_portal_chatter, +.o_portal_chatter_composer { + .o_portal_chatter_attachment { + .o_portal_chatter_attachment_name { + word-wrap: break-word; + } + + .o_portal_chatter_attachment_delete { + @include o-position-absolute($top: 0, $right: 0); + opacity: 0; + } + + &:hover .o_portal_chatter_attachment_delete { + opacity: 1; + } + } +}