From 4ee7c3685e55ed4bd211562f1cd13009b877544d Mon Sep 17 00:00:00 2001 From: "massimiliano.assante" Date: Mon, 10 Jun 2013 16:39:29 +0000 Subject: [PATCH] fixed workspace notification direct opening git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/notifications@76966 82a268e6-3cf1-43bd-a215-b396298e98cf --- distro/changelog.xml | 2 ++ .../client/view/NotificationSettingsDialog.java | 2 +- .../client/view/templates/SingleNotificationView.java | 10 ++++++++++ .../notifications/server/NotificationsServiceImpl.java | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/distro/changelog.xml b/distro/changelog.xml index 70404ec..88fe2d6 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -3,6 +3,8 @@ date="2013-05-29"> Added support for fine grained notifications settings + Added support for workspace notifications direct opening + diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationSettingsDialog.java b/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationSettingsDialog.java index 0a406f8..101caeb 100644 --- a/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationSettingsDialog.java +++ b/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationSettingsDialog.java @@ -41,7 +41,7 @@ import com.google.gwt.user.client.ui.Widget; * @author Massimiliano Assante ISTI-CNR * */ -public class NotificationSettingsDialog extends GCubeDialog { +public class NotificationSettingsDialog extends GCubeDialog { private VerticalPanel mainPanel = new VerticalPanel(); private VerticalPanel container = new VerticalPanel(); diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.java b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.java index 4a5693d..6ef489d 100644 --- a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.java +++ b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.java @@ -94,6 +94,16 @@ public class SingleNotificationView extends Composite { case DOCUMENT_WORKFLOW_FORWARD_STEP_COMPLETED_OWNER: goApp.setHTML(" See Users Activity."); break; + case WP_FOLDER_SHARE: + case WP_FOLDER_ADDEDUSER: + case WP_FOLDER_REMOVEDUSER: + case WP_FOLDER_RENAMED: + case WP_ITEM_DELETE: + case WP_ITEM_NEW: + case WP_ITEM_RENAMED: + case WP_ITEM_UPDATED: + goApp.setHTML(" Go to Folder."); + break; } } diff --git a/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java b/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java index b33576e..6f5a010 100644 --- a/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/notifications/server/NotificationsServiceImpl.java @@ -123,7 +123,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No public HashMap> getUserNotifications() { HashMap> toReturn = new HashMap>(); try { - for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), 20)) { + for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), 30)) { Date dateWithoutTime = removeTimePart(notification.getTime()); if (! toReturn.containsKey(dateWithoutTime)) { ArrayList nots = new ArrayList();