git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/social-profile@74819 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-05-09 17:18:50 +00:00
parent bede8f2dd6
commit 8fe9beb56f
4 changed files with 18 additions and 9 deletions

12
pom.xml
View File

@ -99,6 +99,18 @@
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -47,16 +47,16 @@ public class DisplayProfile extends Composite {
public void onSuccess(UserContext result) {
myUserInfo = result.getUserInfo();
avatarImage.getElement().getParentElement().setAttribute("href", myUserInfo.getAccountURL());
avatarImage.setSize("120px", "120px");
avatarImage.setSize("100px", "100px");
avatarImage.setUrl(myUserInfo.getAvatarId());
userFullName.setText(myUserInfo.getFullName());
headline.setText(result.getHeadline());
userFullName.setText(result.getInstitution());
institution.setText(result.getInstitution());
}
@Override
public void onFailure(Throwable caught) {
Window.alert("Failure: " + caught.getMessage());
avatarImage.setSize("120px", "120px");
avatarImage.setSize("100px", "100px");
avatarImage.setUrl(avatar_default);
}
});

View File

@ -4,10 +4,10 @@
<g:HTMLPanel ui:field="mainPanel">
<table class="">
<tr>
<td width="150px;" align="middle">
<td width="120px;" align="middle">
<a href="">
<g:Image title="Edit Profile Picture" styleName="user-photo"
url="" ui:field="avatarImage" width="120" height="120" />
url="" ui:field="avatarImage" width="100" height="100" />
</a>
</td>

View File

@ -18,21 +18,18 @@
}
.full-name {
padding-top: 5px;
font-family: Helvetica, Arial, sans-serif;
font-size: 24px;
font-size: 22px;
font-weight: bold;
}
.headline {
padding-top: 5px;
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
color: #444444;
}
.institution {
padding-top: 5px;
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
color: #444444;