diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 27565bc4102..0c32ba27d6f 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -84,7 +84,6 @@ Main Features 'css': [ 'static/src/css/mail.css', 'static/src/css/mail_group.css', - 'static/src/css/mail_compose_message.css', ], 'js': [ 'static/lib/jquery.expander/jquery.expander.js', diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index 276c9d28a15..a1f2b5c4910 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -1,10 +1,16 @@ +.oe_mail_wall_threads{ + padding: 16px; +} + +/* ------------ MAIL WIDGET --------------- */ .openerp .oe_mail, .openerp .oe_mail *{ box-sizing: border-box; } .openerp .oe_mail { + display: inline-block; position: relative; width: 740px; - margin: 16px; + margin: 0px; } .openerp .oe_mail .oe_thread{ margin-left: 32px; @@ -22,18 +28,18 @@ margin-bottom: 2px; min-height: 40px; } -.openerp .oe_mail .oe_msg:not(.oe_lvl_0){ +.openerp .oe_mail .oe_msg_indented{ background: #FFF; border: none; margin-bottom:0px; min-height:34px; } -.openerp .oe_mail .oe_msg:not(.oe_lvl_0) .oe_msg_icon{ +.openerp .oe_mail .oe_msg_indented .oe_msg_icon{ width:32px; margin:1px; border-radius:2px; } -.openerp .oe_mail .oe_msg:not(.oe_lvl_0) .oe_msg_center{ +.openerp .oe_mail .oe_msg_indented .oe_msg_center{ margin-left:34px; } .openerp .oe_mail .oe_msg .oe_msg_left{ @@ -56,11 +62,11 @@ padding-left: 4px; overflow: hidden; font-size: 11px; - opacity:0; + opacity:0.8; -webkit-transition: opacity 0.2s linear; } .openerp .oe_mail .oe_thread:hover .oe_msg_footer{ - opacity: 0.8; + opacity: 1; -webkit-transition: opacity 0.2s linear; } .openerp .oe_mail .oe_msg.oe_msg_composer .oe_msg_footer{ @@ -72,10 +78,16 @@ padding: 4px; padding-bottom:1px; } +.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_title{ + font-size: 16px; + margin-bottom: 0px; + margin-top: 2px; +} .openerp .oe_mail .oe_msg .oe_msg_icons{ float: right; margin-top: 4px; margin-right: 8px; + margin-left: 8px; height: 24px; -webkit-user-select: none; } @@ -88,9 +100,8 @@ } .openerp .oe_mail .oe_msg .oe_msg_icons a { text-decoration: none; - /*opacity: 0.2;*/ color: #FFF; - text-shadow: 0px 1px #AAA,0px -1px #AAA, -1px 0px #AAA, 1px 0px #AAA, 0px 3px 3px rgba(0,0,0,0.2); + text-shadow: 0px 1px #AAA,0px -1px #AAA, -1px 0px #AAA, 1px 0px #AAA, 0px 3px 3px rgba(0,0,0,0.1); -webkit-transition: all 0.2s linear; } .openerp .oe_mail .oe_msg:hover .oe_msg_icons a{ @@ -99,23 +110,23 @@ } .openerp .oe_mail .oe_msg .oe_msg_icons .oe_star:hover a{ color: #FFF6C0; - text-shadow: 0px 1px #FFA162,0px -1px #FFA162, -1px 0px #FFA162, 1px 0px #FFA162, 0px 3px 3px rgba(0,0,0,0.2); + text-shadow: 0px 1px #FFA162,0px -1px #FFA162, -1px 0px #FFA162, 1px 0px #FFA162, 0px 3px 3px rgba(0,0,0,0.1); } .openerp .oe_mail .oe_msg .oe_msg_icons .oe_star.oe_starred a{ color: #FFE41F; - text-shadow: 0px 1px #DF6200,0px -1px #DF6200, -1px 0px #DF6200, 1px 0px #DF6200, 0px 3px 3px rgba(0,0,0,0.2); + text-shadow: 0px 1px #DF6200,0px -1px #DF6200, -1px 0px #DF6200, 1px 0px #DF6200, 0px 3px 3px rgba(0,0,0,0.1); } .openerp .oe_mail .oe_msg .oe_msg_icons .oe_reply:hover a{ color: #1fc0ff; - text-shadow: 0px 1px #184fc5,0px -1px #184fc5, -1px 0px #184fc5, 1px 0px #184fc5, 0px 3px 3px rgba(0,0,0,0.2); + text-shadow: 0px 1px #184fc5,0px -1px #184fc5, -1px 0px #184fc5, 1px 0px #184fc5, 0px 3px 3px rgba(0,0,0,0.1); } .openerp .oe_mail .oe_msg .oe_msg_icons .oe_read:hover a{ - color: #f3ffcd; - text-shadow: 0px 1px #59EB99,0px -1px #59EB99, -1px 0px #59EB99, 1px 0px #59EB99, 0px 3px 3px rgba(0, 0, 0, 0.2); + color: #bbbaff; + text-shadow: 0px 1px #7c7bad,0px -1px #7c7bad, -1px 0px #7c7bad, 1px 0px #7c7bad, 0px 3px 3px rgba(0,0,0,0.1); } -.openerp .oe_mail .oe_msg .oe_msg_icons .oe_unread a{ +.openerp .oe_mail .oe_msg .oe_msg_icons .oe_unread:hover a{ color: #c2ff00; - text-shadow: 0px 1px #009441,0px -1px #009441, -1px 0px #009441, 1px 0px #009441, 0px 3px 3px rgba(0,0,0,0.2); + text-shadow: 0px 1px #009441,0px -1px #009441, -1px 0px #009441, 1px 0px #009441, 0px 3px 3px rgba(0,0,0,0.1); } .openerp .oe_mail .oe_msg .oe_msg_content textarea{ width: 100%; @@ -123,6 +134,7 @@ 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{ padding:4px; @@ -139,3 +151,100 @@ .openerp .oe_mail .oe_msg.oe_msg_read .oe_read{ display:none; } +/* ---------------- MESSAGE QUICK COMPOSER --------------- */ + +.openerp .oe_mail .oe_msg_composer .oe_msg_footer{ + padding-right:4px; + padding-top: 2px; + padding-bottom:6px; +} +.openerp .oe_mail .oe_msg_attachments.oe_hidden{ + margin:0px; + border: none; +} +.openerp .oe_mail .oe_msg_attachments{ + margin-bottom: 4px; + margin-right: 0px; + font-size: 12px; + border-radius: 2px; + border: solid 1px rgba(124,123,173,0.14); +} +.openerp .oe_mail .oe_msg_attachments .oe_attachment{ + padding: 2px; + padding-left: 4px; + padding-right: 4px; +} +.openerp .oe_mail .oe_msg_attachments .oe_attachment .oe_e{ + font-size: 23px; + margin-top: -5px; +} +.openerp .oe_mail .oe_msg_attachments .oe_attachment .oe_e:hover{ + text-decoration: none; +} +.openerp .oe_mail .oe_msg_attachments .oe_attachment:nth-child(odd){ + background:white; +} +.openerp .oe_mail .oe_msg_attachments .oe_attachment:nth-child(even){ + background: #F4F5FA; +} +.openerp .oe_mail .oe_msg_footer button{ + display: inline; + height: 24px; + font-size: 12px; + line-height: 12px; + vertical-align: middle; +} +.openerp .oe_mail .oe_msg_footer button.oe_attach{ + width: 24px; + overflow: hidden; +} +.openerp .oe_mail .oe_msg_footer button.oe_attach .oe_e{ + position: relative; + top: -1px; + left: -9px; +} +.openerp .oe_mail .oe_hidden_input_file, .openerp .oe_mail .oe_hidden_input_file form{ + display:inline; +} +.openerp .oe_mail .oe_msg_footer button.oe_full{ + width:24px; + overflow:hidden; + float: right; +} +.openerp .oe_mail .oe_msg_footer button.oe_full .oe_e{ + position: relative; + top: -1px; + left: -9px; +} +.openerp .oe_mail button.oe_attach, .openerp .oe_mail button.oe_full{ + background: transparent; + color: #7C7BAD; + box-shadow: none; + border: none; + text-shadow: none; +} +.openerp .oe_mail .oe_msg_footer .oe_attachment_file .oe_form_binary_file{ + display: inline-block; + margin-left: -23px; + height: 24px; + width: 24px; + margin-top: -6px; +} +.openerp .oe_mail .oe_mail_list_recipients{ + font-size: 12px; + margin-top: 4px; + margin-bottom: 4px; +} + +/* ---------------- HIDDEN MESSAGES ------------------ */ + +.openerp .oe_mail .oe_msg_content.oe_msg_more_message{ + text-align: right; + padding-right: 300px; + opacity: 0.5; + -webkit-transition: opacity 0.2s linear; +} +.openerp .oe_mail .oe_msg_more_message:hover{ + opacity: 1; + -webkit-transition: opacity 0.2s linear; +} diff --git a/addons/mail/static/src/css/mail_compose_message.css b/addons/mail/static/src/css/mail_compose_message.css deleted file mode 100644 index c706c55bcde..00000000000 --- a/addons/mail/static/src/css/mail_compose_message.css +++ /dev/null @@ -1,166 +0,0 @@ -/* ------------------------------ */ -/* Compose Message */ -/* ------------------------------ */ - -.openerp .oe_msg_content .oe_mail_compose_message_footer { - height: 24px; -} - -.openerp .oe_msg_content .oe_mail_compose_message_footer button.oe_mail_compose_message_button_send { - float: left; -} - -.openerp .oe_mail .oe_mail_compose_textarea -{ - display: none; -} - -.openerp .oe_mail .oe_mail_compose_textarea .oe_mail_post_header, -.openerp .oe_mail .oe_mail_compose_textarea .oe_mail_post_footer, -{ - position: relative; -} - -.openerp .oe_mail .oe_mail_compose_textarea a.oe_cancel { - position: absolute; - right: -8px; - top: -8px; -} -.openerp .oe_mail .oe_mail_compose_textarea a.oe_cancel:first-of-type { - display:none; -} - -.openerp .oe_mail .oe_mail_compose_textarea button.oe_full { - float: right; - position: relative; - right: -10px; -} - -/* ------------------------------------------------------------ */ -/* mail.compose.message : list_recipients -/* ------------------------------------------------------------ */ - -.openerp .oe_mail .oe_mail_list_recipients { - display: inline; -} -.openerp .oe_mail .oe_mail_list_recipients .oe_all_follower { - color: blue; -} -.openerp .oe_mail .oe_mail_list_recipients .oe_partner_follower a { - color: red; -} -.openerp .oe_mail .oe_mail_list_recipients .oe_hidden, -.openerp .oe_mail .oe_mail_list_recipients .oe_more_hidden { - display: none; -} - -/* ------------------------------------------------------------ */ -/* mail.compose.message : attachment -/* ------------------------------------------------------------ */ - -.openerp .oe_mail .oe_attachment_file { - display: inline-block; -} - -.openerp .oe_mail .oe_attachment_file .oe_add { - float: left; - width: 24px; - height: 24px; - position: relative; - z-index: 10; - left: +2px; - top: +7px; - overflow: hidden; -} - -/* attachment button: override of openerp values */ -.openerp .oe_mail .oe_attachment_file .oe_add button, -.openerp .oe_mail .oe_attachment_file .oe_add input.oe_insert_file { - position: absolute; - bottom: +0px; - left: +0px; - height: 24px; - width: 24px; - margin: 0px; - padding: 0px; -} -.openerp .oe_mail .oe_attachment_file .oe_add input.oe_insert_file { - z-index:2; - width: 300px; - left: -100px; - background: transparent; - border: 0; - color: transparent; -} -.openerp .oe_mail .oe_attachment_file .oe_add button span { - position: relative; - bottom: +4px; - font-size: 30px; -} - -.openerp .oe_mail .oe_msg_attachments input { - visibility: hidden; -} - -.openerp .oe_mail .oe_mail_compose_attachment_list { - clear: both; -} - -/* ------------------------------------------------------------ */ -/* mail.compose.message -/* ------------------------------------------------------------ */ - - -/* default textarea (oe_mail_compose_textarea), and body textarea for compose form view */ -.openerp .oe_mail.oe_semantic_html_override .oe_mail_compose_textarea textarea.field_text, -.openerp .oe_mail div.oe_mail_compose_message_body textarea.field_text { - width: 100%; - min-height: 120px; - height: auto; - padding: 4px; - font-size: 12px; - border: 1px solid #cccccc; -} - -/* not top textarea */ -.openerp .oe_mail.oe_semantic_html_override .oe_semantic_html_override .oe_mail_compose_textarea textarea.field_text { - height: 60px; -} - -/* form_view: delete white background */ -.openerp .oe_msg_content div.oe_formview { - background-color: transparent; -} - -.openerp .oe_msg_content div.oe_form_nosheet { - margin: 0px; -} - -.openerp .oe_msg_content table.oe_form_group { - margin: 0px; -} - -.openerp .oe_msg_content table.oe_form_field, -.openerp .oe_msg_content div.oe_form_field { - padding: 0px; -} - -.openerp .oe_msg_content td.oe_form_group_cell { - vertical-align: bottom; -} - -/* subject: change width */ -.openerp .oe_msg_content .oe_form .oe_form_field input[type='text'] { - width: 472px; -} - -/* body_html: cleditor */ -.openerp .oe_msg_content div.cleditorMain { - border: 1px solid #cccccc; -} - -/* destination_partner_ids */ -.openerp .oe_msg_content div.text-core { - height: 22px !important; - width: 472px; -} \ 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 0b8c39aca81..2890e9eda6e 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -198,6 +198,7 @@ openerp.mail = function(session) { /* when a user click on the upload button, send file read on_attachment_loaded */ on_attachment_change: function (event) { + console.log('attach'); event.stopPropagation(); var self = this; var $target = $(event.target); @@ -304,9 +305,9 @@ openerp.mail = function(session) { // set the function called when attachments are added this.$render_expandable.on('change', 'input.oe_form_binary_file', self.on_attachment_change ); - this.$render_expandable.on('click', 'a.oe_cancel', self.on_cancel ); - this.$render_expandable.on('click', 'button.oe_post', function(){self.on_message_post()} ); - this.$render_expandable.on('click', 'button.oe_full', function(){self.on_compose_fullmail()} ); + this.$render_expandable.on('click', '.oe_cancel', self.on_cancel ); + this.$render_expandable.on('click', '.oe_post', function(){self.on_message_post()} ); + this.$render_expandable.on('click', '.oe_full', function(){self.on_compose_fullmail()} ); // auto close this.$render_expandable.on('blur', 'textarea', this.on_compose_expandable); @@ -365,6 +366,7 @@ openerp.mail = function(session) { /*post a message and fetch the message*/ on_message_post: function (body) { + console.log('post'); var self = this; if (! body) { @@ -1553,7 +1555,8 @@ openerp.mail = function(session) { 'show_reply_button': 0, 'show_read_unread_button': -1, 'show_compose_message': show_compose_message, - 'message_ids': message_ids + 'message_ids': message_ids, + 'show_compact_message': true, } ); @@ -1651,7 +1654,7 @@ openerp.mail = function(session) { 'show_reply_button': 10, 'show_read_unread_button': 11, 'show_compose_message': true, - 'show_compact_message': true + 'show_compact_message': true, } ); diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index a361daae154..125376deb57 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -21,14 +21,14 @@