[MEGRE] from trunk-openchatter-DOM-chm

bzr revid: chm@openerp.com-20121022135034-bjjqc6itf0ahqph0
This commit is contained in:
Christophe Matthieu
2012-10-22 15:50:34 +02:00
3 changed files with 89 additions and 45 deletions
+66 -17
View File
@@ -3,7 +3,7 @@
}
.openerp .oe_mail {
position: relative;
width: 560px;
width: 740px;
margin: 16px;
}
.openerp .oe_mail .oe_thread{
@@ -17,11 +17,24 @@
.openerp .oe_mail .oe_msg{
position: relative;
background: #f7f7f7;
background: #F4F5FA;
border-radius: 2px;
border: solid 1px #ececec;
margin-bottom: 4px;
min-height: 75px;
margin-bottom: 2px;
min-height: 40px;
}
.openerp .oe_mail .oe_msg:not(.oe_lvl_0){
background: #FFF;
border: none;
margin-bottom:0px;
min-height:34px;
}
.openerp .oe_mail .oe_msg:not(.oe_lvl_0) .oe_msg_icon{
width:32px;
margin:1px;
border-radius:2px;
}
.openerp .oe_mail .oe_msg:not(.oe_lvl_0) .oe_msg_center{
margin-left:34px;
}
.openerp .oe_mail .oe_msg .oe_msg_left{
position: absolute;
@@ -38,18 +51,17 @@
display: block;
margin-left: 40px;
}
.openerp .oe_mail .oe_msg.oe_with_buttons .oe_msg_center{
margin-right: 32px;
}
.openerp .oe_mail .oe_msg .oe_msg_right{
position: absolute;
right:0; top:0; bottom: 0; width: 32px;
overflow: hidden;
}
.openerp .oe_mail .oe_msg .oe_msg_footer{
height: 32px;
height: 16px;
padding-left: 4px;
overflow: hidden;
font-size: 11px;
opacity:0;
-webkit-transition: opacity 0.2s linear;
}
.openerp .oe_mail .oe_thread:hover .oe_msg_footer{
opacity: 0.8;
-webkit-transition: opacity 0.2s linear;
}
.openerp .oe_mail .oe_msg.oe_msg_composer .oe_msg_footer{
height: auto;
@@ -58,12 +70,49 @@
display: block;
overflow: hidden;
padding: 4px;
padding-bottom:1px;
}
.openerp .oe_mail .oe_msg .oe_msg_icons a{
text-decoration: none;
display: block;
.openerp .oe_mail .oe_msg .oe_msg_icons{
float: right;
margin-top: 4px;
margin-right: 8px;
height: 24px;
-webkit-user-select: none;
}
.openerp .oe_mail .oe_msg .oe_msg_icons span{
float:right;
width:24px;
height:24px;
line-height:24px;
text-align: center;
}
.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);
-webkit-transition: all 0.2s linear;
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons a{
opacity: 1;
-webkit-transition: all 0.1s linear;
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons .oe_star 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);
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons .oe_reply 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);
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons .oe_read 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);
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons .oe_unread 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);
}
.openerp .oe_mail .oe_msg .oe_msg_content textarea{
width: 100%;
height: 100%;
+13 -14
View File
@@ -110,6 +110,8 @@ openerp.mail = function(session) {
domain.unshift('&');
}
console.log( JSON.stringify(domain) );
return domain;
}
};
@@ -480,7 +482,7 @@ openerp.mail = function(session) {
this.type = 'expandable',
this.max_limit = this.id < 0 || false,
this.flag_used = false,
this.parent_thread= parent.messages!= undefined ? parent : options.options._parents[0] ;
this.parent_thread= parent.messages!= undefined ? parent : options.options._parents[0];
},
@@ -656,18 +658,18 @@ openerp.mail = function(session) {
self.$('.oe_msg_attachments:first').toggle();
});
// event: click on icone 'Read' in header
this.$el.on('click', 'a.oe_read', this.on_message_read_unread);
this.$el.on('click', '.oe_read', this.on_message_read_unread);
// event: click on icone 'UnRead' in header
this.$el.on('click', 'a.oe_unread', this.on_message_read_unread);
this.$el.on('click', '.oe_unread', this.on_message_read_unread);
// event: click on 'Delete' in msg side menu
this.$el.on('click', 'a.oe_msg_delete', this.on_message_delete);
this.$el.on('click', '.oe_msg_delete', this.on_message_delete);
// event: click on 'Reply' in msg
this.$el.on('click', 'a.oe_reply', this.on_message_reply);
this.$el.on('click', '.oe_reply', this.on_message_reply);
// event: click on 'Vote' button
this.$el.on('click', 'button.oe_msg_vote', this.on_vote);
this.$el.on('click', '.oe_msg_vote', this.on_vote);
// event: click on 'starred/favorite' button
this.$el.on('click', 'a.oe_mail_starbox', this.on_star);
this.$el.on('click', '.oe_mail_starbox', this.on_star);
},
/**
@@ -1213,7 +1215,8 @@ openerp.mail = function(session) {
if (sort) {
if (parent_older) {
message.insertAfter(parent_older.$el);
//warning : insert after the thread of the message !
message.insertAfter(parent_older.thread ? parent_older.thread.$el : parent_older.$el);
} else if(parent_newer) {
@@ -1234,7 +1237,8 @@ openerp.mail = function(session) {
} else if(parent_newer) {
message.insertAfter(parent_newer.$el);
//warning : insert after the thread of the message !
message.insertAfter(parent_newer.thread ? parent_newer.thread.$el : parent_newer.$el);
} else if(message.id < 0) {
@@ -1247,11 +1251,6 @@ openerp.mail = function(session) {
}
}
self.$('.oe_msg_first:first').removeClass("oe_msg_first");
self.$('.oe_msg_last:last').removeClass("oe_msg_last");
self.$('.oe_msg_comment:first, .oe_msg_comment:first-child').addClass("oe_msg_first");
self.$('.oe_msg_comment:last, .oe_msg_comment:last-child').addClass("oe_msg_last");
return message
},
+10 -14
View File
@@ -184,16 +184,7 @@
<!-- default layout -->
<t t-name="mail.thread.message">
<div t-attf-class="oe_msg oe_with_buttons oe_msg_#{widget.type} oe_msg_#{widget.to_read?'unread':'read'}">
<!-- message actions (read/unread, reply, delete...) -->
<div class='oe_msg_right'>
<div class="oe_msg_icons">
<t t-call="mail.thread.message.star"/>
<a t-if="widget.show_read_unread_button" title="Read" class="oe_read oe_e">W</a>
<a t-if="widget.show_read_unread_button" title="Set back to unread" class="oe_unread oe_e">h</a>
<a t-if="widget.show_reply_button" title="Reply" class="oe_reply oe_e">)</a>
</div>
</div>
<div t-attf-class="oe_msg oe_lvl_#{widget.thread_level} oe_msg_#{widget.type} oe_msg_#{widget.to_read?'unread':'read'}">
<div class='oe_msg_left'>
<a t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}" t-att-title="widget.author_id[1]">
@@ -202,6 +193,12 @@
</div>
<div class="oe_msg_center">
<div class='oe_msg_icons'>
<span class='oe_read' t-if="widget.show_read_unread_button"><a title="Read" class="oe_e">W</a></span>
<span class='oe_unread' t-if="widget.show_read_unread_button"><a title="Set back to unread" class="oe_e">W</a></span>
<span class='oe_reply' t-if="widget.show_reply_button"><a title="Reply" class="oe_e">(</a></span>
<span class='oe_star'><a t-attf-class="oe_e oe_mail_starbox #{widget.has_stared?'oe_stared':''}">7</a></span>
</div>
<!-- message itself -->
<div class="oe_msg_content">
<h1 t-if="widget.subject" class="oe_msg_title">
@@ -218,7 +215,7 @@
</t>
</div>
<div class="oe_msg_footer">
<a t-if="widget.author_id" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
from <a t-if="widget.author_id" t-attf-href="#model=res.partner&amp;id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
<a t-if="widget.attachment_ids.length > 0" class="oe_mail_msg_view_attachments">
<t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
@@ -253,6 +250,7 @@
Template used to display Like/Unlike in a mail.message
-->
<span t-name="mail.thread.message.vote">
<!--
<span class="oe_left oe_mail_vote_count">
<t t-if='widget.has_voted'>
You
@@ -272,12 +270,10 @@
<t t-if="widget.has_voted">Respectfully disagree</t>
</span>
</button>
-->
</span>
<!-- mail.thread.message.star
Template used to display stared/unstared message in a mail.message
-->
<t t-name="mail.thread.message.star">
<a t-attf-class="oe_mail_starbox #{widget.has_stared?'oe_stared':''}">*</a>
</t>
</template>