[IMP] further work on the icons

bzr revid: fva@openerp.com-20121022141932-xbdorr3287748zfw
This commit is contained in:
Frédéric van der Essen 2012-10-22 16:19:32 +02:00
parent f56ac23256
commit eaa40d0c0c
3 changed files with 8 additions and 11 deletions

View File

@ -97,7 +97,7 @@
opacity: 1;
-webkit-transition: all 0.1s linear;
}
.openerp .oe_mail .oe_msg:hover .oe_msg_icons .oe_star a{
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_star.oe_starred 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);
}
@ -105,11 +105,7 @@
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{
.openerp .oe_mail .oe_msg .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);
}

View File

@ -669,7 +669,7 @@ openerp.mail = function(session) {
// event: click on 'Vote' button
this.$el.on('click', '.oe_msg_vote', this.on_vote);
// event: click on 'starred/favorite' button
this.$el.on('click', '.oe_mail_starbox', this.on_star);
this.$el.on('click', '.oe_star', this.on_star);
},
/**
@ -839,15 +839,16 @@ openerp.mail = function(session) {
* add or remove a favorite (or starred) for a message and change class on the DOM
*/
on_star: function (event) {
console.log('on_star');
event.stopPropagation();
var self=this;
var button = self.$('button.oe_mail_starbox:first');
var button = self.$('.oe_star:first');
return this.ds_message.call('favorite_toggle', [[self.id]]).pipe(function(star){
self.is_favorite=star;
if(self.is_favorite){
button.addClass('oe_stared');
button.addClass('oe_starred');
} else {
button.removeClass('oe_stared');
button.removeClass('oe_starred');
if( self.options.typeof_thread == 'stared' ) {
self.animated_destroy({fadeTime:250});
}

View File

@ -197,7 +197,7 @@
<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>
<span t-attf-class="oe_star #{widget.is_favorite?'oe_starred':''}"><a title="Add To Favorites" class="oe_e">7</a></span>
</div>
<!-- message itself -->
<div class="oe_msg_content">