summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-04-10 15:53:51 +0200
committerThibault Delavallée <tde@odoo.com>2018-04-10 17:15:26 +0200
commit3f7c75ef1f6094b1d47ec8f8564a5c0511d2d6ba (patch)
tree10c610b8823a249515c10c507b46a055cefa5f8a /addons/mail/static/src
parent07ae0ccc4e4b4f79cf299f2a54ad3ee5e3a250af (diff)
[IMP] mail: display white background for user notifications in chatter
User notifications are defined as * notes; * pushed to user Inbox or email through classic notification process; * not linked to any document, meaning model and res_id are void; When pushed in user's Inbox they are currently displayed with a gray background like all notes. However UX experts think it should use a white background to be easier to spot in chatter. This commit makes it work. From now on discussion and user's notifications are displayed using a white background. This commit is related to task ID 1829872.
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/services/chat_manager.js2
-rw-r--r--addons/mail/static/src/xml/thread.xml2
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/services/chat_manager.js b/addons/mail/static/src/js/services/chat_manager.js
index ea6c9388f58..1abcd995084 100644
--- a/addons/mail/static/src/js/services/chat_manager.js
+++ b/addons/mail/static/src/js/services/chat_manager.js
@@ -1314,6 +1314,7 @@ var ChatManager = AbstractService.extend({
* @param {string} [data.info]
* @param {boolean} data.is_discussion
* @param {boolean} data.is_note
+ * @param {boolean} data.is_notification
* @param {string} data.message_type
* @param {string} [data.model]
* @param {boolean} data.module_icon src url of the module icon
@@ -1336,6 +1337,7 @@ var ChatManager = AbstractService.extend({
is_author: data.author_id && data.author_id[0] === session.partner_id,
is_note: data.is_note,
is_discussion: data.is_discussion,
+ is_notification: data.is_notification,
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/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index 1019b141b75..118e96da8ff 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -121,7 +121,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' : '') + (message.is_discussion ? ' o_mail_discussion' : ' o_mail_not_discussion')" 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 or message.is_notification ? ' 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"