version to release, added no text reduction when is displaying single feed

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@73800 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-04-21 17:05:18 +00:00
parent f6fe2fcefe
commit 9bdd6b24bf
2 changed files with 4 additions and 6 deletions

View File

@ -4,8 +4,6 @@
package org.gcube.portlets.user.newsfeed.client.templates;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import org.gcube.portal.databook.client.GCubeSocialNetworking;
@ -13,7 +11,6 @@ import org.gcube.portal.databook.shared.Comment;
import org.gcube.portal.databook.shared.Feed;
import org.gcube.portal.databook.shared.UserInfo;
import org.gcube.portlets.user.newsfeed.client.event.AddLikeEvent;
import org.gcube.portlets.user.newsfeed.client.event.DeleteCommentEvent;
import org.gcube.portlets.user.newsfeed.client.event.DeleteFeedEvent;
import org.gcube.portlets.user.newsfeed.client.event.SeeCommentsEvent;
import org.gcube.portlets.user.newsfeed.client.event.SeeLikesEvent;
@ -140,7 +137,8 @@ public class TweetTemplate extends Composite {
commentArea.setHTML("<a>" + NewsFeedPanel.COMMENT_LABEL + "</a>");
String feedText = feed.getDescription();
if ( (! feedText.startsWith("<span")) && feedText.length() > MAX_SHOWTEXT_LENGTH) {
String descWithoutHTML = new HTML(feedText).getText();
if ( (! feedText.startsWith("<span")) && descWithoutHTML.length() > MAX_SHOWTEXT_LENGTH && !displaySingle) {
feedText = feedText.substring(0, MAX_SHOWTEXT_LENGTH) + "...";
seeMore.setHTML("<a class=\"seemore\"> See More </a>");
}

View File

@ -95,8 +95,8 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
if (user == null) {
_log.warn("USER IS NULL setting testing user and Running OUTSIDE PORTAL");
user = "test.user";
// user = "luca.frosini";
// SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
user = "luca.frosini";
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
}
else {
withinPortal = true;