From 2f5faf419d7dabf4fcef1b351e68a947011773de Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 30 Nov 2012 16:03:13 +0100 Subject: [PATCH] Added scroll in chat bzr revid: nicolas.vanhoren@openerp.com-20121130150313-rrh17i2yo2tbvilu --- addons/web_im/static/src/js/im.js | 3 ++- addons/web_im/static/src/xml/im.xml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web_im/static/src/js/im.js b/addons/web_im/static/src/js/im.js index b811aea9593..a709a727334 100644 --- a/addons/web_im/static/src/js/im.js +++ b/addons/web_im/static/src/js/im.js @@ -228,7 +228,8 @@ openerp.web_im = function(instance) { date = instance.web.str_to_datetime(date); date = date.toString(Date.CultureInfo.formatPatterns.shortDate + " " + Date.CultureInfo.formatPatterns.shortTime); var bubble = QWeb.render("Conversation.bubble", {"items": items, "name": name, "time": date}); - this.$(".oe_im_chatview_content").append($(bubble)); + $(this.$(".oe_im_chatview_content").children()[0]).append($(bubble)); + this.$(".oe_im_chatview_content").scrollTop($(this.$(".oe_im_chatview_content").children()[0]).height()); }, destroy: function() { this.trigger("destroyed"); diff --git a/addons/web_im/static/src/xml/im.xml b/addons/web_im/static/src/xml/im.xml index 2f7d450db35..38348d5952b 100644 --- a/addons/web_im/static/src/xml/im.xml +++ b/addons/web_im/static/src/xml/im.xml @@ -35,7 +35,9 @@
-
+
+
+