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:
parent
f5b0a01ac0
commit
2e7e33d4be
|
@ -72,20 +72,22 @@ public class ClickableVRE extends HTML {
|
|||
timer.schedule(50);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
addMouseOverHandler(new MouseOverHandler() {
|
||||
@Override
|
||||
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) {
|
||||
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;\">" +
|
||||
"<span style=\"vertical-align:middle; display: table-cell;\"><img style=\"width: " + imageWidth + "px;\" src=\"" +imageUrl + "\" /></span>" +
|
||||
"</div>";
|
||||
setHTML(html);
|
||||
}
|
||||
setHTML(html);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue