diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index cb7a1c9865b..0576ba59f84 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -129,6 +129,7 @@ /* ------------------------------ */ .openerp div.oe_mail_thread_act { + display: none; white-space: normal; margin-bottom: 5px; padding: 4px; @@ -149,6 +150,10 @@ padding-left: 5%; } +.openerp a.oe_mail_compose { + display: none; +} + .openerp div.oe_mail_thread_more { display: none; border-bottom: 1px solid #D2D9E7; @@ -170,6 +175,41 @@ clear: both; } +.openerp img.oe_mail_msg_menu_icon { + float: right; + cursor: pointer; +} + +.openerp ul.oe_mail_msg_menu { + display: none; + position: absolute; + top: 0.5em; + right: 1em; + overflow-x: hidden; + z-index: 900; + background: white; + padding: 4px; + border: 1px solid #AFAFB6; + width: 150px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -o-border-radius: 3px; + -ms-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); + -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); +} + +.openerp img.oe_mail_msg_menu_icon:hover + ul.oe_mail_msg_menu { + display: block; +} + +.openerp ul.oe_mail_msg_menu:hover { + display: block; +} + .openerp .oe_mail_msg_notification, .openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email { position: relative; padding: 4px; @@ -234,37 +274,6 @@ color: #4E43E7; } -.openerp img.oe_mail_msg_menu_icon { - float: right; - cursor: pointer; -} - -.openerp ul.oe_mail_msg_menu { - display: none; - position: absolute; - top: 1em; - right: 1em; - overflow-x: hidden; - z-index: 900; - background: white; - padding: 4px; - border: 1px solid #AFAFB6; - width: 150px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - -o-border-radius: 3px; - -ms-border-radius: 3px; - border-radius: 3px; - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); - -o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); - -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); -} - -.openerp img.oe_mail_msg_menu_icon:hover + .openerp ul.oe_mail_msg_menu { - display: block; -} - /* ------------------------------ */ /* Styling (should be openerp) */ /* ------------------------------ */ diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 94f9e0c46c9..c4795c09c40 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -44,7 +44,7 @@ openerp.mail = function(session) { this.params = params; this.params.parent_id = this.params.parent_id || false; this.params.thread_level = this.params.thread_level || 0; - this.params.wall = this.params.wall || this.params.records || false; + this.params.is_wall = this.params.is_wall || this.params.records || false; this.params.msg_more_limit = this.params.msg_more_limit || 150; this.params.limit = this.params.limit || 100; this.params.offset = this.params.offset || 0; @@ -58,11 +58,11 @@ openerp.mail = function(session) { // display customization vars this.display = {}; this.display.show_post_comment = this.params.show_post_comment || false; - this.display.show_msg_menu = this.params.wall; + this.display.show_msg_menu = this.params.is_wall; this.display.show_reply = (this.params.thread_level > 0); - this.display.show_delete = ! this.params.wall; - this.display.show_hide = this.params.wall; - this.display.show_reply_by_email = ! this.params.wall; + this.display.show_delete = ! this.params.is_wall; + this.display.show_hide = this.params.is_wall; + this.display.show_reply_by_email = ! this.params.is_wall; this.display.show_more = (this.params.thread_level == 0); // internal links mapping this.intlinks_mapping = {}; @@ -71,7 +71,8 @@ openerp.mail = function(session) { start: function() { this._super.apply(this, arguments); // customize display - if (! this.display.show_post_comment) this.$element.find('div.oe_mail_thread_act').hide(); + if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_act').show(); } + if (this.display.show_reply_by_email) { this.$element.find('a.oe_mail_compose').show(); } // add events this.add_events(); /* display user, fetch comments */ diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index fe9ea52ae3e..dc80ccc06fe 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -49,10 +49,9 @@
- Send an e-mail
+ Send an e-mail
-