vivo/productMods/js/visualization/sparkline.js
bkoniden c74821f302 A bunch of changes like
1) Freemarker versions of Co-PI visualizations. CoInvestigator.ftl, CoPIPersonLevel.ftl, person_level_fm-copi.js.
2) Styling changes to Temporal graph.
3) Adding co_author, co_pi and temporal graph icons.
4) ftls related to sparklines. (CoAuthorship and CoPI)
5) Styling changes to CoAuthor/CoPI visualizations -- page.css, coauthor_style.css, coinvestigator_style.css
2011-01-03 22:47:34 +00:00

36 lines
1 KiB
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);
//container.empty().html('<img src="${loadingImageLink}" />');
$.ajax({
url: url,
data: {
'render_mode': 'dynamic',
'vis': 'person_pub_count',
'vis_mode': 'short',
'container': containerIdCoAuthor
},
dataType: 'html',
success:function(data){
containerCoAuthor.html(data);
containerCoAuthor.children("#pub_count_short_sparkline_vis").append(coAuthorIcon);
/* containerCoAuthor.find("<img>").css("float", "left"); */
}
});
}
};
$(document).ready(function() {
visualizationUrl = visualizationUrl.replace("/visualization", "/visualizationAjax");
visualization.renderCoAuthor(visualizationUrl);
});