[IMP] Thread widget: reply by e-mail not shown on Wall; renamed wall widget parameter to is_wall.

bzr revid: tde@openerp.com-20120514100820-9m4jua07sydjakey
This commit is contained in:
Thibault Delavallée 2012-05-14 12:08:20 +02:00
parent f4b727dfdc
commit be0d26923d
3 changed files with 49 additions and 40 deletions

View File

@ -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) */
/* ------------------------------ */

View File

@ -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 */

View File

@ -49,10 +49,9 @@
<div class="oe_mail_msg_content">
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/><br />
</div>
<p><a href="#" class="oe_mail_compose oe_mail_oe_right">
Send an e-mail
<a href="#" class="oe_mail_compose oe_mail_oe_right">Send an e-mail
<img src='/mail/static/src/img/email_icon.png' alt='Send an e-mail'/>
</a></p>
</a>
</div>
<div class="oe_mail_thread_display"></div>
<div class="oe_mail_thread_more">