From 7f9da8b853a2100eae1b9ec91a87abb5133f2267 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 19 Oct 2012 10:19:26 +0200 Subject: [PATCH] [IMP] mail: js add class on dom for CSS bzr revid: chm@openerp.com-20121019081926-0gevpfwb75k3ye93 --- addons/mail/static/src/css/mail.css | 11 +++++++++++ addons/mail/static/src/js/mail.js | 12 ++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 9d317f714d7..8261478319a 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -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; +} \ No newline at end of file diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 37cfbfa75d1..f1844890402 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -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 },