diff --git a/webapp/web/js/visualization/personlevel/person_level.js b/webapp/web/js/visualization/personlevel/person_level.js index 4451397c3..20bab7ce6 100644 --- a/webapp/web/js/visualization/personlevel/person_level.js +++ b/webapp/web/js/visualization/personlevel/person_level.js @@ -104,13 +104,26 @@ function setProfileImage(imageContainerID, rawPath, contextPath) { } -function setProfileMoniker(monikerContainerID, moniker) { +function setProfileMoniker(monikerContainerID, moniker, doEllipsis) { if (monikerContainerID == "") { return; } - $("#" + monikerContainerID).empty().text(moniker); + var finalDisplayMoniker; + + if (moniker.length > 30 && doEllipsis) { + + finalDisplayMoniker = moniker.substr(0,30) + "..."; + + } else { + + finalDisplayMoniker = moniker; + + } + + $("#" + monikerContainerID).empty().text(finalDisplayMoniker); + $("#" + monikerContainerID).attr('title', moniker); } @@ -128,7 +141,8 @@ function setProfileName(nameContainerID, name) { function processProfileInformation(nameContainerID, monikerContainerID, imageContainerID, - profileInfoJSON) { + profileInfoJSON, + doMonikerEllipsis) { var name, imageRawPath, imageContextPath, moniker; @@ -156,7 +170,7 @@ function processProfileInformation(nameContainerID, }); setProfileName(nameContainerID, name); - setProfileMoniker(monikerContainerID, moniker); + setProfileMoniker(monikerContainerID, moniker, doMonikerEllipsis); setProfileImage(imageContainerID, imageRawPath, imageContextPath); } @@ -224,7 +238,8 @@ function nodeClickedJS(json){ processProfileInformation("", "profileMoniker", "profileImage", - jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info"))); + jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")), + true); } else{ $("#profileUrl").attr("href","#"); diff --git a/webapp/web/templates/visualization/person_level.jsp b/webapp/web/templates/visualization/person_level.jsp index 603386d29..deba1bf12 100644 --- a/webapp/web/templates/visualization/person_level.jsp +++ b/webapp/web/templates/visualization/person_level.jsp @@ -261,6 +261,13 @@ $(document).ready(function(){ "ego_profile_image", jQuery.parseJSON(getWellFormedURLs("${requestScope.egoURIParam}", "profile_info"))); + /* + if ($('#profileMoniker').text().length > 30) { + //$('#profileMoniker').text($('#profileMoniker').text().substr(0, 30) + "..."); + console.log("what"); + }*/ + + if ($('#ego_label').text().length > 0) {