[MERGE] mail: css improvements

bzr revid: fva@openerp.com-20121022133051-q78csvrxthipehkg
This commit is contained in:
Frédéric van der Essen
2012-10-22 15:30:51 +02:00
3 changed files with 82 additions and 42 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%;
+6 -11
View File
@@ -626,18 +626,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);
},
/**
@@ -1202,11 +1202,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
@@ -185,16 +185,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]">
@@ -203,6 +194,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">
@@ -219,7 +216,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>
@@ -254,6 +251,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
@@ -273,12 +271,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>