[IMP] mail: js add class on dom for CSS

bzr revid: chm@openerp.com-20121019081926-0gevpfwb75k3ye93
This commit is contained in:
Christophe Matthieu
2012-10-19 10:19:26 +02:00
parent a670da21e4
commit 7f9da8b853
2 changed files with 15 additions and 8 deletions
+11
View File
@@ -83,3 +83,14 @@
.openerp .oe_mail .oe_msg.oe_msg_read .oe_read{
display:none;
}
.openerp .oe_mail .oe_msg_last {
border-bottom: 5px solid black;
border-left: 2px solid black;
border-right: 2px solid black;
}
.openerp .oe_mail .oe_msg_first {
border-top: 5px solid black;
border-left: 2px solid black;
border-right: 2px solid black;
}
+4 -8
View File
@@ -1129,15 +1129,11 @@ openerp.mail = function(session) {
}
}
// must be improve by CHM (temporary test for DOM)
self.$('.oe_msg_first').removeClass("oe_msg_first");
self.$('.oe_msg_comment:first, .oe_thread .oe_msg_comment:first').addClass("oe_msg_first");
self.$('.oe_msg_last').removeClass("oe_msg_last");
self.$('.oe_msg_comment:last, .oe_thread .oe_msg_comment:last').addClass("oe_msg_last");
self.$('.oe_msg_first:first').removeClass("oe_msg_first");
self.$('.oe_msg_last:last').removeClass("oe_msg_last");
self.$('.oe_msg_comment:first, .oe_msg_comment:first-child').addClass("oe_msg_first");
self.$('.oe_msg_comment:last, .oe_msg_comment:last-child').addClass("oe_msg_last");
self.options._parents[0].$('.oe_thread:has(.oe_msg_comment:visible) + .oe_msg').addClass("oe_msg_group_first");
self.options._parents[0].$('.oe_thread:not(:has(.oe_msg:visible)) ~ .oe_thread:has(.oe_thread .oe_msg:visible)').addClass("oe_msg_group_last");
return message
},