vivo/productMods/js/visualization/sparkline.js
cdtank 5cacc57292 1. Made changes so that on individual pages the div containers for network links & sparkline image/text is only generated if there is content to be shown. This as opposed to always creating it first, hiding it & then shoing the container if there was any content.
2. Made sure that network link DIVs are separated by border & padding only if there is need. Now if a person only has grants, on it's profile page there is no longer border & padding on top of the co-investiogator link.
2011-01-31 17:40:06 +00:00

33 lines
No EOL
861 B
JavaScript

/* $This file is distributed under the terms of the license in /doc/license.txt$ */
/* Javascript for sparkline visualization on person profile page */
var visualization = {
renderCoAuthor: function(url) {
var containerIdCoAuthor = 'vis_container_coauthor',
containerCoAuthor = $('#' + containerIdCoAuthor);
$.ajax({
url: url,
data: {
'render_mode': 'dynamic',
'vis': 'person_pub_count',
'vis_mode': 'short',
'container': containerIdCoAuthor
},
dataType: 'html',
success:function(data){
if ($.trim(data) != "") {
containerCoAuthor.html(data);
containerCoAuthor.children("#pub_count_short_sparkline_vis");
}
}
});
}
};
$(document).ready(function() {
visualization.renderCoAuthor(visualizationUrl);
});