[FIX] mail: thread messages order on show more

If click show more in a flat thread (level 0, such as under leads, issues, etc.) append messages from newer to older
If click show more in an indented thread (level > 0, such as in the messaging wall), append messages from older to newer
This commit is contained in:
Denis Ledoux 2014-12-16 20:08:15 +01:00
parent 05707f5cb5
commit cd4bb69550
1 changed files with 5 additions and 1 deletions

View File

@ -880,7 +880,11 @@ openerp.mail = function (session) {
self.parent_thread.message_fetch(this.domain, this.context, false, function (arg, data) {
self.id = false;
// insert the message on dom after this message
self.parent_thread.switch_new_message(data, self.$el);
var element = self.$el;
if (self.thread_level === 0){
element = element.parent();
}
self.parent_thread.switch_new_message(data, element);
self.animated_destroy(200);
});