made tiles smaller of 1/3

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/my-vres@101034 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-10-27 14:53:35 +00:00
parent c5de6a6549
commit 8260b28982
8 changed files with 37 additions and 23 deletions

View File

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

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/Users/massi/Documents/workspace/my-vres/target/my-vres-1.3.0-SNAPSHOT
lastWarOutDir=/Users/massi/Documents/workspace/my-vres/target/my-vres-1.4.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -4,9 +4,6 @@
<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="/target/generated-sources/gwt"/>
<dependent-module archiveName="guided-tour-widget-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/guided-tour-widget/guided-tour-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="my-vres"/>
</wb-module>

View File

@ -1,7 +1,11 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlet.user.my-vres.1-3-0"
<Changeset component="org.gcube.portlet.user.my-vres.1-4-0"
date="2014-10-27">
<Change>Made tiles smaller of one third</Change>
</Changeset>
<Changeset component="org.gcube.portlet.user.my-vres.1-3-0"
date="2014-06-08">
<Change>Adapted to gCire Free Portal</Change>
<Change>Adapted to gCore Free Portal</Change>
</Changeset>
<Changeset component="org.gcube.portlet.user.my-vres.1-2-0"
date="2014-04-08">

View File

@ -10,10 +10,10 @@
<relativePath />
</parent>
<groupId>org.gcube.portlet.user</groupId>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>my-vres</artifactId>
<packaging>war</packaging>
<version>1.3.0-SNAPSHOT</version>
<version>1.4.0-SNAPSHOT</version>
<name>My VREs Portlet</name>
<description>
gCube My VREs Portlet shows only the VO and VREs a user is member of.

View File

@ -19,8 +19,8 @@ import com.google.gwt.user.client.ui.Image;
*/
public class ClickableVRE extends HTML {
private final static int WIDTH = 115;
private final static int HEIGHT = 120;
private final static int WIDTH = 85;
private final static int HEIGHT = 95;
private String name;
private String imageUrl;
@ -36,12 +36,12 @@ public class ClickableVRE extends HTML {
public ClickableVRE(final VRE vre, final MyVREsServiceAsync service) {
super.setPixelSize(WIDTH, HEIGHT);
setPixelSize(WIDTH, HEIGHT);
imageWidth = WIDTH - 20;
name = (vre.getName().length() > 23) ? vre.getName().substring(0, 23) : vre.getName();
imageWidth = WIDTH - 12;
name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName();
imageUrl = vre.getImageURL();
this.setTitle("Enter");
String html = "<div class=\"vreCaption\">" + name + "</div>";
html += "<div style=\"display: table; text-align:center; width: 100%; height: 95px;\">" +
html += "<div style=\"display: table; text-align:center; width: 100%; height: 75px;\">" +
"<span style=\"vertical-align:middle; display: table-cell;\"><img style=\"width: " + imageWidth + "px;\" src=\"" +imageUrl + "\" /></span>" +
"</div>";
setHTML(html);

View File

@ -29,6 +29,7 @@ import com.liferay.portal.model.Group;
import com.liferay.portal.model.Organization;
import com.liferay.portal.model.User;
import com.liferay.portal.service.OrganizationLocalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.theme.ThemeDisplay;
/**
@ -51,7 +52,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
private VO rootVO = new VO();
private boolean withinPortal = false;
/**
* the current ASLSession
@ -66,18 +67,30 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
}
else {
_log.info("LIFERAY PORTAL DETECTED user=" + user);
withinPortal = true;
}
return SessionManager.getInstance().getASLSession(sessionID, user);
}
/**
*
* @return true if you're running into the portal, false if in development
*/
private boolean isWithinPortal() {
try {
UserLocalServiceUtil.getService();
return true;
}
catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
_log.trace("Development Mode ON");
return false;
}
}
/**
* first method called by the UI
*/
public ArrayList<VO> getInfrastructureVOs() {
getASLSession();
//_log.trace("getInfrastructureVOs method called");
if (!withinPortal)
if (!isWithinPortal())
return getFakeVOs();
//return new ArrayList<VO>();
else

View File

@ -3,16 +3,16 @@
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
<portlet-name>MyVREs</portlet-name>
<display-name>gCube MyVREs Login Portlet</display-name>
<display-name>Your Virtual Research Environments</display-name>
<portlet-class>org.gcube.portlet.user.my_vres.server.portlet.MyVREsPortlet</portlet-class>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<portlet-info>
<title>My Virtual Research Environments</title>
<short-title>gCube MyVREs Login</short-title>
<keywords>gCube MyVREs Login</keywords>
<title>Your Virtual Research Environments</title>
<short-title>VREs Login</short-title>
<keywords>VRE</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>