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 7789b93..67b7c86 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
@@ -483,7 +483,9 @@ public class StatisticsPanel extends Composite {
if(event.getSubject().equals(this.getName())){
GWT.log("Decrement number of post message received");
+ // they can't be less than zero...
numberOfWrittenFeeds --;
+ numberOfWrittenFeeds = numberOfWrittenFeeds < 0 ? 0: numberOfWrittenFeeds;
numberOfFeedsLabel.setText(formattedNumbers(numberOfWrittenFeeds));
if(isRoot)
numberOfFeedsLabel.setTitle("Your posts during the last year (" + numberOfWrittenFeeds + ").");
@@ -550,8 +552,9 @@ public class StatisticsPanel extends Composite {
GWT.log("Decrement number of likes received");
+ // they can't be less than zero...
numberOfLikesGot --;
-
+ numberOfLikesGot = numberOfLikesGot < 0 ? 0: numberOfLikesGot;
String urlLikesIcon = GWT.getModuleBaseURL() + "../images/star_blue.png";
if(isRoot)
@@ -628,8 +631,9 @@ public class StatisticsPanel extends Composite {
GWT.log("Decrement number of comments received");
+ // they can't be less than zero...
numberOfCommentsGot --;
-
+ numberOfCommentsGot = numberOfCommentsGot < 0 ? 0: numberOfCommentsGot;
String urlCommentsIcon = GWT.getModuleBaseURL() + "../images/comment_edit.png";
if(isRoot)
content.setComments(
diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/CommentsAndLikesWidget.ui.xml b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/CommentsAndLikesWidget.ui.xml
index 60b1897..6a06c35 100644
--- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/CommentsAndLikesWidget.ui.xml
+++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/CommentsAndLikesWidget.ui.xml
@@ -4,7 +4,9 @@
.statistic-icon {
display: inline-block;
- vertical-align: bottom;
+ vertical-align: text-bottom;
+ width: auto;
+ height: 19px;
}
.statistic-value {
diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/StatisticWidget.ui.xml b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/StatisticWidget.ui.xml
index 6979cb6..bd8d92b 100644
--- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/StatisticWidget.ui.xml
+++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/ui/StatisticWidget.ui.xml
@@ -5,6 +5,8 @@
.statistic-container {
display: inline-block;
vertical-align: top;
+ height: 60px;
+ width: auto;
}
.statistic-header {
@@ -20,9 +22,9 @@
text-align: center;
vertical-align: text-top;
}
-
-
+
diff --git a/src/main/webapp/Statistics.css b/src/main/webapp/Statistics.css
index 54dd985..2b88a48 100644
--- a/src/main/webapp/Statistics.css
+++ b/src/main/webapp/Statistics.css
@@ -11,7 +11,6 @@
}
.user-image {
- align: left;
height: 70px;
width: auto;
border-radius: 6px;