[IMP] thread widget: improved layout (notification/email background color)
bzr revid: tde@openerp.com-20120405214241-rm72q22x1m0oq3z0
This commit is contained in:
parent
6148e1450a
commit
73e9efa863
|
@ -22,7 +22,7 @@ div.oe_mail_wall_right {
|
|||
width: 34%;
|
||||
}
|
||||
|
||||
.oe_mail_wall_thread div.oe_mail_thread_act .oe_mail_action_textarea {
|
||||
.oe_mail_wall_thread div.oe_mail_thread_act .oe_mail_action_textarea, div.oe_mail_thread_subthread .oe_mail_action_textarea {
|
||||
height: 20px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
@ -113,6 +113,11 @@ div.oe_mail_thread_more {
|
|||
}
|
||||
|
||||
li.oe_mail_thread_msg {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.notification, .email {
|
||||
background: #E0E0E0;
|
||||
padding: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
|
@ -121,12 +126,14 @@ li.oe_mail_thread_msg {
|
|||
border-radius: 4px;
|
||||
}
|
||||
|
||||
li.notification {
|
||||
background: #E0E0E0;
|
||||
.comment {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
li.email {
|
||||
background: #E0E0E0;
|
||||
.notification:after, .email:after, .comment:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
li.oe_mail_thread_msg:after, div.oe_mail_thread_act:after {
|
||||
|
|
|
@ -147,6 +147,7 @@ openerp.mail = function(session) {
|
|||
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_reply', 'click', function (event) {
|
||||
var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_act:first');
|
||||
act_dom.toggle();
|
||||
event.preventDefault();
|
||||
});
|
||||
// event: click on 'delete' in msg
|
||||
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_delete', 'click', function (event) {
|
||||
|
@ -505,8 +506,9 @@ openerp.mail = function(session) {
|
|||
// create and render Thread widget
|
||||
this.$element.find('div.oe_mail_recthread_left').empty();
|
||||
if (this.thread) this.thread.destroy();
|
||||
// hack: for groups
|
||||
// hack: for groups and users
|
||||
if (this.view.model == 'mail.group') thread_level = 1;
|
||||
if (this.view.model == 'res.users') thread_level = 1;
|
||||
else thread_level = 0;
|
||||
this.thread = new mail.Thread(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id, 'uid': this.session.uid,
|
||||
'thread_level': thread_level, 'show_post_comment': true, 'limit': 15});
|
||||
|
|
|
@ -52,13 +52,15 @@
|
|||
</div>
|
||||
</ul>
|
||||
|
||||
<li t-name="ThreadMsg" t-attf-class="{record.type} oe_mail_thread_msg oe_mail">
|
||||
<img class="oe_mail_msg_image oe_mail_oe_left" t-att-src="record.mini_url"/>
|
||||
<div class="oe_mail_msg_content">
|
||||
<t t-if="record.type == 'email'"><t t-call="EmailDisplay" /></t>
|
||||
<t t-if="record.type == 'notification' || record.type == 'comment'"><t t-call="NoteDisplay" /></t>
|
||||
<li t-name="ThreadMsg" t-attf-class="oe_mail_thread_msg oe_mail">
|
||||
<div t-attf-class="{record.type}">
|
||||
<img class="oe_mail_msg_image oe_mail_oe_left" t-att-src="record.mini_url"/>
|
||||
<div class="oe_mail_msg_content">
|
||||
<t t-if="record.type == 'email'"><t t-call="EmailDisplay" /></t>
|
||||
<t t-if="record.type == 'notification' || record.type == 'comment'"><t t-call="NoteDisplay" /></t>
|
||||
</div>
|
||||
<t t-if="record.type == 'tmp'"><t t-call="ThreadDisplay" /></t>
|
||||
</div>
|
||||
<t t-if="record.type == 'tmp'"><t t-call="ThreadDisplay" /></t>
|
||||
</li>
|
||||
|
||||
<t t-name="NoteDisplay">
|
||||
|
|
Loading…
Reference in New Issue