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
This commit is contained in:
Massimiliano Assante 2013-06-10 16:39:29 +00:00
parent c2c40d290b
commit 4ee7c3685e
4 changed files with 14 additions and 2 deletions

View File

@ -3,6 +3,8 @@
date="2013-05-29"> date="2013-05-29">
<Change>Added support for fine grained notifications settings <Change>Added support for fine grained notifications settings
</Change> </Change>
<Change>Added support for workspace notifications direct opening
</Change>
</Changeset> </Changeset>
<Changeset component="org.gcube.portlet.user.notifications.0-2-0" <Changeset component="org.gcube.portlet.user.notifications.0-2-0"
date="2013-04-19"> date="2013-04-19">

View File

@ -41,7 +41,7 @@ import com.google.gwt.user.client.ui.Widget;
* @author Massimiliano Assante ISTI-CNR * @author Massimiliano Assante ISTI-CNR
* *
*/ */
public class NotificationSettingsDialog extends GCubeDialog { public class NotificationSettingsDialog extends GCubeDialog {
private VerticalPanel mainPanel = new VerticalPanel(); private VerticalPanel mainPanel = new VerticalPanel();
private VerticalPanel container = new VerticalPanel(); private VerticalPanel container = new VerticalPanel();

View File

@ -94,6 +94,16 @@ public class SingleNotificationView extends Composite {
case DOCUMENT_WORKFLOW_FORWARD_STEP_COMPLETED_OWNER: case DOCUMENT_WORKFLOW_FORWARD_STEP_COMPLETED_OWNER:
goApp.setHTML("<a class=\"link\" href=\""+toShow.getUri()+"\"> See Users Activity.</a>"); goApp.setHTML("<a class=\"link\" href=\""+toShow.getUri()+"\"> See Users Activity.</a>");
break; 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("<a class=\"link\" href=\""+toShow.getUri()+"\"> Go to Folder.</a>");
break;
} }
} }

View File

@ -123,7 +123,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
public HashMap<Date, ArrayList<Notification>> getUserNotifications() { public HashMap<Date, ArrayList<Notification>> getUserNotifications() {
HashMap<Date, ArrayList<Notification>> toReturn = new HashMap<Date, ArrayList<Notification>>(); HashMap<Date, ArrayList<Notification>> toReturn = new HashMap<Date, ArrayList<Notification>>();
try { try {
for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), 20)) { for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), 30)) {
Date dateWithoutTime = removeTimePart(notification.getTime()); Date dateWithoutTime = removeTimePart(notification.getTime());
if (! toReturn.containsKey(dateWithoutTime)) { if (! toReturn.containsKey(dateWithoutTime)) {
ArrayList<Notification> nots = new ArrayList<Notification>(); ArrayList<Notification> nots = new ArrayList<Notification>();