[FIX] mail: on_scroll activate expandable message, reverse order of messages for the root thread.

bzr revid: chm@openerp.com-20121205142523-3xl8go4stwitwkep
This commit is contained in:
Christophe Matthieu 2012-12-05 15:25:23 +01:00
parent f9d8d746e2
commit 12404525b1
1 changed files with 4 additions and 3 deletions

View File

@ -672,8 +672,11 @@ openerp.mail = function (session) {
// read messages
self.parent_thread.message_fetch(this.domain, this.context, false, function (arg, data) {
// insert the message on dom after this message
if (self.options.root_thread == self.parent_thread) {
data.reverse();
}
self.id = false;
// insert the message on dom after this message
self.parent_thread.switch_new_message( data, self.$el );
self.animated_destroy(200);
});
@ -1011,8 +1014,6 @@ openerp.mail = function (session) {
var bottom = $(window).scrollTop()+$(window).height()+200;
if (bottom > pos.top) {
val.on_expandable();
// load only one time
val.loading = true;
}
}
});