From 8bee0d228191f2985f9f240b6090c93271050776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 18 Oct 2012 15:50:50 +0200 Subject: [PATCH] [IMP] mail: the css doesn't makes your eyes bleed anymore bzr revid: fva@openerp.com-20121018135050-ihwzxb5f26d927oq --- addons/mail/static/src/css/mail.css | 29 +++++++++++++++-------------- addons/mail/static/src/js/mail.js | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 3d73bbfa33a..9d317f714d7 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -4,11 +4,7 @@ .openerp .oe_mail { position: relative; width: 560px; - margin: 20px; - background: #EEE; - border: solid 1px #ccc; - border-radius: 3px; - padding: 8px; + margin: 16px; } .openerp .oe_mail .oe_thread{ margin-left: 32px; @@ -21,21 +17,26 @@ .openerp .oe_mail .oe_msg{ position: relative; - background: blue; + background: #f7f7f7; + border-radius: 2px; + border: solid 1px #ececec; margin-bottom: 4px; min-height: 75px; } .openerp .oe_mail .oe_msg .oe_msg_left{ position: absolute; - left:0; top: 0; bottom: 0; width: 75px; - background: red; + left:0; top: 0; bottom: 0; width: 40px; overflow: hidden; } +.openerp .oe_mail .oe_msg .oe_msg_icon{ + width: 32px; + margin: 4px; + border-radius: 2px; +} .openerp .oe_mail .oe_msg .oe_msg_center{ position: relative; display: block; - margin-left: 75px; - background: gray; + margin-left: 40px; } .openerp .oe_mail .oe_msg.oe_with_buttons .oe_msg_center{ margin-right: 32px; @@ -43,17 +44,17 @@ .openerp .oe_mail .oe_msg .oe_msg_right{ position: absolute; right:0; top:0; bottom: 0; width: 32px; - background: fuchsia; overflow: hidden; } .openerp .oe_mail .oe_msg .oe_msg_footer{ height: 32px; - background: purple; + padding-left: 4px; overflow: hidden; } .openerp .oe_mail .oe_msg .oe_msg_content{ display: block; - background: yellow; + overflow: hidden; + padding: 4px; } .openerp .oe_mail .oe_msg .oe_msg_icons a{ text-decoration: none; @@ -67,7 +68,7 @@ padding: 0px; resize: vertical; } -.openerp .oe_mail .oe_msg.oe_msg_composer_compact{ +.openerp .oe_mail .oe_msg.oe_msg_composer_compact, .openerp .oe_mail .oe_msg.oe_msg_expandable{ padding:4px; min-height:0px; } diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 8e1be70e459..d2a4509ffc3 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -695,7 +695,7 @@ openerp.mail = function(session) { // if this message is read, all childs message display is read var ids = [this.datasets.id].concat( this.get_child_ids() ); var read = $(event.srcElement).hasClass("oe_read"); - this.$el.removeClass("oe_mail_" + (read?"un":"") + "read").addClass("oe_mail_" + (read?"":"un") + "read"); + this.$el.removeClass(read ? 'oe_msg_unread':'oe_msg_read').addClass(read ? 'oe_msg_read':'oe_msg_unread'); if( (read && this.options.thread.typeof_thread == 'inbox') || (!read && this.options.thread.typeof_thread == 'archives')) {