badge set vertically

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/vre-members@99588 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-09-09 09:45:42 +00:00
parent d52c47eabd
commit 04c43c1ae1
5 changed files with 67 additions and 69 deletions

View File

@ -41,11 +41,11 @@ public class VREMembersPanel extends Composite {
mainPanel.clear();
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
Grid grid = new Grid(users.size()/3+1, 3);
Grid grid = new Grid(users.size()/4+1, 4);
mainPanel.add(grid);
for (int i = 0; i < users.size(); i++) {
grid.setWidget(i/3, i%3, new DisplayBadge(users.get(i)));
grid.setWidget(i/4, i%4, new DisplayBadge(users.get(i)));
}
}

View File

@ -52,7 +52,6 @@ public class DisplayBadge extends Composite {
myUserInfo = user;
avatarImage.getElement().getParentElement().setAttribute("href", myUserInfo.getAvatarId());
avatarImage.setSize("100px", "100px");
avatarImage.setUrl(myUserInfo.getAvatarId());
userFullName.setText(myUserInfo.getFullName());

View File

@ -2,70 +2,17 @@
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:m="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements">
<ui:style>
.framed {
padding: 10px;
margin: 10px;
background: #FFF;
border-radius: 6px !important;
-moz-border-radius: 6px !important;
-webkit-border-radius: 6px !important;
border: 1px solid #DBDBDB;
}
.user-photo {
display: block;
padding: 2px;
border: 1px solid #E6E6E6;
}
.user-details {
padding: 5px;
}
.fullName {
font-family: 'Helvetica Neue', Arial, sans-serif;
font-size: 22px;
font-weight: bold;
white-space: nowrap;
}
.fullName:hover {
cursor: pointer;
cursor: hand;
text-decoration: underline;
color: #01497C;
}
.headline {
font-family: 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
color: #444444;
}
.institution {
font-family: 'Helvetica Neue', Arial, sans-serif;
font-size: 13px;
color: #444444;
}
</ui:style>
<g:HTMLPanel ui:field="mainPanel" styleName="{style.framed}">
<table>
<tr>
<td width="110px;" align="middle">
<a ui:field="imageRedirect" href="">
<g:Image title="Profile Picture" styleName="{style.user-photo}"
url="" ui:field="avatarImage" width="100" height="100" />
</a>
</td>
<td valign="top">
<div class="{style.user-details}">
<g:HTML styleName="{style.fullName}" ui:field="userFullName"></g:HTML>
<g:HTML styleName="{style.headline}" ui:field="headlineLabel"></g:HTML>
<g:HTML styleName="{style.institution}" ui:field="institutionLabel"></g:HTML>
</div>
</td>
</tr>
</table>
<g:HTMLPanel ui:field="mainPanel" styleName="framed">
<div class="photo-details">
<a ui:field="imageRedirect" href="">
<g:Image title="Profile Picture" styleName="user-photo" url=""
ui:field="avatarImage" />
</a>
</div>
<div class="user-details">
<g:HTML styleName="fullName" ui:field="userFullName"></g:HTML>
<g:HTML styleName="headline" ui:field="headlineLabel"></g:HTML>
<g:HTML styleName="institution" ui:field="institutionLabel"></g:HTML>
</div>
</g:HTMLPanel>
</ui:UiBinder>

View File

@ -3,7 +3,7 @@
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
<set-property name="user.agent" value="gecko1_8,safari" />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />

View File

@ -0,0 +1,52 @@
.framed {
font-family: 'Helvetica Neue', Arial, sans-serif;
width: 200px;
height: 290px;
padding: 10px;
margin: 10px;
background: #FFF;
border-radius: 6px !important;
-moz-border-radius: 6px !important;
-webkit-border-radius: 6px !important;
border: 1px solid #DBDBDB;
}
.user-photo {
padding: 5px;
border: 1px solid #E6E6E6;
width: 180px;
height: 175px;
}
.user-details {
padding: 5px;
}
.photo-details {
width: 200px;
text-align: center;
}
.fullName {
font-size: 15px;
font-weight: bold;
line-height: 18px;
}
.fullName:hover {
cursor: pointer;
cursor: hand;
text-decoration: underline;
color: #01497C;
}
.headline {
font-size: 13px;
color: #444444;
line-height: 16px;
}
.institution {
font-size: 11px;
color: #444444;
}