Thibault Delavallée (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/7.0-timeago-2-chm into lp:openobject-addons/7.0.
Requested reviews: OpenERP Core Team (openerp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-timeago-2-chm/+merge/145598 -- https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-timeago-2-chm/+merge/145598 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/7.0-timeago-2-chm.
=== modified file 'mail/static/src/js/mail.js' --- mail/static/src/js/mail.js 2013-01-30 12:15:23 +0000 +++ mail/static/src/js/mail.js 2013-01-30 12:57:24 +0000 @@ -218,7 +218,7 @@ this.author_id = datasets.author_id || false, this.attachment_ids = datasets.attachment_ids || [], this.partner_ids = datasets.partner_ids || []; - this._date = datasets.date; + this.date = datasets.date; this.format_data(); @@ -243,8 +243,9 @@ /* Convert date, timerelative and avatar in displayable data. */ format_data: function () { //formating and add some fields for render - if (this._date) { - this.timerelative = $.timeago(this._date+"Z"); + if (this.date && new Date().getTime()-Date.parse(this.date).getTime() < 7*24*60*60*1000) { + debugger; + this.timerelative = $.timeago(this.date+"Z"); } if (this.type == 'email' && (!this.author_id || !this.author_id[0])) { this.avatar = ('/mail/static/src/img/email_icon.png'); === modified file 'mail/static/src/xml/mail.xml' --- mail/static/src/xml/mail.xml 2013-01-04 11:10:04 +0000 +++ mail/static/src/xml/mail.xml 2013-01-30 12:57:24 +0000 @@ -246,7 +246,7 @@ <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[2]"/></a> <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-raw="widget.author_id[2]"/></span> <span class='oe_subtle'>•</span> - <span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span> + <span t-att-title="widget.date"><t t-if="widget.timerelative" t-raw="widget.timerelative"/><t t-if="!widget.timerelative" t-raw="widget.date"/></span> <span t-if="!widget.options.readonly" class='oe_subtle'>•</span> <t t-if="!widget.options.readonly" t-call="mail.thread.message.vote"/> </div>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp