Made the portlet responsive
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/notifications@126874 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
aa0b4fdaa2
commit
fd23914193
17
.classpath
17
.classpath
|
@ -30,5 +30,22 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/gwt-user.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="file:/home/costantino/Downloads/gwt-2.7.0/doc/javadoc/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/gwt-codeserver.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="file:/home/costantino/Downloads/gwt-2.7.0/doc/javadoc/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/gwt-dev.jar">
|
||||
<attributes>
|
||||
<attribute name="javadoc_location" value="file:/home/costantino/Downloads/gwt-2.7.0/doc/javadoc/"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA.jar" sourcepath="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/>
|
||||
<classpathentry kind="output" path="target/notifications-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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+
|
||||
|
|
|
@ -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<UserInfo>() {
|
||||
|
||||
|
@ -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) {
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||
xmlns:e="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements">
|
||||
xmlns:e="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements"
|
||||
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||
<g:HTMLPanel ui:field="mainPanel">
|
||||
<table class="single-notification-table">
|
||||
<tr>
|
||||
<td valign="TOP" style="width: 30px;" align="middle">
|
||||
<g:Image styleName="notification-photo" url=""
|
||||
ui:field="notificationImage" width="30" height="30" />
|
||||
<b:Row>
|
||||
|
||||
</td>
|
||||
<td valign="TOP" style="width: 50px;">
|
||||
<b:Column size="2">
|
||||
<b:Image styleName="notification-photo" url=""
|
||||
ui:field="notificationImage" width="30" height="30" />
|
||||
<e:Span styleName="user-notification-time" ui:field="timeArea" />
|
||||
</td>
|
||||
<td valign="TOP">
|
||||
</b:Column>
|
||||
|
||||
<b:Column size="8">
|
||||
<e:Span styleName="user-notification" ui:field="notificationText" />
|
||||
<e:Span styleName="user-notification" ui:field="goApp" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</b:Column>
|
||||
</b:Row>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
|
@ -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 {
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
<entry-point
|
||||
class='org.gcube.portlets.user.notifications.client.Notifications' />
|
||||
|
||||
<set-property name="bootstrap.responsiveDesign" value="true" />
|
||||
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue