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 101caeb..fb7095c 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 @@ -127,7 +127,7 @@ public class NotificationSettingsDialog extends GCubeDialog { mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); if (success) { setText("Notifications Settings Saved"); - mainPanel.add(new HTML("Notifications Settings correctly saved.")); + mainPanel.add(new HTML("Notifications Settings correctly saved.")); mainPanel.add(new Image(mailSentOK)); } else { @@ -143,8 +143,8 @@ public class NotificationSettingsDialog extends GCubeDialog { }); } Button close = new Button("Close"); - close.setSize("200px", "70px"); - close.getElement().getStyle().setFontSize(24, Unit.PX); + close.setSize("150px", "40px"); + close.getElement().getStyle().setFontSize(16, Unit.PX); close.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { 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 6ef489d..2be8b24 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 @@ -51,8 +51,7 @@ public class SingleNotificationView extends Composite { String removeMarkup = notificationToShow.replaceAll("&", "&"); String actualHTML = new HTML(removeMarkup).getText(); - - + //in case of links behave differently, i know is terrible //TODO: write better code here i think if (new HTML(actualHTML).getText().equalsIgnoreCase(LINK_TEXT)) { actualHTML = actualHTML.replace("your post:", ""); @@ -104,6 +103,11 @@ public class SingleNotificationView extends Composite { case WP_ITEM_UPDATED: goApp.setHTML(" Go to Folder."); break; + case CALENDAR_ADDED_EVENT: + case CALENDAR_UPDATED_EVENT: + case CALENDAR_DELETED_EVENT: + goApp.setHTML(" Go to Calendar."); + break; } } @@ -151,6 +155,12 @@ public class SingleNotificationView extends Composite { return images.workflowForward(); case DOCUMENT_WORKFLOW_FORWARD_STEP_COMPLETED_OWNER: return images.workflowForwardComplete(); + case CALENDAR_ADDED_EVENT: + return images.calendar(); + case CALENDAR_UPDATED_EVENT: + return images.calendarEdit(); + case CALENDAR_DELETED_EVENT: + return images.calendarDelete(); default: return images.generic(); } diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/NotificationImages.java b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/NotificationImages.java index 2115562..6106524 100644 --- a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/NotificationImages.java +++ b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/NotificationImages.java @@ -16,6 +16,15 @@ public interface NotificationImages extends ClientBundle { @Source("mail.png") ImageResource message(); + @Source("calendar.png") + ImageResource calendar(); + + @Source("calendar_edit.png") + ImageResource calendarEdit(); + + @Source("calendar_delete.png") + ImageResource calendarDelete(); + @Source("share_blue.png") ImageResource share(); diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar.png b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar.png new file mode 100644 index 0000000..a20f5fc Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar.png differ diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_delete.png b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_delete.png new file mode 100644 index 0000000..f6100a1 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_delete.png differ diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_edit.png b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_edit.png new file mode 100644 index 0000000..6a55f83 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/images/calendar_edit.png differ 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 c20026c..882f347 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 @@ -131,7 +131,8 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No toReturn.put(dateWithoutTime, nots); } else { toReturn.get(dateWithoutTime).add(notification); - } + } + System.out.println(notification.getDescription()); } } catch (Exception e) { _log.error("While trying to get User notifications"); diff --git a/src/main/webapp/images/savedok.png b/src/main/webapp/images/savedok.png new file mode 100644 index 0000000..a1b225d Binary files /dev/null and b/src/main/webapp/images/savedok.png differ