From 790df40a912f7cb31f7c40bb23658003c9bfd39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 29 Feb 2012 10:11:09 +0100 Subject: [PATCH] [FIX] On Wall: fixed more button on Wall. bzr revid: tde@openerp.com-20120229091109-f0fbr2gdcmjagna6 --- addons/mail/static/src/js/mail.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index fb6f4557734..79283f3ffab 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -43,6 +43,7 @@ openerp.mail = function(session) { this._super.apply(this, arguments); /* events */ this.$element.find('button.oe_mail_button_comment').bind('click', function () { self.do_comment(); }); + this.$element.find('button.oe_mail_button_more').bind('click', function () { self.do_more(); }); this.$element.find('div.oe_mail_thread_display').delegate('a.intlink', 'click', function (event) { // lazy implementation: fetch data and try to redirect self.do_action({ @@ -52,6 +53,7 @@ openerp.mail = function(session) { views: [[false, 'form']] }); }); + this.$element.find('div.oe_mail_thread_nomore').hide(); /* display user, fetch comments */ this.display_current_user(); if (this.params.records) return this.display_comments(this.params.records); @@ -66,8 +68,7 @@ openerp.mail = function(session) { var self = this; this.params.offset = 0; this.$element.find('div.oe_mail_thread_display').empty(); - return this.fetch_comments().then(function() { - self.$element.find('button.oe_mail_button_more').bind('click', function () { self.do_more(); }); }); + return this.fetch_comments().then(); }, fetch_comments: function (limit, offset) {