diff options
| author | Ajay Chauhan (OpenERP) <cha@tinyerp.com> | 2012-07-10 15:52:01 +0530 |
|---|---|---|
| committer | Ajay Chauhan (OpenERP) <cha@tinyerp.com> | 2012-07-10 15:52:01 +0530 |
| commit | 6dbd4e000dcb22d2ffcfeb7a9080eeffcbbcc7f8 (patch) | |
| tree | 5d1c3d763d9282312b22ca9e226515f20ce37d47 /addons/mail/static/src | |
| parent | 4e08b80952c7f50357f8f97b69495562631e9d55 (diff) | |
| parent | f25ad676a34670f4ba1ac14bf2d6babd8ccc88b5 (diff) | |
[MERGE] merge with parent branch
bzr revid: cha@tinyerp.com-20120710102201-h5mjjkoyprp70lf0
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/img/icon.png | bin | 0 -> 5754 bytes | |||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 12 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/addons/mail/static/src/img/icon.png b/addons/mail/static/src/img/icon.png Binary files differnew file mode 100644 index 00000000000..53ccc469127 --- /dev/null +++ b/addons/mail/static/src/img/icon.png diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 3c0b61c173e..0f68a548590 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -91,7 +91,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; @@ -304,7 +304,6 @@ openerp.mail = function(session) { // format date according to the user timezone record.date = session.web.format_value(record.date, {type:"datetime"}); - var rendered = session.web.qweb.render('mail.Thread.message', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}); $(rendered).appendTo(this.$element.children('div.oe_mail_thread_display:first')); // expand feature @@ -635,6 +634,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 @@ -694,6 +694,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 2eb3a390933..982fb8aeb2f 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -56,9 +56,7 @@ <div t-name="mail.Thread" class="oe_mail oe_mail_thread"> <div class="oe_mail_thread_action"> <img class="oe_mail_msg_image oe_left" alt="User img"/> - <div class="oe_mail_msg_content"> - <textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/> - </div> + <textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/> </div> <div class="oe_mail_thread_display"></div> <div class="oe_mail_thread_more"> |
