diff options
| author | Thibault Delavallée <tde@openerp.com> | 2012-04-06 13:33:50 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2012-04-06 13:33:50 +0200 |
| commit | 3fa154178f348c3d06295d5ab5f2e86b9e9fc1aa (patch) | |
| tree | ae2becfc7cb505cda0314d25bc8cd4d0d9418434 /addons/mail/static/src | |
| parent | c21453db8d8de14122039194ff8d84ac7ebab623 (diff) | |
[FIX] Fixed email not displaying their bodies in feeds.
bzr revid: tde@openerp.com-20120406113350-u3uahnk4kj26ca0d
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 | 7 |
2 files changed, 10 insertions, 8 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 72647ce17b4..75eed5e51d6 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -273,15 +273,16 @@ openerp.mail = function(session) { if (record.type == 'email') { record.mini_url = ('/mail/static/src/img/email_icon.png'); } else { record.mini_url = this.thread_get_avatar('res.users', 'avatar', record.user_id[0]); } // body text manipulation - record.body_text = this.do_clean_text(record.body_text); - record.tr_body_text = this.do_truncate_string(record.body_text, this.params.msg_more_limit); - record.body_text = this.do_replace_internal_links(record.body_text); - if (record.tr_body_text) record.tr_body_text = this.do_replace_internal_links(record.tr_body_text); + record.body = this.do_clean_text(record.body); + record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit); + record.body = this.do_replace_internal_links(record.body); + if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body); + console.log(record.body); // render $(session.web.qweb.render('ThreadMsg', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}) ).appendTo(this.$element.children('div.oe_mail_thread_display:first')); // truncated: hide full-text, show summary, add buttons - if (record.tr_body_text) { + if (record.tr_body) { var node_body = this.$element.find('span.oe_mail_msg_body:last').append(' <a href="#" class="reduce">[ ... Show less]</a>'); var node_body_short = this.$element.find('span.oe_mail_msg_body_short:last').append(' <a href="#" class="expand">[ ... Show more]</a>'); node_body.hide(); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index b2c72792b04..0f49902b6b3 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -66,8 +66,8 @@ <t t-name="NoteDisplay"> <p class="oe_mail_msg"> <a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a> - <span class="oe_mail_msg_body"><t t-raw="record.body_text"/></span> - <t t-if="record.tr_body_text"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body_text"/></span></t> + <span class="oe_mail_msg_body"><t t-raw="record.body"/></span> + <t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t> <br /> <span class="oe_mail_oe_fade"> <a href="#" class="intlink oe_mail_oe_intlink" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}'><t t-raw="record.user_id[1]"/></a> @@ -90,7 +90,8 @@ <span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/><br /> </p> <p class="oe_mail_msg"> - <span class="oe_mail_msg_body"><t t-raw="record.body_text"/></span> + <span class="oe_mail_msg_body"><t t-raw="record.body"/></span> + <t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t> </p> </t> |
