INTEGRATED NEW WORKSPACE EXPLORER

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@119614 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-10-12 14:33:04 +00:00
parent f26ac97900
commit e0ca2fd831
6 changed files with 36 additions and 23 deletions

View File

@ -10,9 +10,6 @@
<dependent-module archiveName="pickitem-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickitem-widget/pickitem-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="wsmail-widget-1.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/wsmail-widget/wsmail-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="gcube-widgets-1.9.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
<dependency-type>uses</dependency-type>
</dependent-module>

View File

@ -1,10 +1,19 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.newsfeed.1-11-0"
date="2015-10-12">
<Change>Integrated workspace explorer widget and replace light tree</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.newsfeed.1-10-0"
date="2015-07-15">
<Change>Revised the way we shorten posts' text when this is very long, better heuristic used</Change>
<Change>Fixed bug #320, Users tagging does not work if @ is in the middle of already typed text, works for hashtags too</Change>
<Change>Revised mail notification message formatting, user text is now more clear and visible</Change>
<Change>Revised the way we provide back links for posts, removed assumption that News Feed is always present the default community page, good for single VRE portals support</Change>
<Change>Revised the way we shorten posts' text when this is very long,
better heuristic used</Change>
<Change>Fixed bug #320, Users tagging does not work if @ is in the
middle of already typed text, works for hashtags too</Change>
<Change>Revised mail notification message formatting, user text is now
more clear and visible</Change>
<Change>Revised the way we provide back links for posts, removed
assumption that News Feed is always present the default community
page, good for single VRE portals support</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.newsfeed.1-9-0"
date="2015-04-27">
@ -14,12 +23,14 @@
<Changeset component="org.gcube.portlets-user.newsfeed.1-8-2"
date="2014-12-13">
<Change>added ClientScopeHandler to help prevent the back button cache
problem in Chrome and Firefox</Change>
problem in Chrome and Firefox
</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.newsfeed.1-8-1"
date="2014-11-18">
<Change>fixed see more problem with commercial ands (amps;) not being
converted</Change>
converted
</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.newsfeed.1-8-0"
date="2014-10-20">
@ -34,7 +45,8 @@
<Changeset component="org.gcube.portlets-user.newsfeed.1-7-0"
date="2014-06-04">
<Change>
Fixed bug loosing session when messaging user from the news feed
Fixed bug loosing session when messaging user from the news
feed
</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.newsfeed.1-6-4"

View File

@ -45,7 +45,6 @@ import org.gcube.portlets.user.newsfeed.client.ui.ResultsFor;
import org.gcube.portlets.user.newsfeed.client.ui.ShowMoreFeeds;
import org.gcube.portlets.user.newsfeed.client.ui.SingleComment;
import org.gcube.portlets.user.newsfeed.client.ui.TweetTemplate;
import org.gcube.portlets.user.newsfeed.server.NewsServiceImpl;
import org.gcube.portlets.user.newsfeed.shared.EnhancedFeed;
import org.gcube.portlets.user.newsfeed.shared.MoreFeedsBean;
import org.gcube.portlets.user.newsfeed.shared.NewsConstants;
@ -267,7 +266,7 @@ public class NewsFeedPanel extends Composite {
delayMillis = result.getRefreshingTimeInMillis();
vreLabel = result.getVreLabel();
currentScope = result.getCurrentScope();
if (result.getUserInfo().getUsername().equals(NewsServiceImpl.TEST_USER)) {
if (result.getUserInfo().getUsername().equals(NewsConstants.TEST_USER)) {
doStopFeedsTimer();
doShowSessionExpired();
}
@ -410,7 +409,7 @@ public class NewsFeedPanel extends Composite {
}
@Override
public void onSuccess(UserSettings result) {
if (result.getUserInfo().getUsername().equals(NewsServiceImpl.TEST_USER)) {
if (result.getUserInfo().getUsername().equals(NewsConstants.TEST_USER)) {
doStopFeedsTimer();
doShowSessionExpired();
}
@ -477,7 +476,7 @@ public class NewsFeedPanel extends Composite {
}
@Override
public void onSuccess(UserSettings result) {
if (result.getUserInfo().getUsername().equals(NewsServiceImpl.TEST_USER)) {
if (result.getUserInfo().getUsername().equals(NewsConstants.TEST_USER)) {
doStopFeedsTimer();
doShowSessionExpired();
} else {

View File

@ -27,7 +27,7 @@ public class SingleComment extends Composite {
interface SingleCommentUiBinder extends UiBinder<Widget, SingleComment> {
}
private static final int MAX_SHOWTEXT_LENGTH = 256;
private static final int MAX_SHOWTEXT_LENGTH = 450;
private boolean isUsers = false;
private TweetTemplate owner;
@ -78,8 +78,11 @@ public class SingleComment extends Composite {
commentToShow = commentToShow.replaceAll("&lt;","<").replaceAll("&gt;",">");
commentToShow = commentToShow.replaceAll("&amp;","&");
if (commentToShow.length() > MAX_SHOWTEXT_LENGTH) {
commentToShow = commentToShow.substring(0, MAX_SHOWTEXT_LENGTH) + "...";
final int TEXT_TO_SHOW_LENGHT = (commentToShow.length() < 700) ? (commentToShow.length() - (commentToShow.length() / 3)) : 700;
commentToShow = commentToShow.substring(0, TEXT_TO_SHOW_LENGHT) + "...";
seeMore.setHTML("<a class=\"seemore\"> See More </a>");
}

View File

@ -81,7 +81,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
private static final String SESSION_ADMIN_ATTR = "SESSION_ADMIN_ATTR";
private static final String USER_SETTINGS_ATTR = "USER_SETTINGS_ATTR";
public static final String TEST_USER = "test.user";
public static final String TEST_SCOPE = "/gcube/devsec/USTORE_VRE";
private String APP_ID;
@ -122,8 +122,8 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
* @return .
*/
public String getDevelopmentUser() {
String user = TEST_USER;
// user = "massimiliano.assante";
String user = NewsConstants.TEST_USER;
// user = "andrea.rossi";
return user;
}
/**
@ -162,7 +162,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
isDevelopment = true;
}
if (username.compareTo(TEST_USER) != 0 && !isDevelopment) {
if (username.compareTo(NewsConstants.TEST_USER) != 0 && !isDevelopment) {
UserModel user = UserLocalServiceUtil.getUserByScreenName(OrganizationsUtil.getCompany().getCompanyId(), username);
thumbnailURL = "/image/user_male_portrait?img_id="+user.getPortraitId();
fullName = user.getFirstName() + " " + user.getLastName();
@ -557,7 +557,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
boolean likeCommitResult = false;
UserInfo user = getUserSettings().getUserInfo();
if (user.getUsername().compareTo(TEST_USER) == 0) {
if (user.getUsername().compareTo(NewsConstants.TEST_USER) == 0) {
return false;
}
@ -611,7 +611,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
_log.trace("Trying to add this comment " + commentText);
UserInfo user = getUserSettings().getUserInfo();
if (user.getUsername().compareTo(TEST_USER) == 0) {
if (user.getUsername().compareTo(NewsConstants.TEST_USER) == 0) {
return new OperationResult(false, "Session Expired", null);
}
@ -671,7 +671,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
@Override
public OperationResult editComment(Comment toEdit) {
UserInfo user = getUserSettings().getUserInfo();
if (user.getUsername().compareTo(TEST_USER) == 0) {
if (user.getUsername().compareTo(NewsConstants.TEST_USER) == 0) {
return new OperationResult(false, "Session Expired", null);
}

View File

@ -7,4 +7,6 @@ public class NewsConstants {
public static final int FEEDS_NO_PER_CATEGORY = 10;
public static final int FEEDS_MAX_PER_CATEGORY = 30;
public static final String TEST_USER = "test.user";
}