Improvements to chatter

bzr revid: mit@openerp.com-20120607175328-u3ob9w2xi6jvr4e4
This commit is contained in:
Minh Tran 2012-06-07 19:53:28 +02:00
parent 339fa680fa
commit d74734ddee
4 changed files with 58 additions and 40 deletions

View File

@ -8,6 +8,12 @@
background: white;
}
.openerp div.oe_mail_wall_act {
padding: 8px;
background: #eee;
border: 1px solid #ccc;
}
.openerp div.oe_mail_wall_act:after {
content: "";
display: block;
@ -31,14 +37,16 @@
}
.openerp textarea.oe_mail_wall_action_textarea {
width: 550px;
width: 474px;
height: 60px;
padding: 5px;
padding: 4px;
margin-bottom: 8px;
float: right;
}
.openerp div.oe_mail_wall_threads textarea {
height: 20px;
padding: 2px;
height: 40px;
padding: 4px;
}
.openerp div.oe_mail_thread_subthread img {
@ -50,6 +58,10 @@
width: 486px;
}
.openerp div.oe_mail_msg_content p {
margin: 4px 0;
}
.openerp div.oe_mail_msg_content li{
float: left;
margin-right: 3px;
@ -141,8 +153,9 @@
.openerp div.oe_mail_thread_act {
white-space: normal;
margin-bottom: 5px;
padding: 4px;
padding: 8px;
background: #eee;
border-top: 1px solid #ccc
}
.openerp div.oe_mail_thread_act:after {
@ -184,11 +197,16 @@
padding: 8px;
}
.openerp li.oe_mail_thread_msg > .oe_mail_msg_comment, .openerp .oe_mail_msg_notification {
.openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email, .openerp .oe_mail_msg_notification {
background: white;
border-top: 1px solid #ccc
}
.openerp .oe_email_icon {
width: 50px;
height: 50px;
}
.openerp div.oe_mail_thread_subthread .oe_mail_msg_comment {
background: #eee;
}
@ -214,11 +232,11 @@
height: 50px;
text-align: center;
overflow: hidden;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
border-radius: 4px;
-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.4);
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
-o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
@ -226,14 +244,6 @@
clip: rect(5px, 40px, 45px, 0px);
}
.openerp p.oe_mail_msg_p_email_header {
border-bottom: 1px solid #D2D9E7;
}
.openerp span.oe_mail_msg_body a.reduce, .openerp span.oe_mail_msg_body_short a.expand {
color: #4E43E7;
}
/* ------------------------------ */
/* Styling (should be openerp) */
/* ------------------------------ */
@ -248,7 +258,7 @@
}
.openerp input.oe_mail, textarea.oe_mail {
width: 100%;
width: 432px;
padding: 4px;
font-size: 12px;
border: 1px solid #cccccc;

BIN
addons/mail/static/src/img/email_icon.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 924 B

View File

@ -537,13 +537,13 @@ openerp.mail = function(session) {
display_subscribers: function (records) {
var self = this;
this.is_subscriber = false;
var sub_node = this.$element.find('div.oe_mail_recthread_followers')
sub_node.empty();
$('<h4/>').html('Followers (' + records.length + ')').appendTo(sub_node);
var user_list = this.$element.find('ul.oe_mail_followers_display').empty();
this.$element.find('div.oe_mail_recthread_followers h4').html('Followers (' + records.length + ')');
_(records).each(function (record) {
if (record.id == self.session.uid) { self.is_subscriber = true; }
var mini_url = self.thread_get_avatar('res.users', 'avatar', record.id);
$('<img class="oe_mail_oe_left oe_mail_msg_image" src="' + mini_url + '" title="' + record.name + '" alt="' + record.name + '"/>').appendTo(sub_node);
$('<li><img class="oe_mail_oe_left oe_mail_msg_image" src="' + mini_url + '"/>' +
'<a href="#" class="intlink oe_mail_oe_intlink" data-res-model="res.users" data-res-id="' + record.id + '">' + record.name + '</a></li>').appendTo(user_list);
});
if (self.is_subscriber) {
self.$element.find('button.oe_mail_button_follow').hide();

View File

@ -10,6 +10,7 @@
</table>
<div class="oe_mail_wall_left">
<div class="oe_mail_wall_act">
<img class="oe_mail_msg_image oe_left" alt="User img"/>
<textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="What are you working on?"/>
<button class="oe_right oe_mail_wall_button_comment" type="button">Post comment</button>
</div>
@ -38,8 +39,7 @@
</div>
<div class="oe_mail_recthread_followers">
<h4>Followers</h4>
<div class="oe_mail_followers_display">
</div>
<ul class="oe_mail_followers_display"></ul>
</div>
</div>
</div>
@ -48,7 +48,7 @@
<div class="oe_mail_thread_act">
<img class="oe_mail_msg_image oe_left" alt="User img"/>
<div class="oe_mail_msg_content">
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/><br />
<textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/>
</div>
</div>
<div class="oe_mail_thread_display"></div>
@ -59,7 +59,8 @@
<li t-name="ThreadMsg" t-attf-class="oe_mail oe_mail_thread_msg">
<div t-attf-class="oe_mail_msg_#{record.type}">
<img class="oe_mail_msg_image oe_left" t-att-src="record.mini_url"/>
<img t-if="record.type == 'email'" class="oe_email_icon oe_left" src="/mail/static/src/img/email_icon.png"/>
<img t-if="record.type == 'notification' || record.type == 'comment'" class="oe_mail_msg_image 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>
@ -103,22 +104,29 @@
<t t-if="params.thread_level > 0">
<a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a>
</t>
<br />
<span class="oe_mail_oe_bold">From:</span> <t t-esc="record.email_from"/> on <span class="oe_mail_oe_fade"><t t-raw="record.date"/></span><br />
<span class="oe_mail_oe_bold">To:</span> <t t-esc="record.email_to"/><br />
<span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/><br />
</p>
<p><span class="oe_mail_oe_bold">From:</span> <t t-esc="record.email_from"/></p>
<p><span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/></p>
<p class="oe_mail_msg">
<span class="oe_mail_msg_body"><t t-raw="record.body"/></span>
<t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t>
<br />
<t t-if="display['show_delete']">
<t t-if="thread._is_author(record.user_id[0])"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink"> Delete </a></t>
</t>
<t t-if="display['show_hide']">
<t t-if="!(thread._is_author(record.user_id[0]))"><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a></t>
</t>
</p>
<ul>
<t t-if="display['show_delete']">
<t t-if="thread._is_author(record.user_id[0])">
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
</t>
</t>
<t t-if="display['show_hide']">
<t t-if="!(thread._is_author(record.user_id[0]))">
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
</t>
</t>
<li>
<span class="oe_fade"><t t-raw="record.date"/></span>
</li>
</ul>
</t>
</template>