[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)
This commit is contained in:
Thibault Delavallée
2019-09-04 11:41:47 +00:00
parent bb197b1f87
commit c076930863
+60 -48
View File
@@ -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;
}
}
}