[FIX] Chatter: fixed suggested recipients, when having no email, unchecking the box was not taken into account.

bzr revid: tde@openerp.com-20130524144224-wbi1o27regxed7mn
This commit is contained in:
Thibault Delavallée 2013-05-24 16:42:24 +02:00
parent d0f4f8d017
commit 0816717526
2 changed files with 3 additions and 3 deletions

View File

@ -850,9 +850,9 @@ openerp.mail = function (session) {
on_checked_recipient: function (event) {
var $input = $(event.target);
var email = $input.attr("data");
var full_name = $input.attr("data");
_.each(this.recipients, function (recipient) {
if (recipient.email_address == email) {
if (recipient.full_name == full_name) {
recipient.checked = $input.is(":checked");
}
});

View File

@ -143,7 +143,7 @@
<div class="oe_recipients" t-if="!widget.is_log">
<t t-foreach='widget.recipients' t-as='recipient'>
<label t-attf-title="Add as recipient and follower (reason: #{recipient.reason})">
<input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.email_address"/>
<input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.full_name"/>
<t t-raw="recipient.name"/>
<t t-if="recipient.email_address">(<t t-raw="recipient.email_address"/>)</t>
<t t-if="!recipient.email_address">(no email address)</t>