1. Testing out a way to get image thumbnail url for a profile of a person
2. Fixed a bug: when no moniker is present, in person level vis, moniker related jQuery code threw error.
This commit is contained in:
parent
73ebc88e95
commit
619d797a25
2 changed files with 29 additions and 0 deletions
|
@ -4,6 +4,8 @@ package edu.cornell.mannlib.vitro.webapp.visualization.personlevel;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -23,7 +25,9 @@ import com.hp.hpl.jena.query.DataSource;
|
|||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.Controllers;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationController;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.visualization.VisualizationFrameworkConstants;
|
||||
import edu.cornell.mannlib.vitro.webapp.filestorage.FileServingHelper;
|
||||
import edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.CoAuthorshipGraphMLWriter;
|
||||
import edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.VisVOContainer;
|
||||
import edu.cornell.mannlib.vitro.webapp.visualization.exceptions.MalformedQueryParametersException;
|
||||
|
@ -80,6 +84,21 @@ public class VisualizationRequestHandler {
|
|||
dataSource,
|
||||
log);
|
||||
|
||||
System.out.println("*****************************************");
|
||||
|
||||
String thumbNailLocation;
|
||||
try {
|
||||
thumbNailLocation = URLEncoder.encode("http://vivo-trunk.indiana.edu/individual/n2188",
|
||||
VisualizationController.URL_ENCODING_SCHEME).toString();
|
||||
System.out.println(FileServingHelper.getBytestreamAliasUrl(thumbNailLocation, "thumbnail_flyer-draft.jpg"));
|
||||
} catch (UnsupportedEncodingException e2) {
|
||||
// TODO Auto-generated catch block
|
||||
e2.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
|
||||
edu.cornell.mannlib.vitro.webapp.visualization.coauthorship.VisVOContainer coAuthorshipVO =
|
||||
|
|
|
@ -108,6 +108,11 @@ function setProfileMoniker(monikerContainerID, moniker, doEllipsis) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!moniker) {
|
||||
$("#" + monikerContainerID).empty();
|
||||
return;
|
||||
}
|
||||
|
||||
var finalDisplayMoniker;
|
||||
|
||||
if (moniker.length > 30 && doEllipsis) {
|
||||
|
@ -131,6 +136,11 @@ function setProfileName(nameContainerID, name) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!name) {
|
||||
$("#" + nameContainerID).empty();
|
||||
return;
|
||||
}
|
||||
|
||||
$("#" + nameContainerID).empty().text(name);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue