Increment of posts, likes and comment replies automatically done

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@122608 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-01-28 15:52:50 +00:00
parent 360cba5e16
commit e77e3560dd
4 changed files with 13 additions and 6 deletions

View File

@ -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(

View File

@ -4,7 +4,9 @@
<ui:style>
.statistic-icon {
display: inline-block;
vertical-align: bottom;
vertical-align: text-bottom;
width: auto;
height: 19px;
}
.statistic-value {

View File

@ -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;
}
</ui:style>
<g:HTMLPanel styleName="{style.statistic-container}" ui:field="container">
<g:HTMLPanel styleName="{style.statistic-container}"
ui:field="container">
<g:Label styleName="{style.statistic-header}" ui:field="header" />
<g:FlowPanel ui:field="containerValues">
<!-- Content goes here -->

View File

@ -11,7 +11,6 @@
}
.user-image {
align: left;
height: 70px;
width: auto;
border-radius: 6px;