[MERGE] MyNotChatterTask: image resize.

This revision adds standard image field names and sizes (image: 1024x1024; image_medium: 180x180; image_small: 50x50, the last two being function fields). This web-side branch holds the field name change for the topbar avatar. It also adds 2 CSS classes when using images: oe_image_small and oe_image_medium, that fix the max-width and mex-height to respectively 50x50 and 180x180 px.
Misc :
- deleted oe_kanban_gravatar CSS class
- renamed oe_kanban_avatar_toto to oe_kanban_avatar_smallbox; this class is used only in res.partner form view, for child partners.

bzr revid: tde@openerp.com-20120807131300-i6helnvao10o0go7
This commit is contained in:
Thibault Delavallée 2012-08-07 15:13:00 +02:00
commit 35ac2be207
5 changed files with 17 additions and 20 deletions

View File

@ -509,6 +509,14 @@
.openerp .oe_avatar + div {
margin-left: 5px;
}
.openerp .oe_image_small > img {
max-width: 50px;
max-height: 50px;
}
.openerp .oe_image_medium > img {
max-width: 180px;
max-height: 180px;
}
.openerp .oe_button.oe_link {
border: none;
padding: 0;

View File

@ -408,6 +408,12 @@ $sheet-max-width: 860px
border: none
.oe_avatar + div
margin-left: 5px
.oe_image_small > img
max-width: 50px
max-height: 50px
.oe_image_medium > img
max-width: 180px
max-height: 180px
.oe_button.oe_link
@include reset()
img

View File

@ -874,7 +874,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
if(res.company_id[0] > 1)
topbar_name = _.str.sprintf("%s (%s)", topbar_name, res.company_id[1]);
self.$element.find('.oe_topbar_name').text(topbar_name);
var avatar_src = _.str.sprintf('%s/web/binary/image?session_id=%s&model=res.users&field=avatar&id=%s', self.session.prefix, self.session.session_id, self.session.uid);
var avatar_src = _.str.sprintf('%s/web/binary/image?session_id=%s&model=res.users&field=image_small&id=%s', self.session.prefix, self.session.session_id, self.session.uid);
$avatar.attr('src', avatar_src);
});
};

View File

@ -194,18 +194,7 @@
.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_record {
margin-bottom: 6px;
}
.openerp .oe_kanban_view .oe_kanban_gravatar {
display: block;
width: 20px;
height: 20px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.openerp .oe_kanban_view .oe_kanban_avatar_toto {
.openerp .oe_kanban_view .oe_kanban_avatar_smallbox {
height: 40px;
width: 40px;
border: 1px solid;

View File

@ -193,13 +193,7 @@
margin: 2px 4px
&.oe_kanban_grouped .oe_kanban_record
margin-bottom: 6px
.oe_kanban_gravatar
display: block
width: 20px
height: 20px
@include radius(3px)
@include box-shadow(0 1px 2px rgba(0,0,0,0.2))
.oe_kanban_avatar_toto
.oe_kanban_avatar_smallbox
height: 40px
width: 40px
border: 1px solid