Added scroll in chat

bzr revid: nicolas.vanhoren@openerp.com-20121130150313-rrh17i2yo2tbvilu
This commit is contained in:
niv-openerp
2012-11-30 16:03:13 +01:00
parent c555f34f87
commit 2f5faf419d
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -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");
+3 -1
View File
@@ -35,7 +35,9 @@
<div class="oe_im_chatview_disconnected">
<t t-esc='_.str.sprintf(_t("%s is offline. He/She will receive your messages on his/her next connection."), widget.user_rec.name)'/>
</div>
<div class="oe_im_chatview_content"></div>
<div class="oe_im_chatview_content">
<div></div>
</div>
<div class="oe_im_chatview_footer">
<input class="oe_im_chatview_input" placeholder="Say something..." />
</div>