From 5c3ebca3c600c23f81315f801427fa8c2f157cb0 Mon Sep 17 00:00:00 2001 From: x620 Date: Wed, 4 May 2016 15:26:15 +0500 Subject: [PATCH] [FIX] default icons opacity - 0.4, mouseover on message - 0.7, mouseover on icon - 1 [FIX] more recipients moved to tooltip --- mail_to/static/src/css/mail_to.css | 26 ++++++++------------------ mail_to/static/src/js/mail_to.js | 15 +++++++++++++++ mail_to/static/src/xml/recipient.xml | 22 +++++++++------------- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/mail_to/static/src/css/mail_to.css b/mail_to/static/src/css/mail_to.css index 3464d76..bdbae0d 100644 --- a/mail_to/static/src/css/mail_to.css +++ b/mail_to/static/src/css/mail_to.css @@ -8,26 +8,16 @@ .o_mail_thread .o_thread_message span.recipients_info, .o_mail_thread .o_thread_message i.o_thread_message_star, .o_mail_thread .o_thread_message i.o_thread_message_reply, -.o_mail_thread .o_thread_message i.o_thread_message_needaction -{ - opacity: 0.5; +.o_mail_thread .o_thread_message i.o_thread_message_needaction { + opacity: 0.4; } -.o_mail_thread .o_thread_message:hover span.recipients_info, + .o_mail_thread .o_thread_message:hover i.o_thread_message_star, .o_mail_thread .o_thread_message:hover i.o_thread_message_reply, -.o_mail_thread .o_thread_message:hover i.o_thread_message_needaction -{ - opacity: 1; -} -.more_4 { - display: none; +.o_mail_thread .o_thread_message:hover i.o_thread_message_needaction { + opacity: 0.7; } -.more_4_link { - display: block; -} -.o_mail_thread .o_thread_message:hover span.more_4_link { - display: none; + +.o_mail_thread .o_thread_message:hover span.recipients_info { + opacity: 1; } -.o_mail_thread .o_thread_message:hover span.more_4 { - display: block; -} \ No newline at end of file diff --git a/mail_to/static/src/js/mail_to.js b/mail_to/static/src/js/mail_to.js index 48f3c6e..dfe232e 100644 --- a/mail_to/static/src/js/mail_to.js +++ b/mail_to/static/src/js/mail_to.js @@ -8,6 +8,21 @@ odoo.define('mail_to.MailTo', function (require) { var msg = this._super(data); msg.partner_ids = data.partner_ids; // msg.needaction_partner_ids = data.needaction_partner_ids; + + var more_recipients = ''; + // value which define more recipients + msg.more_recipients_value = 4; + for (var i = 0; i < msg.partner_ids.length; i++){ + if (i >= msg.more_recipients_value){ + // append names + more_recipients += msg.partner_ids[i][1]; + // separate them with semicolon + if (i < msg.partner_ids.length - 1){ + more_recipients += '; '; + } + } + } + msg.more_recipients = more_recipients; return msg; } }); diff --git a/mail_to/static/src/xml/recipient.xml b/mail_to/static/src/xml/recipient.xml index f32287e..e445b47 100644 --- a/mail_to/static/src/xml/recipient.xml +++ b/mail_to/static/src/xml/recipient.xml @@ -5,20 +5,16 @@ To: - - + + ; - - - - ; - - - - and more... - - + + + + + + and more +