summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Paridans <app@odoo.com>2019-04-08 14:15:47 +0000
committerPierre Paridans <app@odoo.com>2019-04-10 07:38:04 +0000
commit1f33ee82d03250dbf0d5bc68bdfb5b1eb447aa69 (patch)
tree0f376e2559138ada073148b560940400db692a44
parent8b7f88edd2abba382e4f7ef389a310aa913cab67 (diff)
[IMP] mail: chat window send message
On a chat window on mobile, the keyboard can be closed by clicking in the conversation, then there's no way to send your message. This commit add a "send" icon in the input, after emoji and attachments icon. Actually the button was already present on mobile but hidden because of the class o_composer_button_send (used for multiple "send" buttons). This is fixed by restricting the hidding only to the desired button. It also removes an unused 1px top/bottom margin on the thread composer (wasn't visible as the buttons' background color is the same as their parent's background). Finally applying the brand-primary text color on the "send" button only when not being in a "mini composer" mode instead of globally. Task ID: 1943863 closes odoo/odoo#32568 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
-rw-r--r--addons/mail/static/src/scss/composer.scss14
-rw-r--r--addons/mail/static/src/xml/composer.xml2
2 files changed, 8 insertions, 8 deletions
diff --git a/addons/mail/static/src/scss/composer.scss b/addons/mail/static/src/scss/composer.scss
index 9dbdf8fde89..e7f7eb98d3b 100644
--- a/addons/mail/static/src/scss/composer.scss
+++ b/addons/mail/static/src/scss/composer.scss
@@ -15,7 +15,6 @@
.o_thread_composer {
flex: 0 0 auto;
display: flex;
- margin: 1px 0;
border-top: none;
background: theme-color('light');
@@ -69,11 +68,6 @@
.o_composer_button_full_composer {
@include o-position-absolute(auto, 0);
}
- @include media-breakpoint-down(sm) {
- .o_composer_button_send {
- color: $o-brand-primary;
- }
- }
.o_mail_emoji_container {
padding: 0 $o-mail-chatter-gap $o-mail-chatter-gap 0;
@@ -120,6 +114,12 @@
.o_mail_emoji_container {
margin: 0 -$o-mail-chatter-gap;
}
+
+ @include media-breakpoint-down(sm) {
+ .o_composer_button_send {
+ color: $o-brand-primary;
+ }
+ }
}
.o_composer, .o_composer_subject {
@@ -243,7 +243,7 @@
}
}
}
- .o_composer_button_send, .o_chatter_avatar {
+ .o_composer_send .o_composer_button_send, .o_chatter_avatar {
display: none !important;
}
}
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index f405617affa..83ce49a7021 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -19,7 +19,7 @@
<div class="o_chatter_composer_tools">
<button tabindex="4" class="btn btn-secondary fa fa-smile-o o_composer_button_emoji" type="button" data-toggle="popover" title="Emojis" aria-label="Emojis"/>
<button tabindex="5" class="btn btn-secondary fa fa-paperclip o_composer_button_add_attachment" type="button" aria-label="Add attachment" title="Add attachment"/>
- <button t-if="widget.options.isMobile" tabindex="3" class="btn btn-secondary fa fa-paper-plane-o o_composer_button_send" type="button" title="Send" aria-label="Send"/>
+ <button t-if="widget.options.isMobile" tabindex="3" t-attf-class="btn #{widget.isMini ? 'btn-primary' : 'btn-secondary'} fa fa-paper-plane-o o_composer_button_send" type="button" title="Send" aria-label="Send"/>
</div>
</div>
</div>