From 62fad9c114a5c21ea7d564beca45c67e496993e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 19 Oct 2012 12:03:50 +0200 Subject: [PATCH 1/6] [IMP] mail: removed first/last message classes bzr revid: fva@openerp.com-20121019100350-6egth3faj7uoci6u --- addons/mail/static/src/css/mail.css | 11 ----------- addons/mail/static/src/js/mail.js | 5 ----- 2 files changed, 16 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 8261478319a..9d317f714d7 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -83,14 +83,3 @@ .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 7603490ded5..6d8f31c9ac7 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1124,11 +1124,6 @@ openerp.mail = function(session) { } } - 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"); - return message }, From 9bcada763f0fc09a2a943bcae8bfd199d51f6226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 19 Oct 2012 13:40:39 +0200 Subject: [PATCH 2/6] [WIP] mail: css of right buttons bzr revid: fva@openerp.com-20121019114039-x442lscvj2oggyja --- addons/mail/static/src/css/mail.css | 8 ++------ addons/mail/static/src/xml/mail.xml | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 9d317f714d7..be3df528510 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -38,13 +38,9 @@ display: block; margin-left: 40px; } -.openerp .oe_mail .oe_msg.oe_with_buttons .oe_msg_center{ - margin-right: 32px; -} .openerp .oe_mail .oe_msg .oe_msg_right{ - position: absolute; - right:0; top:0; bottom: 0; width: 32px; - overflow: hidden; + float: right; + background: yellow; } .openerp .oe_mail .oe_msg .oe_msg_footer{ height: 32px; diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f8c4ce92d1c..f6e69bc0ac8 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -185,7 +185,7 @@ -
+
From 63d5acfa6b1a1a910d173e980edc7b2b66eae212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 19 Oct 2012 15:32:05 +0200 Subject: [PATCH 3/6] [IMP] mail: buttons are at the right place bzr revid: fva@openerp.com-20121019133205-06uavw1esxh5our5 --- addons/mail/static/src/css/mail.css | 19 ++++++++++++++----- addons/mail/static/src/js/mail.js | 16 ++++++++-------- addons/mail/static/src/xml/mail.xml | 10 +++++----- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index be3df528510..a3c3425f305 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -21,7 +21,11 @@ border-radius: 2px; border: solid 1px #ececec; margin-bottom: 4px; - min-height: 75px; + min-height: 44px; +} +.openerp .oe_mail .oe_msg:not(.oe_lvl_0){ + background: #eeecfc; + border: solid 1px #eee5ff; } .openerp .oe_mail .oe_msg .oe_msg_left{ position: absolute; @@ -40,7 +44,7 @@ } .openerp .oe_mail .oe_msg .oe_msg_right{ float: right; - background: yellow; + height: 24px; } .openerp .oe_mail .oe_msg .oe_msg_footer{ height: 32px; @@ -52,11 +56,16 @@ overflow: hidden; padding: 4px; } -.openerp .oe_mail .oe_msg .oe_msg_icons a{ - text-decoration: none; - display: block; +.openerp .oe_mail .oe_msg .oe_msg_right .oe_msg_icons span{ + float:right; + width:24px; + height:24px; + line-height:24px; text-align: center; } +.openerp .oe_mail .oe_msg .oe_msg_right .oe_msg_icons a{ + text-decoration: none; +} .openerp .oe_mail .oe_msg .oe_msg_content textarea{ width: 100%; height: 100%; diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 24946a6fd81..e49811ab38c 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -886,7 +886,7 @@ openerp.mail = function(session) { } this.messages = []; - this.ComposeMessage = false; + this.composeMessage = false; this.ds_thread = new session.web.DataSetSearch(this, this.context.default_model || 'mail.thread'); this.ds_message = new session.web.DataSetSearch(this, 'mail.message'); @@ -902,18 +902,18 @@ openerp.mail = function(session) { instantiate_ComposeMessage: function(){ // add message composition form view - this.ComposeMessage = new mail.ThreadComposeMessage(this, this.datasets, { + this.composeMessage = new mail.ThreadComposeMessage(this, this.datasets, { 'context': this.context, 'options': this.options, }); if(this.datasets.thread_level){ - this.ComposeMessage.appendTo(this.$el); + this.composeMessage.appendTo(this.$el); } else { // root view - this.ComposeMessage.prependTo(this.$el); + this.composeMessage.prependTo(this.$el); } - this.ComposeMessage.do_hide_compact(); + this.composeMessage.do_hide_compact(); }, /* When the expandable object is visible on screen (with scrolling) @@ -1030,7 +1030,7 @@ openerp.mail = function(session) { /* this function is launch when a user click on "Reply" button */ on_compose_message: function(){ - this.ComposeMessage.on_compose_expandable(); + this.composeMessage.on_compose_expandable(); }, /* display the no message on the thread @@ -1102,7 +1102,7 @@ openerp.mail = function(session) { var self=this; if(this.datasets.show_composeform){ - this.ComposeMessage.do_show_compact(); + this.composeMessage.do_show_compact(); } this.$('.oe_wall_no_message').remove(); @@ -1412,7 +1412,7 @@ openerp.mail = function(session) { bind_events: function(){ var self=this; - this.$("button.oe_write_full:first").click(function(){ self.root.thread.ComposeMessage.on_compose_fullmail(); }); + this.$("button.oe_write_full:first").click(function(){ self.root.thread.composeMessage.on_compose_fullmail(); }); this.$("button.oe_write_onwall:first").click(function(){ self.root.thread.on_compose_message(); }); } }); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f6e69bc0ac8..39cd5bbce38 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -185,14 +185,14 @@ -
+
- W - h - ) + W + h + )
@@ -279,6 +279,6 @@ Template used to display stared/unstared message in a mail.message --> - * + * From 7c842393f8b6c9687a378102e33005fef04bae9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Fri, 19 Oct 2012 18:03:11 +0200 Subject: [PATCH 4/6] [IMP] mail: a more minimalist design bzr revid: fva@openerp.com-20121019160311-ssqosr9wdkmcmeaw --- addons/mail/static/src/css/mail.css | 30 +++++++++++++++++++++-------- addons/mail/static/src/xml/mail.xml | 4 +++- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index a3c3425f305..cdbc9701703 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -3,7 +3,7 @@ } .openerp .oe_mail { position: relative; - width: 560px; + width: 740px; margin: 16px; } .openerp .oe_mail .oe_thread{ @@ -17,15 +17,15 @@ .openerp .oe_mail .oe_msg{ position: relative; - background: #f7f7f7; + background: #F4F5FA; border-radius: 2px; - border: solid 1px #ececec; - margin-bottom: 4px; - min-height: 44px; + margin-bottom: 2px; + min-height: 40px; } .openerp .oe_mail .oe_msg:not(.oe_lvl_0){ - background: #eeecfc; - border: solid 1px #eee5ff; + background: #FFF; + border: none; + margin-bottom:0px; } .openerp .oe_mail .oe_msg .oe_msg_left{ position: absolute; @@ -47,14 +47,22 @@ height: 24px; } .openerp .oe_mail .oe_msg .oe_msg_footer{ - height: 32px; + height: 16px; padding-left: 4px; overflow: hidden; + font-size: 11px; + opacity:0; + -webkit-transition: opacity 0.2s linear; +} +.openerp .oe_mail .oe_thread:hover .oe_msg_footer{ + opacity: 0.8; + -webkit-transition: opacity 0.2s linear; } .openerp .oe_mail .oe_msg .oe_msg_content{ display: block; overflow: hidden; padding: 4px; + padding-bottom:1px; } .openerp .oe_mail .oe_msg .oe_msg_right .oe_msg_icons span{ float:right; @@ -62,6 +70,12 @@ height:24px; line-height:24px; text-align: center; + opacity: 0.2; + -webkit-transition: opacity 0.2s linear; +} +.openerp .oe_mail .oe_msg:hover .oe_msg_right .oe_msg_icons span{ + opacity: 1; + -webkit-transition: opacity 0.1s linear; } .openerp .oe_mail .oe_msg .oe_msg_right .oe_msg_icons a{ text-decoration: none; diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index 39cd5bbce38..50247fd6164 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -219,7 +219,7 @@