fixed bug not displaying images

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/my-vres@132554 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-10-04 10:59:19 +00:00
parent 2dba8b8350
commit 6a1fe04ec7
2 changed files with 6 additions and 6 deletions

View File

@ -39,14 +39,14 @@ public class ClickableVRE extends HTML {
if (vre.getName() == null || vre.getName().compareTo("") == 0) { if (vre.getName() == null || vre.getName().compareTo("") == 0) {
html = "<div class=\"more-vre\"></div>"; html = "<div class=\"more-vre\"></div>";
} else { } else {
imageWidth = WIDTH - 12;
imageUrl = vre.getImageURL();
name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName(); name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName();
html = "<div class=\"vreCaption\">" +name + "</div>"; html = "<div class=\"vreCaption\">" +name + "</div>";
html += "<div style=\"display: table; text-align:center; width: 100%; height: 75px;\">" + 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>" + "<span style=\"vertical-align:middle; display: table-cell;\"><img style=\"width: " + imageWidth + "px;\" src=\"" +imageUrl + "\" /></span>" +
"</div>"; "</div>";
} }
imageWidth = WIDTH - 12;
imageUrl = vre.getImageURL();
this.setTitle("Enter"); this.setTitle("Enter");
setHTML(html); setHTML(html);

View File

@ -180,7 +180,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
cool_EM_VRE.setGroupName("/d4science.research-infrastructures.eu/EM/COOLEMVRE"); cool_EM_VRE.setGroupName("/d4science.research-infrastructures.eu/EM/COOLEMVRE");
cool_EM_VRE.setDescription("cool_EM_VRE VRE Description<br />"+ cool_EM_VRE.setDescription("cool_EM_VRE VRE Description<br />"+
"This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data."); "This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data.");
cool_EM_VRE.setImageURL("http://portal.d4science.research-infrastructures.eu/vologin/html/gcm-preview.jpg"); cool_EM_VRE.setImageURL("https://placehold.it/150x150");
cool_EM_VRE.setUserBelonging(UserBelonging.BELONGING); cool_EM_VRE.setUserBelonging(UserBelonging.BELONGING);
@ -190,7 +190,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
cool_EM_VRE2.setDescription("Cool VRE Description<br />"+ cool_EM_VRE2.setDescription("Cool VRE Description<br />"+
"This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data."); "This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data.");
cool_EM_VRE2.setImageURL("https://newportal.i-marine.d4science.org/image/organization_logo?img_id=13302&t1339191699773"); cool_EM_VRE2.setImageURL("https://placehold.it/150x150");
cool_EM_VRE2.setUserBelonging(UserBelonging.NOT_BELONGING); cool_EM_VRE2.setUserBelonging(UserBelonging.NOT_BELONGING);
VRE cool_EM_VRE3 = new VRE(); VRE cool_EM_VRE3 = new VRE();
@ -199,7 +199,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
cool_EM_VRE3.setDescription("Cool VRE Description<br />"+ cool_EM_VRE3.setDescription("Cool VRE Description<br />"+
"This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data."); "This Virtual Research Environment is for cool authors, managers and researchers who produce reports containing cool data.");
cool_EM_VRE3.setImageURL("https://newportal.i-marine.d4science.org/image/organization_logo?img_id=13302&t1339191699773"); cool_EM_VRE3.setImageURL("https://placehold.it/150x150");
cool_EM_VRE3.setUserBelonging(UserBelonging.BELONGING); cool_EM_VRE3.setUserBelonging(UserBelonging.BELONGING);
ArrayList<VRE> toAdd = new ArrayList<VRE>(); ArrayList<VRE> toAdd = new ArrayList<VRE>();
@ -225,7 +225,7 @@ public class MyVREsServiceImpl extends RemoteServiceServlet implements MyVREsSer
vreGCM.setGroupName("/d4science.research-infrastructures.eu/EM/GCM"); vreGCM.setGroupName("/d4science.research-infrastructures.eu/EM/GCM");
vreGCM.setDescription("Global Ocean Chlorophyll Monitoring (GCM) Virtual Research Environment<br />" vreGCM.setDescription("Global Ocean Chlorophyll Monitoring (GCM) Virtual Research Environment<br />"
+ "The phytoplankton plays a similar role to terrestrial green plants in the photosynthetic process and are credited with removing as much carbon dioxide from the atmosphere as their earthbound counterparts, making it important to monitor and model plankton into calculations of future climate change."); + "The phytoplankton plays a similar role to terrestrial green plants in the photosynthetic process and are credited with removing as much carbon dioxide from the atmosphere as their earthbound counterparts, making it important to monitor and model plankton into calculations of future climate change.");
vreGCM.setImageURL("https://newportal.i-marine.d4science.org/image/organization_logo?img_id=13302&t1339191699773"); vreGCM.setImageURL("https://placehold.it/150x150");
vreGCM.setUserBelonging(UserBelonging.BELONGING); vreGCM.setUserBelonging(UserBelonging.BELONGING);
ArrayList<VRE> toAdd2 = new ArrayList<VRE>(); ArrayList<VRE> toAdd2 = new ArrayList<VRE>();