diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 0d153ce0c06..be5e8425630 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -5,6 +5,11 @@ padding: 5px 5px 5px 5px; } +.oe_mail_wall_main { + overflow: auto; + padding: 5px 5px 5px 5px; +} + /* 2 columns view */ .oe_mail_main_left { float: left; diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index b9404885b6a..cd2e1f2ac5d 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -34,7 +34,6 @@ openerp.mail = function(session) { }, stop: function () { - console.log('stop'); this._super.apply(this, arguments); }, @@ -134,39 +133,37 @@ openerp.mail = function(session) { start: function() { var self = this; this._super.apply(this, arguments); - console.log(this); - self.$element.find('button.oe_mail_action_comment').bind('click', function () { self.do_comment(); }); - this.ds_msg.call('get_pushed_messages', [[], self.filter_search]).then( - this.proxy('display_records')); + self.$element.find('button.oe_mail_button_comment').bind('click', function () { self.do_comment(); }); + return this.fetch_comments(); }, stop: function () { this._super(); }, - fetch_messages: function () { - console.log('debug--fetch_messages'); - return this.ds_msg.call('get_pushed_messages', []).then( - this.proxy('display_records')); + fetch_comments: function () { + var load_res = this.ds_msg.call('get_pushed_messages', [[this.session.uid]]).then( + this.proxy('display_comments')); + return load_res; }, - display_records: function (records) { - this.$element.find('div.oe_mail_comments').empty(); + display_comments: function (records) { + this.$element.find('div.oe_mail_msg').empty(); var self = this; _(records).each(function (record) { + console.log(record); var template = 'ThreadMsgView'; var render_res = session.web.qweb.render(template, { 'record': record, }); - $('