diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-09-06 10:35:00 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-09-06 10:35:00 +0200 |
| commit | 8a3f1742e0e9c7acaae726e5c7106d2d7df7e970 (patch) | |
| tree | 78ae5d981fcd25677caea5c8b3999b1e77bf4547 /addons/mail/static/src | |
| parent | 6f6c59ec1de1881a70e4bf728ea5d8b56bd609f9 (diff) | |
| parent | c80cf7d0646463b290137c26fbada568a6942b00 (diff) | |
[MERGE] from website-al
bzr revid: chm@openerp.com-20130906083500-4n5knaxiqt4cg2ht
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/css/mail.css | 3 | ||||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 18 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 8 |
3 files changed, 18 insertions, 11 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index c6f7c911f8a..a4beca607ba 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -118,6 +118,9 @@ text-overflow:ellipsis; word-wrap: break-word; } +.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body .oe_mail_cleaned { + display: none; +} /* a) Indented Messages */ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 1d3b5a91176..79694cfc9f5 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -225,6 +225,7 @@ openerp.mail = function (session) { this.name = datasets.name || false, this.record_name = datasets.record_name || false, this.body = datasets.body || '', + this.body_short = datasets.body_short || '', this.vote_nb = datasets.vote_nb || 0, this.has_voted = datasets.has_voted || false, this.is_favorite = datasets.is_favorite || false, @@ -943,7 +944,6 @@ openerp.mail = function (session) { start: function () { this._super.apply(this, arguments); - this.expender(); this.bind_events(); if(this.thread_level < this.options.display_indented_thread) { this.create_thread(); @@ -966,6 +966,8 @@ openerp.mail = function (session) { this.$('.oe_reply').on('click', this.on_message_reply); this.$('.oe_star').on('click', this.on_star); this.$('.oe_msg_vote').on('click', this.on_vote); + this.$('.oe_mail_expand').on('click', this.on_expand); + this.$('.oe_mail_reduce').on('click', this.on_expand); this.$('.oe_mail_action_model').on('click', this.on_record_clicked); }, @@ -994,15 +996,11 @@ openerp.mail = function (session) { return false; }, - expender: function () { - this.$('.oe_msg_body:first').expander({ - slicePoint: this.options.truncate_limit, - expandText: _t('read more'), - userCollapseText: _t('read less'), - detailClass: 'oe_msg_tail', - moreClass: 'oe_mail_expand', - lessClass: 'oe_mail_reduce', - }); + on_expand: function (event) { + event.stopPropagation(); + this.$('.oe_msg_body_short:first').toggle(); + this.$('.oe_msg_body_long:first').toggle(); + return false; }, /** diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 94ee1ff452f..1be9754e1c7 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -266,7 +266,13 @@ <t t-if="widget.subject" t-raw="widget.subject"/> </h1> <div class="oe_msg_body"> - <t t-raw="widget.body"/> + <t t-if="widget.body_short"> + <div class="oe_msg_body_short"><t t-raw="widget.body_short"/></div> + <div class="oe_msg_body_long" style="display: none;"><t t-raw="widget.body"/><span class="oe_mail_reduce"><a href="#">read less</a></span></div> + </t> + <t t-if="! widget.body_short"> + <t t-raw="widget.body"/> + </t> </div> </div> <div class="oe_msg_footer"> |
