From a02445bf2d9919585e87fcb0dae5b8b9a93075d5 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Fri, 8 Jun 2012 19:20:16 +0200 Subject: [PATCH 01/93] more improvement to chatter bzr revid: mit@openerp.com-20120608172016-nkay98ce3yq8gc4o --- addons/mail/static/src/js/mail.js | 15 ++++++++++++--- addons/mail/static/src/xml/mail.xml | 16 ++++++++-------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 905e95f3aef..1133769a4ee 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -95,7 +95,7 @@ openerp.mail = function(session) { this.params = params; this.params.parent_id = this.params.parent_id || false; this.params.thread_level = this.params.thread_level || 0; - this.params.msg_more_limit = this.params.msg_more_limit || 100; + this.params.msg_more_limit = this.params.msg_more_limit || 290; this.params.limit = this.params.limit || 100; this.params.offset = this.params.offset || 0; this.params.records = this.params.records || null; @@ -282,8 +282,8 @@ openerp.mail = function(session) { ).appendTo(this.$element.children('div.oe_mail_thread_display:first')); // truncated: hide full-text, show summary, add buttons if (record.tr_body) { - var node_body = this.$element.find('span.oe_mail_msg_body:last').append(' [ ... Show less]'); - var node_body_short = this.$element.find('span.oe_mail_msg_body_short:last').append(' [ ... Show more]'); + var node_body = this.$element.find('span.oe_mail_msg_body:last').append('... Less'); + var node_body_short = this.$element.find('span.oe_mail_msg_body_short:last').append('... More'); node_body.hide(); node_body.find('a:last').click(function() { node_body.hide(); node_body_short.show(); return false; }); node_body_short.find('a:last').click(function() { node_body_short.hide(); node_body.show(); return false; }); @@ -613,6 +613,7 @@ openerp.mail = function(session) { start: function () { this._super.apply(this, arguments); var self = this; + this.display_current_user(); // add events this.add_event_handlers(); // load mail.message search view @@ -672,6 +673,14 @@ openerp.mail = function(session) { }); }, + display_current_user: function () { + return this.$element.find('img.oe_mail_msg_image').attr('src', this.thread_get_avatar('res.users', 'avatar', this.session.uid)); + }, + + thread_get_avatar: function(model, field, id) { + return this.session.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + (id || ''); + }, + /** * Initializes the wall and calls fetch_comments * @param {Number} limit: number of notifications to fetch diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index a34e362960b..9f5fb8cd818 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -72,27 +72,27 @@

- +

@@ -102,7 +102,7 @@

- +

From:

@@ -115,12 +115,12 @@
    -
  • Delete ·
  • +
  • Delete ·
  • -
  • Hide ·
  • +
  • Hide ·
  • From c54a82ef4f5148f3e9d3a84f9f712dd0cde712d4 Mon Sep 17 00:00:00 2001 From: Minh Tran Date: Thu, 14 Jun 2012 19:33:58 +0200 Subject: [PATCH 02/93] Fixed chatter textarea bzr revid: mit@openerp.com-20120614173358-yto27o9cstqyb2sr --- addons/mail/static/src/xml/mail.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 5ff8a996116..9ea137916fe 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -45,9 +45,7 @@
    User img -
    -