diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-06-06 15:29:25 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-06-06 15:29:25 +0200 |
| commit | d5d2f88b010315913bfde469e905fc100e7d1b76 (patch) | |
| tree | e4b92568cbceccf9015ead4262ff8490b10352b8 /addons/mail/static/src | |
| parent | b45fc9bb82dd8a1bf0fea1848b69a9deb22cdfdc (diff) | |
| parent | a5698b8016f4cf31973cf0f31c1d5d5622632003 (diff) | |
[MERGE] Forward porting of saas-1 up to revision 8739
bzr revid: mat@openerp.com-20130606132925-buuf13n6m73cen6i
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 11 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 8631bc70baa..7df6cdbef0d 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -219,6 +219,7 @@ openerp.mail = function (session) { this.type = datasets.type || false, this.subtype = datasets.subtype || false, this.is_author = datasets.is_author || false, + this.author_avatar = datasets.author_avatar || false, this.is_private = datasets.is_private || false, this.subject = datasets.subject || false, this.name = datasets.name || false, @@ -260,8 +261,10 @@ openerp.mail = function (session) { this.date = this.date ? session.web.str_to_datetime(this.date) : false; if (this.date && new Date().getTime()-this.date.getTime() < 7*24*60*60*1000) { this.timerelative = $.timeago(this.date); - } - if (this.type == 'email' && (!this.author_id || !this.author_id[0])) { + } + if (this.author_avatar) { + this.avatar = "data:image/png;base64," + this.author_avatar; + } else if (this.type == 'email' && (!this.author_id || !this.author_id[0])) { this.avatar = ('/mail/static/src/img/email_icon.png'); } else if (this.author_id && this.template != 'mail.compose_message') { this.avatar = mail.ChatterUtils.get_image(this.session, 'res.partner', 'image_small', this.author_id[0]); @@ -850,9 +853,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"); } }); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index ab82d650f30..f5004941a8d 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -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> |
