1. Added code to color the author names in sidebar (in person level vis) depending whether they are ego or not

This commit is contained in:
cdtank 2010-07-13 17:01:10 +00:00
parent ec15ba5a49
commit f091238731
3 changed files with 15 additions and 6 deletions

View file

@ -1,5 +1,3 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
function getWellFormedURLs(given_uri, type) {
// general best practice is to put javascript code inside document.ready
@ -231,6 +229,17 @@ function nodeClickedJS(json){
* Here obj.url points to the uri of that individual
*/
if(obj.url){
if (obj.url == egoURI) {
$("#authorName").addClass('author_name').removeClass('neutral_author_name');
} else {
$("#authorName").addClass('neutral_author_name').removeClass('author_name');
}
$("#profileUrl").attr("href", getWellFormedURLs(obj.url, "profile"));
$("#coAuthorshipVisUrl").attr("href", getWellFormedURLs(obj.url, "coauthorship"));
processProfileInformation("",
@ -239,6 +248,8 @@ function nodeClickedJS(json){
jQuery.parseJSON(getWellFormedURLs(obj.url, "profile_info")),
true);
} else{
$("#profileUrl").attr("href","#");
$("#coAuthorshipVisUrl").attr("href","#");

View file

@ -1,4 +1,3 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ page import="edu.cornell.mannlib.vitro.webapp.visualization.valueobjects.SparklineVOContainer"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>

View file

@ -1,5 +1,3 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:set var="portalBean" value="${requestScope.portalBean}" />
@ -45,6 +43,7 @@ var requiredRevision = 0;
var swfLink = "${swfLink}";
var egoURI = "${requestScope.egoURIParam}";
var egoCoAuthorshipDataFeederURL = "${egoCoAuthorshipDataFeederURL}";
var egoCoAuthorsListDataFileURL = "${egoCoAuthorsListDataFileURL}";
var contextPath = "${contextPath}";