diff --git a/.classpath b/.classpath
index 171d5e4..804d256 100644
--- a/.classpath
+++ b/.classpath
@@ -30,5 +30,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs
index 85f8b61..cd27182 100644
--- a/.settings/com.google.gdt.eclipse.core.prefs
+++ b/.settings/com.google.gdt.eclipse.core.prefs
@@ -1,5 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
-lastWarOutDir=/Users/massi/Documents/workspace/notifications/target/notifications-1.3.1-SNAPSHOT
+lastWarOutDir=/home/costantino/workspace/notifications/target/notifications-2.0.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false
diff --git a/.settings/com.google.gwt.eclipse.core.prefs b/.settings/com.google.gwt.eclipse.core.prefs
index c803c44..4fd8358 100644
--- a/.settings/com.google.gwt.eclipse.core.prefs
+++ b/.settings/com.google.gwt.eclipse.core.prefs
@@ -1,5 +1,4 @@
-#Thu Jun 16 11:14:17 CEST 2011
eclipse.preferences.version=1
-entryPointModules=
+entryPointModules=org.gcube.portlets.user.notifications.Notifications
filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgc3JjL21haW4vd2ViYXBwXV0+PC9leHRyYS1hcmdzPjx2bS1hcmdzPjwhW0NEQVRBWy1YbXg1MTJtXV0+PC92bS1hcmdzPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLmNvbXBhbnkuU29tZU1vZHVsZTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationsPanel.java b/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationsPanel.java
index 4c4b6e9..72eda12 100644
--- a/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationsPanel.java
+++ b/src/main/java/org/gcube/portlets/user/notifications/client/view/NotificationsPanel.java
@@ -70,8 +70,8 @@ public class NotificationsPanel extends Composite {
public NotificationsPanel() {
notificationSettings.setVisible(false);
mainPanel = new VerticalPanel();
- mainPanel.setWidth("100%");
container.setWidth("100%");
+ mainPanel.setWidth("100%");
settingsPanel.setWidth("100%");
showMoreNotificationsPanel.setWidth("100%");
settingsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
@@ -80,6 +80,7 @@ public class NotificationsPanel extends Composite {
container.add(mainPanel);
loadingImage = new Image(loading);
showLoader();
+ initWidget(container);
notificationService.getUserInfo(new AsyncCallback() {
@@ -94,7 +95,6 @@ public class NotificationsPanel extends Composite {
}
}
});
- initWidget(container);
notificationSettings.addClickHandler(new ClickHandler() {
@Override
@@ -130,22 +130,18 @@ public class NotificationsPanel extends Composite {
// if the url ends with "showsettings=true" open the settings modal automatically
if(Location.getHref().endsWith("showsettings=true")){
-
Timer t = new Timer() {
-
@Override
public void run() {
clickElement(notificationSettings.getElement());
-
}
};
t.schedule(1000);
-
}
}
-
+
/**
- * Simulate click event
+ * Simulate native click event
* @param elem
*/
private static native void clickElement(Element elem) /*-{
@@ -274,12 +270,9 @@ public class NotificationsPanel extends Composite {
private void showLoader() {
mainPanel.clear();
- mainPanel.setWidth("100%");
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
mainPanel.add(loadingImage);
-
-
}
private void showSettingsLoader(boolean show) {
diff --git a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.ui.xml b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.ui.xml
index c81399a..05a6a61 100644
--- a/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.ui.xml
+++ b/src/main/java/org/gcube/portlets/user/notifications/client/view/templates/SingleNotificationView.ui.xml
@@ -1,23 +1,21 @@
+ xmlns:e="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements"
+ xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
-
-
-
-
+
- |
-
+
+
- |
-
-
-
- |
-
-
+
+
+
+
+
+
+
\ No newline at end of file
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 23b76fe..0492cf8 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
@@ -93,7 +93,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
*/
public String getDevelopmentUser() {
String user = "test.user";
-// user = "massimiliano.assante";
+ // user = "massimiliano.assante";
return user;
}
public UserInfo getUserInfo() {
@@ -109,8 +109,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
thumbnailURL = user.getUserAvatarURL();
fullName = user.getFullname();
email = user.getEmail();
- String accountURL = "TODO";//TODO:
- UserInfo toReturn = new UserInfo(username, fullName, thumbnailURL, email, accountURL, true, false, null);
+ UserInfo toReturn = new UserInfo(username, fullName, thumbnailURL, email, null, true, false, null);
return toReturn;
}
else {
@@ -251,7 +250,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
String toReturn = toReplace.replaceAll("&", "&");
return toReturn;
}
-
+
@Override
public boolean setUserNotificationPreferences(Map enabledChannels) {
return store.setUserNotificationPreferences(getASLSession().getUsername(), enabledChannels);
diff --git a/src/main/resources/org/gcube/portlets/user/notifications/Notifications.gwt.xml b/src/main/resources/org/gcube/portlets/user/notifications/Notifications.gwt.xml
index a6ad5fa..3b52678 100644
--- a/src/main/resources/org/gcube/portlets/user/notifications/Notifications.gwt.xml
+++ b/src/main/resources/org/gcube/portlets/user/notifications/Notifications.gwt.xml
@@ -16,6 +16,8 @@
+
+
diff --git a/src/main/webapp/Notifications.css b/src/main/webapp/Notifications.css
index c7f348f..4908ad7 100644
--- a/src/main/webapp/Notifications.css
+++ b/src/main/webapp/Notifications.css
@@ -59,7 +59,7 @@ a.link:hover {
.day-wrapper {
- width: 100%;
+ max-width: 100%;
border-bottom-color: #DADADA;
border-bottom-style: solid;
border-bottom-width: 1px;
@@ -78,7 +78,7 @@ a.link:hover {
}
.single-notification-table {
- width: 920px;
+ max-width: 65%;
padding: 5px;
border-bottom: 1px solid #EFEFEF;
}
@@ -96,13 +96,12 @@ a.link:hover {
}
.notification-photo {
- display: block;
padding: 2px;
border: none;
+ margin-left: 5px;
}
.user-notification-time {
- width: 99%;
color: #999;
font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial,
sans-serif;
@@ -120,7 +119,6 @@ a.link:hover {
padding: 5px;
}
.user-notification {
- width: 99%;
color: #333;
font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial,
sans-serif;