diff options
| author | Xavier-Do <Xavier-Do@users.noreply.github.com> | 2018-01-19 11:52:10 +0100 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2018-01-30 14:49:03 +0100 |
| commit | c99de4551583e801ecc6669ac456c4f7e2eef1da (patch) | |
| tree | bcf7a41437147ce9675f9219b2cb2f2ad6d3742b /addons/mail/static/src | |
| parent | ba5133dc6329cf373a809f330eea5ef19367c232 (diff) | |
[IMP] chatter: improve chatter readability
Only messages as comments and email template should keep a white backround since they are not internal.
It is also enough to display fields that changed on subtypes (update message) since emails will be reworked soon and more information will be given there. The support of 'always' track can be removed. (is now considered as a simple tracked field)
The use of self.env.ref('mail.mt_comment').id add some query and the performance tests needs to be update since message_format is called by notify_by_chat. This code will be refactor later
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 1 | ||||
| -rw-r--r-- | addons/mail/static/src/less/thread.less | 11 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/thread.xml | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index 9d1b9cddb70..35d16915341 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -130,6 +130,7 @@ function make_message (data) { subtype_description: data.subtype_description, is_author: data.author_id && data.author_id[0] === session.partner_id, is_note: data.is_note, + is_discussion: data.is_discussion, is_system_notification: (data.message_type === 'notification' && data.model === 'mail.channel') || data.info === 'transient_message', attachment_ids: data.attachment_ids || [], diff --git a/addons/mail/static/src/less/thread.less b/addons/mail/static/src/less/thread.less index 3683ecd9bbe..8d8bc761829 100644 --- a/addons/mail/static/src/less/thread.less +++ b/addons/mail/static/src/less/thread.less @@ -47,6 +47,11 @@ padding: 4px @odoo-horizontal-padding; margin-bottom: 0px; + &.o_mail_not_discussion { + background-color: @mail-thread-note; + border-bottom: 1px solid @gray-lighter-dark; + } + .o_thread_message_sidebar { .o-flex(0, 0, @mail-thread-avatar-size); margin-right: 10px; @@ -109,11 +114,7 @@ text-align: justify; } - &.o_mail_note { - background-color: @mail-thread-note; - padding-left: @grid-gutter-width*0.3; - border-bottom: 1px solid @gray-lighter-dark; - } + .o_mail_subject { font-style: italic; diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 7806029557b..611b3a3997a 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -139,7 +139,7 @@ </t> <t t-name="mail.ChatThread.Message"> - <div t-att-class="'o_thread_message' + (message.expanded ? ' o_message_expanded ' : ' ') + (message.is_selected ? 'o_thread_selected_message' : '')" t-att-data-message-id="message.id"> + <div t-att-class="'o_thread_message' + (message.expanded ? ' o_message_expanded ' : ' ') + (message.is_selected ? 'o_thread_selected_message' : '') + (message.is_discussion ? ' o_mail_discussion' : ' o_mail_not_discussion')" t-att-data-message-id="message.id"> <div t-if="options.display_avatar" class="o_thread_message_sidebar"> <t t-if="!message.mailto and message.author_id[0]"> <img t-if="message.avatar_src and message.display_author" |
