
2. Modified FreeMarkerized (FM) sparklines on the profile page to actually make calls to freemarker version of person publication count sparkline. (TODO: currently the code to replace "/visualization" with "/visualizationfm" is hard coded. Thsi will be resolved once change is made in IndividualController to call FM personPubCount controller.) 3. Added new templates for FM version of visualizations. 4. Added a new bean which recognized FM versions of visualizations. 5. Created FM branch of the visualization architecture & Person publication count visualization. 6. For Person pub count abstracted out the html/javascript code creator to be on the front end itself. (TODO: refactor SparklineData VO to remove attributes that save the html/js code.)
31 lines
834 B
JavaScript
31 lines
834 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 = {
|
|
render: function(url) {
|
|
var containerId = 'vis_container',
|
|
container = $('#' + containerId);
|
|
|
|
//container.empty().html('<img src="${loadingImageLink}" />');
|
|
|
|
$.ajax({
|
|
url: url,
|
|
data: {
|
|
'render_mode': 'dynamic',
|
|
'vis': 'person_pub_count',
|
|
'vis_mode': 'short',
|
|
'container': containerId
|
|
},
|
|
dataType: 'html',
|
|
success:function(data){
|
|
container.html(data);
|
|
}
|
|
});
|
|
}
|
|
};
|
|
|
|
$(document).ready(function() {
|
|
visualizationUrl = visualizationUrl.replace("/visualization", "/visualizationfm");
|
|
visualization.render(visualizationUrl);
|
|
});
|