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
This commit is contained in:
bkoniden 2011-01-03 22:47:34 +00:00
parent 8dc99312c7
commit c74821f302
34 changed files with 1358 additions and 479 deletions

View file

@ -12,7 +12,7 @@
<#assign sparklineContainerID = visContainerID + "_spark">
</#if>
<div class="staticPageBackground">
<div class="staticPageBackground" style="width: 50%; float: left;">
<div id="${visContainerID}">
<script type="text/javascript">
@ -21,7 +21,7 @@
var data = new google.visualization.DataTable();
data.addColumn('string', 'Year');
data.addColumn('number', 'Grants');
data.addRows(${sparklineVO.numOfYearsToBeRendered});
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
<#list sparklineVO.yearToEntityCountDataTable as yearToGrantCountDataElement>
data.setValue(${yearToGrantCountDataElement.yearToEntityCounter}, 0, '${yearToGrantCountDataElement.year}');
@ -41,8 +41,6 @@
column: 0,
minValue: '${sparklineVO.earliestRenderedGrantYear?c}',
maxValue: '${sparklineVO.latestRenderedGrantYear?c}'
/*minValue: '2001',
maxValue: '2011'*/
}]));
<#else>
@ -52,8 +50,8 @@
<#-- Create the vis object and draw it in the div pertaining to sparkline. -->
var sparkline = new google.visualization.ImageSparkLine(providedSparklineImgTD[0]);
sparkline.draw(sparklineDataView, {
width: 65,
height: 30,
width: 150,
height: 60,
showAxisLines: false,
showValueLabels: false,
labelPosition: 'none'
@ -69,11 +67,9 @@
renderedShortSparks += data.getValue(value, 1);
});
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearGrants}));
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearGrants})).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> grant(s) <br/></span>");
var sparksText = ' grant(s) within the last 10 years <span class="incomplete-data-holder" title="This information'
+ ' is based solely on grants which have been loaded into the VIVO system. This may only be a small'
+ ' sample of the person\'s total work.">incomplete list</span>';
var sparksText = ' within the last 10 years';
<#else>
@ -82,11 +78,12 @@
* any year associated with it. Hence.
* */
var renderedSparks = ${sparklineVO.renderedSparks};
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedSparks) + parseInt(${sparklineVO.unknownYearGrants}));
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedSparks) + parseInt(${sparklineVO.unknownYearGrants})).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> grant(s) <br/></span>");
var sparksText = ' grant(s) from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
+ ' to ${sparklineVO.latestRenderedGrantYear?c}</span> '
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
</#if>
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
@ -128,24 +125,25 @@
var row = $('<tr>');
sparklineImgTD = $('<td>');
sparklineImgTD.attr('id', '${sparklineContainerID}_img');
sparklineImgTD.attr('width', '65');
sparklineImgTD.attr('align', 'right');
sparklineImgTD.attr('width', '150');
sparklineImgTD.attr('class', 'sparkline_style');
row.append(sparklineImgTD);
var row2 = $('<tr>');
var sparklineNumberTD = $('<td>');
sparklineNumberTD.attr('width', '30');
sparklineNumberTD.attr('align', 'right');
sparklineNumberTD.attr('class', 'sparkline_number');
row.append(sparklineNumberTD);
sparklineNumberTD.css('text-align', 'left');
row2.append(sparklineNumberTD);
var row3 = $('<tr>');
var sparklineTextTD = $('<td>');
sparklineTextTD.attr('width', '450');
sparklineTextTD.attr('class', 'sparkline_text');
row.append(sparklineTextTD);
sparklineTextTD.css('text-align', 'left');
row3.append(sparklineTextTD);
table.append(row);
table.append(row2);
table.append(row3);
table.prependTo('#${sparklineContainerID}');
}
drawGrantCountVisualization(sparklineImgTD);
@ -160,39 +158,25 @@
<#--</span>-->
<#else>
<!-- For Full Sparkline - Print the Table of Grant Counts per Year -->
<p>
<table id='sparkline_data_table'>
<caption>
Grants per year <a href="${sparklineVO.downloadDataLink}">(.CSV File)</a>
</caption>
<thead>
<tr>
<th>
Year
</th>
<th>
Grants
</th>
</tr>
</thead>
<tbody>
<#if displayTable?? && displayTable>
<#list sparklineVO.yearToActivityCount?keys as year>
<tr>
<td>
${year}
</td>
<td>
${sparklineVO.yearToActivityCount[year]}
</td>
</tr>
</#list>
</tbody>
</table>
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
<br />
</p>
<p>
<#assign tableID = "sparkline_data_table" />
<#assign tableCaption = "Grants per year " />
<#assign tableActivityColumnName = "Grants" />
<#assign tableContent = sparklineVO.yearToActivityCount />
<#assign fileDownloadLink = sparklineVO.downloadDataLink />
<#include "yearToActivityCountTable.ftl">
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
<br />
</p>
</#if>
</#if>
</div>