updated loading icon style

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gcube-loggedin@114698 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-05-06 15:38:27 +00:00
parent e546c96fad
commit 6c0ad65bfa
11 changed files with 95 additions and 40 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/gcube-loggedin-2.5.1-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/gcube-loggedin-2.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/gcube-loggedin-2.5.1-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/gcube-loggedin-2.6.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
validateFragments=false
validation.use-project-settings=true

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="${module}"> <wb-module deploy-name="gcube-loggedin-portlet">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="gcube-widgets-1.9.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets"> <dependent-module archiveName="gcube-widgets-1.9.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="session-checker-0.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker"> <dependent-module archiveName="session-checker-0.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker">

View File

@ -4,4 +4,5 @@
<installed facet="jst.web" version="2.3"/> <installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/> <installed facet="java" version="1.7"/>
<installed facet="liferay.portlet" version="6.0"/>
</faceted-project> </faceted-project>

26
pom.xml
View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-loggedin</artifactId> <artifactId>gcube-loggedin</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>2.5.1-SNAPSHOT</version> <version>2.6.0-SNAPSHOT</version>
<name>gCube Loggedin Portlet</name> <name>gCube Loggedin Portlet</name>
<description> <description>
@ -26,7 +26,7 @@
</scm> </scm>
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 --> <!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
@ -38,6 +38,13 @@
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwtVersion}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
@ -51,13 +58,26 @@
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId> <artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId> <artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portal</groupId> <groupId>org.gcube.portal</groupId>
<artifactId>custom-portal-handler</artifactId> <artifactId>custom-portal-handler</artifactId>
@ -141,7 +161,7 @@
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin <!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org --> documentation at codehaus.org -->
<configuration> <configuration>
<runTarget>Messages.html</runTarget> <runTarget>GCubeLoggedin.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp> <hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -1,8 +1,11 @@
package org.gcube.portlets.user.gcubeloggedin.client; package org.gcube.portlets.user.gcubeloggedin.client;
import org.gcube.portlets.user.gcubeloggedin.client.ui.AboutView; import org.gcube.portlets.user.gcubeloggedin.client.ui.AboutView;
import org.gcube.portlets.user.gcubeloggedin.client.ui.LoadingText;
import org.gcube.portlets.user.gcubeloggedin.shared.VObject; import org.gcube.portlets.user.gcubeloggedin.shared.VObject;
import com.github.gwtbootstrap.client.ui.Hero;
import com.github.gwtbootstrap.client.ui.Paragraph;
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Window.Location; import com.google.gwt.user.client.Window.Location;
@ -31,8 +34,6 @@ public class GCubeLoggedin implements EntryPoint {
main_panel.setWidth("100%"); main_panel.setWidth("100%");
endpoint.setServiceEntryPoint(GWT.getModuleBaseURL()+"LoggedinServiceImpl"); endpoint.setServiceEntryPoint(GWT.getModuleBaseURL()+"LoggedinServiceImpl");
main_panel.add(new HTML("<div style=\"height: 450px; text-align:center; vertical-align:text-top;\"><p><br /><br />Loading Environment please wait ...</p><p><br /><br /> " + getLoadingHTML() + "</p></div>" ));
// Associate the new panel with the HTML host page. // Associate the new panel with the HTML host page.
RootPanel.get("LoggedinDiv").add(main_panel); RootPanel.get("LoggedinDiv").add(main_panel);
@ -46,19 +47,7 @@ public class GCubeLoggedin implements EntryPoint {
} }
}); });
} }
/**
*
* @return
*/
private String getLoadingHTML() {
return
"<center><table border='0'>"+
"<tr>"+
"<td>"+
"<img src='" + UIConstants.LOADING_IMAGE + "'>"+
"</td></tr>"+
"</table></center>" ;
}
} }

View File

@ -1,11 +1,11 @@
package org.gcube.portlets.user.gcubeloggedin.client.ui; package org.gcube.portlets.user.gcubeloggedin.client.ui;
import org.gcube.portlets.user.gcubeloggedin.client.LoggedinServiceAsync; import org.gcube.portlets.user.gcubeloggedin.client.LoggedinServiceAsync;
import org.gcube.portlets.user.gcubeloggedin.client.UIConstants;
import org.gcube.portlets.user.gcubeloggedin.shared.VObject; import org.gcube.portlets.user.gcubeloggedin.shared.VObject;
import org.gcube.portlets.user.gcubeloggedin.shared.VREClient; import org.gcube.portlets.user.gcubeloggedin.shared.VREClient;
import org.gcube.portlets.widgets.sessionchecker.client.CheckSession; import org.gcube.portlets.widgets.sessionchecker.client.CheckSession;
import com.github.gwtbootstrap.client.ui.Button;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler;
import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickEvent;
@ -18,15 +18,15 @@ import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.Window.Location; import com.google.gwt.user.client.Window.Location;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Anchor; import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
public class AboutView extends Composite { public class AboutView extends Composite {
private static int MAX_CHAR_DESC = 700;
private static AboutViewUiBinder uiBinder = GWT private static AboutViewUiBinder uiBinder = GWT
.create(AboutViewUiBinder.class); .create(AboutViewUiBinder.class);
@ -37,11 +37,13 @@ public class AboutView extends Composite {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
} }
private WarningAlert wa; private WarningAlert wa;
private String vreDescription;
private String vreImage;
@UiField HTMLPanel htmlPanel; @UiField HTMLPanel htmlPanel;
@UiField HTML description; @UiField HTML description;
@UiField Anchor backButton; @UiField Anchor backButton;
@UiField Anchor leaveButton; @UiField Anchor leaveButton;
@UiField Button seeMore;
private LoggedinServiceAsync loggedinService; private LoggedinServiceAsync loggedinService;
@ -49,9 +51,16 @@ public class AboutView extends Composite {
public AboutView(VObject vobj, LoggedinServiceAsync loggedinService) { public AboutView(VObject vobj, LoggedinServiceAsync loggedinService) {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
this.loggedinService = loggedinService; this.loggedinService = loggedinService;
description.setHTML("<img class=\"imageVRE\" src=\"" + vobj.getImageURL() + "\" />" + vobj.getDescription()); vreImage = vobj.getImageURL();
String desc = vreDescription = vobj.getDescription();
if (desc.length() > MAX_CHAR_DESC) {
desc = desc.substring(0, MAX_CHAR_DESC) + " ...";
seeMore.setVisible(true);
}
description.setHTML("<img class=\"imageVRE\" src=\"" + vreImage + "\" />" + desc);
leaveButton.setStyleName("leave-group"); leaveButton.setStyleName("leave-group");
if (vobj instanceof VREClient && !vobj.isMandatory()) { if (vobj instanceof VREClient && !vobj.isMandatory()) {
wa = new WarningAlert("Are you sure you want to leave this group? " wa = new WarningAlert("Are you sure you want to leave this group? "
@ -68,6 +77,12 @@ public class AboutView extends Composite {
} }
@UiHandler("seeMore")
void onSeeMoreClick(ClickEvent e) {
description.setHTML("<img class=\"imageVRE\" src=\"" + vreImage + "\" />" + vreDescription);
seeMore.removeFromParent();
}
@UiHandler("backButton") @UiHandler("backButton")
void onClick(ClickEvent e) { void onClick(ClickEvent e) {
@ -90,7 +105,7 @@ public class AboutView extends Composite {
protected void abandonGroup() { protected void abandonGroup() {
htmlPanel.remove(wa); htmlPanel.remove(wa);
final HTML loading = getLoadingHTML(); final Widget loading = getLoadingHTML();
htmlPanel.add(loading); htmlPanel.add(loading);
loggedinService.removeUserFromVRE(new AsyncCallback<String>() { loggedinService.removeUserFromVRE(new AsyncCallback<String>() {
@Override @Override
@ -113,14 +128,8 @@ public class AboutView extends Composite {
* *
* @return * @return
*/ */
private HTML getLoadingHTML() { public static Widget getLoadingHTML() {
return new HTML( return new LoadingText();
"<center><table border='0'>"+
"<tr>"+
"<td>"+
"<img src='" + UIConstants.LOADING_IMAGE + "'>"+
"</td></tr>"+
"</table></center>") ;
} }
} }

View File

@ -1,6 +1,6 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"> xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
<g:HTMLPanel ui:field="htmlPanel" styleName="envhome-frame"> <g:HTMLPanel ui:field="htmlPanel" styleName="envhome-frame">
<div id="vre-header-container"> <div id="vre-header-container">
@ -14,5 +14,6 @@
</ul> </ul>
</div> </div>
<g:HTML ui:field="description" styleName="description"></g:HTML> <g:HTML ui:field="description" styleName="description"></g:HTML>
<b:Button ui:field="seeMore" type="LINK" visible="false" >See more</b:Button>
</g:HTMLPanel> </g:HTMLPanel>
</ui:UiBinder> </ui:UiBinder>

View File

@ -0,0 +1,19 @@
package org.gcube.portlets.user.gcubeloggedin.client.ui;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
public class LoadingText extends Composite {
private static LoadingTextUiBinder uiBinder = GWT
.create(LoadingTextUiBinder.class);
interface LoadingTextUiBinder extends UiBinder<Widget, LoadingText> {
}
public LoadingText() {
initWidget(uiBinder.createAndBindUi(this));
}
}

View File

@ -0,0 +1,13 @@
<!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:b="urn:import:com.github.gwtbootstrap.client.ui">
<g:VerticalPanel horizontalAlignment="CENTER" width="100%">
<b:Icon type="GEAR" size="FOUR_TIMES" spin="true" />
<b:Caption>
<b:Heading size="4">Please wait</b:Heading>
<b:Paragraph>
Contacting infrastructure services ...
</b:Paragraph>
</b:Caption>
</g:VerticalPanel>
</ui:UiBinder>

View File

@ -4,11 +4,11 @@
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<!-- <set-property name="user.agent" value="gecko1_8,safari" /> --> <set-property name="user.agent" value="gecko1_8,safari" />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> <inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' /> <inherits name='org.gcube.portlets.widgets.sessionchecker.SessionChecker' />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point <entry-point
class='org.gcube.portlets.user.gcubeloggedin.client.GCubeLoggedin' /> class='org.gcube.portlets.user.gcubeloggedin.client.GCubeLoggedin' />