1. Added code related to Visualization Framework.
2. Added code related to Person Publication count visualization. 3. Added code related to College Publication count visualization. 4. Added code related to PDF Report visualization.
This commit is contained in:
parent
d4fe92441c
commit
25e534e23f
30 changed files with 3697 additions and 1 deletions
97
webapp/web/templates/visualization/ajax_vis_content.jsp
Normal file
97
webapp/web/templates/visualization/ajax_vis_content.jsp
Normal file
|
@ -0,0 +1,97 @@
|
|||
<%--
|
||||
|
||||
<p>
|
||||
Number of Publications with NO parseable "Publication Year" => 6
|
||||
<br />
|
||||
{2004=2, 2005=2, 2006=8, DNA=6}
|
||||
</p>
|
||||
|
||||
<style type="text/css">
|
||||
.sparkline_style table{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
vertical-align: inherit;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function drawVisualization() {
|
||||
var data = new google.visualization.DataTable();
|
||||
data.addColumn('string', 'Year');
|
||||
data.addColumn('number', 'Publications');
|
||||
data.addRows(7);
|
||||
data.setValue(0, 0, '2004');
|
||||
data.setValue(0, 1, 2);
|
||||
data.setValue(1, 0, '2005');
|
||||
data.setValue(1, 1, 2);
|
||||
data.setValue(2, 0, '2006');
|
||||
data.setValue(2, 1, 8);
|
||||
data.setValue(3, 0, '2007');
|
||||
data.setValue(3, 1, 0);
|
||||
data.setValue(4, 0, '2008');
|
||||
data.setValue(4, 1, 0);
|
||||
data.setValue(5, 0, '2009');
|
||||
data.setValue(5, 1, 0);
|
||||
data.setValue(6, 0, '2010');
|
||||
data.setValue(6, 1, 0);
|
||||
var fullSparklineView = new google.visualization.DataView(data);
|
||||
var shortSparklineView = new google.visualization.DataView(data);
|
||||
shortSparklineView.setColumns([1]);
|
||||
fullSparklineView.setColumns([1]);
|
||||
shortSparklineView.setRows(data.getFilteredRows([{
|
||||
column: 0,
|
||||
minValue: '2001',
|
||||
maxValue: '2010'}]));
|
||||
var full_spark = new google.visualization.ImageSparkLine(document.getElementById('pub_count_full_sparkline_viz'));
|
||||
full_spark.draw(fullSparklineView, {
|
||||
width: 63,
|
||||
height: 21,
|
||||
showAxisLines: false,
|
||||
showValueLabels: false,
|
||||
labelPosition: 'none'
|
||||
});
|
||||
var short_spark = new google.visualization.ImageSparkLine(document.getElementById('pub_count_short_sparkline_viz'));
|
||||
short_spark.draw(shortSparklineView, {
|
||||
width: 63,
|
||||
height: 21,
|
||||
showAxisLines: false,
|
||||
showValueLabels: false,
|
||||
labelPosition: 'none'
|
||||
});
|
||||
var shortSparkRows = shortSparklineView.getViewRows();
|
||||
var renderedShortSparks = 0;
|
||||
$.each(shortSparkRows, function(index, value) {
|
||||
renderedShortSparks += data.getValue(value, 1);
|
||||
});
|
||||
var shortSparksText = '<p>' + renderedShortSparks + ' Papers with year from ' + ' 18 ' + ' total' + '</p>';
|
||||
$(shortSparksText).prependTo('#pub_count_short_sparkline_viz');
|
||||
var allSparksText = '<p><b>Full Timeline</b> ' + 12 + ' Papers with year from ' + ' 18 ' + ' total' + '</p>';
|
||||
$(allSparksText).prependTo('#pub_count_full_sparkline_viz');
|
||||
}
|
||||
$(document).ready(function() {
|
||||
if ($('#pub_count_short_sparkline_viz').length == 0) {
|
||||
$('<div/>', {
|
||||
'id': 'pub_count_short_sparkline_viz',
|
||||
'class': 'sparkline_style'
|
||||
|
||||
}).appendTo('#ajax_recipient');
|
||||
}
|
||||
if ($('#pub_count_full_sparkline_viz').length == 0) {
|
||||
$('<div/>', {
|
||||
'id': 'pub_count_full_sparkline_viz',
|
||||
'class': 'sparkline_style'
|
||||
}).appendTo('#ajax_recipient');
|
||||
}
|
||||
drawVisualization();
|
||||
});
|
||||
</script>
|
||||
|
||||
--%>
|
||||
|
||||
${requestScope.visContentCode}
|
||||
|
||||
${requestScope.visContextCode}
|
227
webapp/web/templates/visualization/dummy_vis_client.jsp
Normal file
227
webapp/web/templates/visualization/dummy_vis_client.jsp
Normal file
|
@ -0,0 +1,227 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
<c:set var="portal" value="${requestScope.portalBean}"/>
|
||||
<c:set var="themeDir"><c:out value="${portal.themeDir}" /></c:set>
|
||||
|
||||
<c:url var="staticHref" value="/admin/visQuery">
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="render_mode" value="standalone"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
|
||||
</c:url>
|
||||
|
||||
<c:url var="staticHref2" value="/admin/visQuery">
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="vis_mode" value="short"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
|
||||
</c:url>
|
||||
|
||||
<c:url var="staticHref_d" value="/admin/visQuery">
|
||||
<c:param name="render_mode" value="dynamic"/>
|
||||
<c:param name="container" value="ajax_recipient"/>
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="vis_mode" value="short"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5156"/>
|
||||
</c:url>
|
||||
|
||||
<c:url var="staticHref2_d" value="/admin/visQuery">
|
||||
<c:param name="render_mode" value="dynamic"/>
|
||||
<c:param name="container" value="ajax_recipient"/>
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="vis_mode" value="full"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5611"/>
|
||||
</c:url>
|
||||
|
||||
|
||||
<c:url var="staticHref3" value="/admin/visQuery">
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="vis_mode" value="short"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5748"/>
|
||||
</c:url>
|
||||
|
||||
|
||||
<c:url var="staticHref3_d" value="/admin/visQuery">
|
||||
<c:param name="render_mode" value="dynamic"/>
|
||||
<c:param name="vis" value="person_pub_count"/>
|
||||
<c:param name="container" value="ajax_recipient"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual22919"/>
|
||||
</c:url>
|
||||
|
||||
|
||||
|
||||
<c:url var="collegeCSV" value="/admin/visQuery">
|
||||
<c:param name="vis" value="college_pub_count"/>
|
||||
<c:param name="render_mode" value="data"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual5249"/>
|
||||
</c:url>
|
||||
|
||||
<c:url var="collegeCSV2" value="/admin/visQuery">
|
||||
<c:param name="vis" value="college_pub_count"/>
|
||||
<c:param name="render_mode" value="data"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual134"/>
|
||||
</c:url>
|
||||
|
||||
|
||||
<c:url var="collegeCSV3" value="/admin/visQuery">
|
||||
<c:param name="vis" value="college_pub_count"/>
|
||||
<c:param name="render_mode" value="data"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual249"/>
|
||||
</c:url>
|
||||
|
||||
|
||||
<c:url var="collegeCSV4" value="/admin/visQuery">
|
||||
<c:param name="vis" value="college_pub_count"/>
|
||||
<c:param name="render_mode" value="data"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual250"/>
|
||||
</c:url>
|
||||
|
||||
<c:url var="collegeCSV5" value="/admin/visQuery">
|
||||
<c:param name="vis" value="college_pub_count"/>
|
||||
<c:param name="render_mode" value="data"/>
|
||||
<c:param name="vis_mode" value="wth"/>
|
||||
<c:param name="uri" value="http://vivo.library.cornell.edu/ns/0.1#individual192"/>
|
||||
</c:url>
|
||||
|
||||
<style type="text/css">
|
||||
.get_vis {
|
||||
background-color:Yellow;
|
||||
color:blue;
|
||||
cursor:pointer;
|
||||
height:36px;
|
||||
width:225px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
function renderVisualization(visualizationURL) {
|
||||
|
||||
$("#ajax_recipient").empty().html('<img src="/vivo/${themeDir}utility/ajax-loader.gif" />');
|
||||
|
||||
$.ajax({
|
||||
url: visualizationURL,
|
||||
dataType: "html",
|
||||
success:function(data){
|
||||
$("#ajax_recipient").html(data);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$("#ajax_activator").click(function() {
|
||||
$.ajax({
|
||||
url: '${staticHref3_d}',
|
||||
dataType: "html",
|
||||
success:function(data){
|
||||
|
||||
|
||||
$("#ajax_recipient").text(data);
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#ajax_activator_1").click(function() {
|
||||
|
||||
renderVisualization('${staticHref_d}');
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#ajax_activator_2").click(function() {
|
||||
|
||||
renderVisualization('${staticHref2_d}');
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#ajax_activator_3").click(function() {
|
||||
|
||||
renderVisualization('${staticHref3_d}');
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<div class="staticPageBackground">
|
||||
|
||||
<a href='<c:out value="${collegeCSV}"/>'>vis data query for college -> "School of Industrial and Labor Relations (ILR)"</a><br />
|
||||
<a href='<c:out value="${collegeCSV2}"/>'>vis data query for college -> "College of Agriculture and Life Sciences (CALS)"</a><br />
|
||||
<a href='<c:out value="${collegeCSV3}"/>'>vis data query for college -> "College of Arts and Sciences"</a><br />
|
||||
<a href='<c:out value="${collegeCSV4}"/>'>vis data query for college -> "College of Engineering"</a><br />
|
||||
<a href='<c:out value="${collegeCSV5}"/>'>vis data query for college -> "Joan and Sanford I. Weill Medical College"</a><br />
|
||||
|
||||
<a href='<c:out value="${staticHref}"/>'>vis query for person -> "Crane, Brian"</a>
|
||||
|
||||
|
||||
<div id="ajax_activator_1" class="get_vis">
|
||||
Click to render this Person's vis via AJAX.
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<a href='<c:out value="${staticHref2}"/>'>vis query for person -> "Merwin, Ian A"</a>
|
||||
|
||||
<div id="ajax_activator_2" class="get_vis">
|
||||
Click to render this Person's vis via AJAX.
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<a href='<c:out value="${staticHref3}"/>'>vis query for person -> "Erb, Hollis Nancy"</a>
|
||||
|
||||
<div id="ajax_activator_3" class="get_vis">
|
||||
Click to render this Person's vis via AJAX.
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<div id="ajax_activator" class="get_vis">
|
||||
AJAX Content in Text (only for research)
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
<div id="ajax_recipient">
|
||||
vis Content via AJAX here
|
||||
|
||||
<!--
|
||||
|
||||
<div id="pub_count_areachart_vis">AREA CHART</div>
|
||||
|
||||
<div id="pub_count_sparkline_vis">pub sparkline chart</div>
|
||||
|
||||
|
||||
-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
14
webapp/web/templates/visualization/publication_count.jsp
Normal file
14
webapp/web/templates/visualization/publication_count.jsp
Normal file
|
@ -0,0 +1,14 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
|
||||
|
||||
<div class="staticPageBackground">
|
||||
|
||||
|
||||
<div id="vis_container">
|
||||
${requestScope.visContentCode}
|
||||
</div>
|
||||
${requestScope.visContextCode}
|
||||
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
|
||||
<div class="staticPageBackground">
|
||||
|
||||
${requestScope.error}
|
||||
|
||||
</div>
|
||||
|
24
webapp/web/templates/visualization/visualization_scripts.jsp
Normal file
24
webapp/web/templates/visualization/visualization_scripts.jsp
Normal file
|
@ -0,0 +1,24 @@
|
|||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
||||
|
||||
<% /***********************************************
|
||||
This file is used to inject <link> and <script> elements
|
||||
into the head element of the generated source of a VITRO
|
||||
page that is being displayed by the entity controller.
|
||||
|
||||
In other words, anything like domain.com/entity?...
|
||||
will have the lines specified here added in the <head>
|
||||
of the page.
|
||||
|
||||
This is a great way to specify JavaScript or CSS files
|
||||
at the entity display level as opposed to globally.
|
||||
|
||||
Example:
|
||||
<link rel="stylesheet" type="text/css" href="/css/entity.css"/>" media="screen"/>
|
||||
<script type="text/javascript" src="/js/jquery.js"></script>
|
||||
****************************************************/ %>
|
||||
|
||||
<c:url var="jquery" value="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/>
|
||||
<c:url var="googleVisualizationAPI" value="http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22areachart%22%2C%22imagesparkline%22%5D%7D%5D%7D"/>
|
||||
|
||||
<script type="text/javascript" src="${jquery}"></script>
|
||||
<script type="text/javascript" src="${googleVisualizationAPI}"></script>
|
Loading…
Add table
Add a link
Reference in a new issue