diff --git a/.classpath b/.classpath index 267fbc8..3c54350 100644 --- a/.classpath +++ b/.classpath @@ -6,7 +6,7 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index b1ea188..f675ffb 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -1,5 +1,5 @@ eclipse.preferences.version=1 jarsExcludedFromWebInfLib= -lastWarOutDir=/home/costantino/workspace/user-statistics-portlet/target/user-statistics-portlet-0.0.1-SNAPSHOT +lastWarOutDir=/home/costantino/workspace/user-statistics/target/user-statistics-1.0.0-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java index 4315f97..83612bc 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java @@ -125,9 +125,13 @@ public class StatisticsPanel extends Composite { if(!isRoot){ - // add the border to the panel and the VRE name + // add the border to the panel and the VRE name (check for VRE name lenght) mainPanel.addStyleName("user-stats-frame-border"); - final HTML name = new HTML(DISPLAY_NAME + " in " + information.getActualVre()); + String nameToShow = DISPLAY_NAME + " in " + information.getActualVre(); + nameToShow = nameToShow.length() > 30 ? + nameToShow.substring(0, 27) + "..." : information.getActualVre(); + final HTML name = new HTML(nameToShow); + name.setTitle(DISPLAY_NAME + " in " + information.getActualVre()); name.setStyleName("user-stats-title"); mainPanel.add(name); @@ -145,7 +149,7 @@ public class StatisticsPanel extends Composite { // set the style for the user image userImage.setStyleName("user-image"); - + // set the right margin according isRoot variable value if(isRoot) userImage.addStyleName("user-image-margin-right-root"); @@ -336,7 +340,7 @@ public class StatisticsPanel extends Composite { feeds.clearPanelValues(); Label numberOfFeedsLabel = new Label(formattedNumbers(postsBean.getFeedsNumber())); if(isRoot) - numberOfFeedsLabel.setTitle("Your posts during the last year (" + postsBean.getFeedsNumber() + ")."); + numberOfFeedsLabel.setTitle("Your posts during the last year (" + postsBean.getFeedsNumber() + ")."); else numberOfFeedsLabel.setTitle("Your posts during the last year in this VRE (" + postsBean.getFeedsNumber() + ")."); numberOfFeedsLabel.setStyleName("statistic-value"); diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java index 3deab98..4b41703 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java @@ -120,7 +120,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U */ public String getDevelopmentUser() { String user = userid; -// user = "massimiliano.assante"; + user = "massimiliano.assante"; return user; } @@ -257,7 +257,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre, accountURL); } - else return new UserInformation(true, null, userName, null, null); + else return new UserInformation(false, null, userName, vreID, null); } @SuppressWarnings("deprecation")