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
master
Massimiliano Assante 9 years ago
parent e546c96fad
commit 6c0ad65bfa

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</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>

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

@ -1,9 +1,9 @@
<?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="/src/main/webapp" tag="defaultRootSource"/>
<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>
</dependent-module>
<dependent-module archiveName="session-checker-0.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker">

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

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

@ -1,8 +1,11 @@
package org.gcube.portlets.user.gcubeloggedin.client;
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 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.GWT;
import com.google.gwt.user.client.Window.Location;
@ -31,8 +34,6 @@ public class GCubeLoggedin implements EntryPoint {
main_panel.setWidth("100%");
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.
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>" ;
}
}

@ -1,11 +1,11 @@
package org.gcube.portlets.user.gcubeloggedin.client.ui;
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.VREClient;
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.Scheduler;
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.rpc.AsyncCallback;
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.HTML;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
public class AboutView extends Composite {
private static int MAX_CHAR_DESC = 700;
private static AboutViewUiBinder uiBinder = GWT
.create(AboutViewUiBinder.class);
@ -37,11 +37,13 @@ public class AboutView extends Composite {
initWidget(uiBinder.createAndBindUi(this));
}
private WarningAlert wa;
private String vreDescription;
private String vreImage;
@UiField HTMLPanel htmlPanel;
@UiField HTML description;
@UiField Anchor backButton;
@UiField Anchor leaveButton;
@UiField Button seeMore;
private LoggedinServiceAsync loggedinService;
@ -49,9 +51,16 @@ public class AboutView extends Composite {
public AboutView(VObject vobj, LoggedinServiceAsync loggedinService) {
initWidget(uiBinder.createAndBindUi(this));
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");
if (vobj instanceof VREClient && !vobj.isMandatory()) {
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")
void onClick(ClickEvent e) {
@ -90,7 +105,7 @@ public class AboutView extends Composite {
protected void abandonGroup() {
htmlPanel.remove(wa);
final HTML loading = getLoadingHTML();
final Widget loading = getLoadingHTML();
htmlPanel.add(loading);
loggedinService.removeUserFromVRE(new AsyncCallback<String>() {
@Override
@ -113,14 +128,8 @@ public class AboutView extends Composite {
*
* @return
*/
private HTML getLoadingHTML() {
return new HTML(
"<center><table border='0'>"+
"<tr>"+
"<td>"+
"<img src='" + UIConstants.LOADING_IMAGE + "'>"+
"</td></tr>"+
"</table></center>") ;
public static Widget getLoadingHTML() {
return new LoadingText();
}
}

@ -1,6 +1,6 @@
<!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: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">
<div id="vre-header-container">
@ -14,5 +14,6 @@
</ul>
</div>
<g:HTML ui:field="description" styleName="description"></g:HTML>
<b:Button ui:field="seeMore" type="LINK" visible="false" >See more</b:Button>
</g:HTMLPanel>
</ui:UiBinder>

@ -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));
}
}

@ -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>

@ -4,11 +4,11 @@
<!-- Inherit the core Web Toolkit stuff. -->
<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.widgets.sessionchecker.SessionChecker' />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- Specify the app entry point class. -->
<entry-point
class='org.gcube.portlets.user.gcubeloggedin.client.GCubeLoggedin' />

Loading…
Cancel
Save