2010-09-09 21:56:39 +00:00
|
|
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
|
|
|
|
|
|
/* Javascript for sparkline visualization on person profile page */
|
|
|
|
|
|
|
|
var visualization = {
|
2011-01-03 22:47:34 +00:00
|
|
|
renderCoAuthor: function(url) {
|
|
|
|
|
|
|
|
var containerIdCoAuthor = 'vis_container_coauthor',
|
|
|
|
containerCoAuthor = $('#' + containerIdCoAuthor);
|
2010-09-10 14:23:58 +00:00
|
|
|
|
2010-09-09 21:56:39 +00:00
|
|
|
$.ajax({
|
2010-09-10 14:23:58 +00:00
|
|
|
url: url,
|
|
|
|
data: {
|
|
|
|
'render_mode': 'dynamic',
|
|
|
|
'vis': 'person_pub_count',
|
|
|
|
'vis_mode': 'short',
|
2011-01-03 22:47:34 +00:00
|
|
|
'container': containerIdCoAuthor
|
2010-09-10 14:23:58 +00:00
|
|
|
},
|
|
|
|
dataType: 'html',
|
2010-09-09 21:56:39 +00:00
|
|
|
success:function(data){
|
2011-01-04 18:08:21 +00:00
|
|
|
if ($.trim(data) != "") {
|
|
|
|
containerCoAuthor.html(data);
|
|
|
|
containerCoAuthor.children("#pub_count_short_sparkline_vis");
|
|
|
|
}
|
|
|
|
|
2010-09-09 21:56:39 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
2011-01-03 22:47:34 +00:00
|
|
|
visualization.renderCoAuthor(visualizationUrl);
|
2011-01-04 18:08:21 +00:00
|
|
|
});
|