There is no longer the chance to change avatar by clicking on the actual avatar shown by this portlet.

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@126809 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-04-06 13:42:41 +00:00
parent 210aea809f
commit fa22e6f116
3 changed files with 14 additions and 48 deletions

View File

@ -196,20 +196,6 @@ public class StatisticsPanel extends Composite {
else
userImage.addStyleName("user-image-margin-right-vre");
// set url to change avatar
final String urlAccount = information.getAccountURL();
if(urlAccount != null){
userImage.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent ev) {
Window.Location.assign(urlAccount);
}
});
userImage.setTitle("Edit your avatar");
userImage.addStyleName("user-image-editable");
}
// add image to mainPanel
mainPanel.add(userImage);

View File

@ -247,13 +247,9 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
}
// url account to change the avatar
String accountURL = null;
_log.debug("Account url for " + userName + " is " + accountURL);
return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre, accountURL);
return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre);
}
else return new UserInformation(false, null, userName, vreID, null);
else return new UserInformation(false, null, userName, vreID);
}
@SuppressWarnings("deprecation")

View File

@ -18,20 +18,18 @@ public class UserInformation implements Serializable {
private String urlAvatar;
private String displayName;
private String actualVre;
private String accountURL;
public UserInformation(){
super();
}
public UserInformation(boolean isRoot, String urlAvatar,
String displayName, String actualVre, String accountURL) {
String displayName, String actualVre) {
super();
this.isRoot = isRoot;
this.urlAvatar = urlAvatar;
this.displayName = displayName;
this.actualVre = actualVre;
this.accountURL = accountURL;
}
@ -74,25 +72,11 @@ public class UserInformation implements Serializable {
this.actualVre = actualVre;
}
public String getAccountURL() {
return accountURL;
}
public void setAccountURL(String accountURL) {
this.accountURL = accountURL;
}
@Override
public String toString() {
return "UserInformation [isRoot=" + isRoot + ", urlAvatar=" + urlAvatar
+ ", displayName=" + displayName + ", actualVre=" + actualVre
+ ", accountURL=" + accountURL + "]";
+ "]";
}
}