1. Fixed the issue when the author's name was really really long, flash vis used to create a scrollbar just for the legend. We made use of ellipsis in case of really long names.

2. The same for the sidebar author names.
3. Removed unused code.
This commit is contained in:
cdtank 2010-07-21 21:04:55 +00:00
parent ea062edde2
commit 50dd3ba19f
3 changed files with 22 additions and 19 deletions

View file

@ -136,8 +136,8 @@ function setProfileMoniker(monikerContainerID, moniker, doEllipsis) {
}
function setProfileName(nameContainerID, name) {
function setProfileName(nameContainerID, name, doNameEllipsis) {
if (nameContainerID == "") {
return;
}
@ -147,8 +147,20 @@ function setProfileName(nameContainerID, name) {
return;
}
$("#" + nameContainerID).empty().text(name);
var finalDisplayName;
if (name.length > 30 && doNameEllipsis) {
finalDisplayName = name.substr(0,30) + "...";
} else {
finalDisplayName = name;
}
$("#" + nameContainerID).empty().text(finalDisplayName);
$("#" + nameContainerID).attr('title', name);
}
@ -156,8 +168,8 @@ function processProfileInformation(nameContainerID,
monikerContainerID,
imageContainerID,
profileInfoJSON,
doMonikerEllipsis) {
doMonikerEllipsis,
doNameEllipsis) {
var name, mainImageURL, imageContextPath, moniker;
@ -183,7 +195,7 @@ function processProfileInformation(nameContainerID,
});
setProfileName(nameContainerID, name);
setProfileName(nameContainerID, name, doNameEllipsis);
setProfileMoniker(monikerContainerID, moniker, doMonikerEllipsis);
setProfileImage(imageContainerID, mainImageURL, imageContextPath);
@ -240,7 +252,6 @@ function nodeClickedJS(json){
var obj = jQuery.parseJSON(json);
$("#dataPanel").attr("style","visibility:visible");
$("#authorName").empty().append(obj.name);
$("#works").empty().append(obj.number_of_authored_works);
/*
@ -264,10 +275,11 @@ function nodeClickedJS(json){
$("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
$("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, "coauthorship"));
processProfileInformation("",
processProfileInformation("authorName",
"profileMoniker",
"profileImage",
jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")),
true,
true);
@ -277,8 +289,6 @@ function nodeClickedJS(json){
$("#coAuthorshipVisUrl").attr("href","#");
}
$("#coAuthorName").empty().append(obj.name);
$("#coAuthors").empty().append(obj.num_coauthors);
$("#firstPublication").empty().append(obj.earliest_publication);
@ -329,7 +339,7 @@ function renderCoAuthorshipVisualization() {
"src", swfLink,
"flashVars", "graphmlUrl=" + egoCoAuthorshipDataFeederURL,
"width", "600",
"height", "790",
"height", "805",
"align", "top",
"id", "CoAuthor",
"quality", "high",