summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorsgo@tinyerp.com <>2013-06-10 10:30:15 +0530
committersgo@tinyerp.com <>2013-06-10 10:30:15 +0530
commitfea1eaf1d65c97743e2d4188c8ae5dc5fc581e2b (patch)
treef07db151ab633b6ddcb0012d281ceac2746c916a /addons/mail/static/src
parentd3c7f6becffc7830f8f4c26b6cef7842d4a8ac4a (diff)
parent70f16ce73b0dab305b9e7d63a74416cbcb0448da (diff)
[MERGE]sync with parent
bzr revid: sgo@tinyerp.com-20130610050015-cuk6adbhzsmaas8s
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/mail.js11
-rw-r--r--addons/mail/static/src/xml/mail.xml2
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>