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:
parent
f6fe2fcefe
commit
9bdd6b24bf
src/main/java/org/gcube/portlets/user/newsfeed
|
@ -4,8 +4,6 @@
|
||||||
package org.gcube.portlets.user.newsfeed.client.templates;
|
package org.gcube.portlets.user.newsfeed.client.templates;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portal.databook.client.GCubeSocialNetworking;
|
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.Feed;
|
||||||
import org.gcube.portal.databook.shared.UserInfo;
|
import org.gcube.portal.databook.shared.UserInfo;
|
||||||
import org.gcube.portlets.user.newsfeed.client.event.AddLikeEvent;
|
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.DeleteFeedEvent;
|
||||||
import org.gcube.portlets.user.newsfeed.client.event.SeeCommentsEvent;
|
import org.gcube.portlets.user.newsfeed.client.event.SeeCommentsEvent;
|
||||||
import org.gcube.portlets.user.newsfeed.client.event.SeeLikesEvent;
|
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>");
|
commentArea.setHTML("<a>" + NewsFeedPanel.COMMENT_LABEL + "</a>");
|
||||||
|
|
||||||
String feedText = feed.getDescription();
|
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) + "...";
|
feedText = feedText.substring(0, MAX_SHOWTEXT_LENGTH) + "...";
|
||||||
seeMore.setHTML("<a class=\"seemore\"> See More </a>");
|
seeMore.setHTML("<a class=\"seemore\"> See More </a>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,8 +95,8 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
_log.warn("USER IS NULL setting testing user and Running OUTSIDE PORTAL");
|
_log.warn("USER IS NULL setting testing user and Running OUTSIDE PORTAL");
|
||||||
user = "test.user";
|
user = "test.user";
|
||||||
// user = "luca.frosini";
|
user = "luca.frosini";
|
||||||
// SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
|
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
withinPortal = true;
|
withinPortal = true;
|
||||||
|
|
Loading…
Reference in New Issue