added limit to 9 images show and mousehover to show logo onhover

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/my-vres@139792 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-12-07 15:53:58 +00:00
parent f5b0a01ac0
commit 2e7e33d4be
1 changed files with 8 additions and 6 deletions

View File

@ -76,17 +76,19 @@ public class ClickableVRE extends HTML {
addMouseOverHandler(new MouseOverHandler() { addMouseOverHandler(new MouseOverHandler() {
@Override @Override
public void onMouseOver(MouseOverEvent event) { public void onMouseOver(MouseOverEvent event) {
imageWidth = WIDTH - 12;
name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName();
imageUrl = vre.getImageURL();
html = "<div class=\"vreCaption\">" +name + "</div>";
if (!showImage) { if (!showImage) {
int imageWidth = WIDTH - 12;
String name = (vre.getName().length() > 15) ? vre.getName().substring(0, 13) + ".." : vre.getName();
String imageUrl = vre.getImageURL();
String 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>";
}
setHTML(html); setHTML(html);
} }
}
}); });
} }