From 0805371fa9e1f17816a638b6878f7d6629d926ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 25 Oct 2012 14:43:20 +0200 Subject: [PATCH] [IMP] mail: compose textarea auto-resizes, various small fixes bzr revid: fva@openerp.com-20121025124320-ztzcdf4bkgjjs57h --- addons/mail/static/src/css/mail.css | 23 ++++++++------ addons/mail/static/src/js/mail.js | 5 +-- addons/mail/static/src/xml/mail.xml | 49 +++++++++++++++-------------- 3 files changed, 41 insertions(+), 36 deletions(-) diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 36c56b161bd..921890926e6 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -37,6 +37,9 @@ margin:1px; border-radius:2px; } +.openerp .oe_mail .oe_msg .oe_subtle{ + color: #B7B7D5; +} .openerp .oe_mail .oe_msg_indented .oe_msg_center{ margin-left:34px; } @@ -58,14 +61,9 @@ .openerp .oe_mail .oe_msg .oe_msg_footer{ padding-left: 4px; overflow: hidden; - font-size: 11px; opacity:0.8; -webkit-transition: opacity 0.2s linear; } -.openerp .oe_mail .oe_thread:hover .oe_msg_footer{ - opacity: 1; - -webkit-transition: opacity 0.2s linear; -} .openerp .oe_mail .oe_msg .oe_msg_content{ display: block; overflow: hidden; @@ -73,7 +71,7 @@ padding-bottom:1px; } .openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_title{ - font-size: 16px; + font-size: 13px; margin-bottom: 0px; margin-top: 2px; } @@ -124,10 +122,11 @@ } .openerp .oe_mail .oe_msg .oe_msg_content textarea{ width: 100%; - height: 100%; + height: 32px; margin: 0px; padding: 0px; resize: vertical; + padding: 4px; } .openerp .oe_mail .oe_msg.oe_msg_composer_compact, .openerp .oe_mail .oe_msg.oe_msg_expandable{ @@ -220,11 +219,15 @@ border: none; text-shadow: none; } +.openerp .oe_mail .oe_attach_label{ + color: #7C7BAD; + margin-left: -3px; +} .openerp .oe_mail .oe_msg_footer .oe_attachment_file .oe_form_binary_file{ display: inline-block; - margin-left: -23px; - height: 24px; - width: 24px; + margin-left: -47px; + height: 28px; + width: 52px; margin-top: -6px; } .openerp .oe_mail .oe_mail_list_recipients{ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 1adcbc4ad4c..1779d1a6562 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -293,6 +293,7 @@ openerp.mail = function(session) { /* stack for don't close the compose form if the user click on a button */ this.$render_expandable.on('focus, mouseup', 'textarea', function () { self.stay_open = false; }); this.$render_expandable.on('mousedown', function () { self.stay_open = true; }); + this.$render_expandable.find('textarea').autosize(); } }, @@ -1662,8 +1663,8 @@ 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_onwall:first").click(function(){ self.root.thread.on_compose_message(); }); + this.$(".oe_write_full").click(function(){ self.root.thread.ComposeMessage.on_compose_fullmail(); }); + this.$(".oe_write_onwall").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 96a3f578663..8d868241132 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -15,16 +15,17 @@ for main thread composition form in document form view. --> -
+
User img
- +
+