1. Added dynamic reload of data instead of page refresh, for temporal graph vis.

2. Added link-textbox for viz of each parameter form the dropdown box in temporal vis.
3. Made sure that the choices are preserved when another option is selected from the dropdown box.
4. Refactor of some legacy front-end code for temporal vis.
5. Added legend for bars drawn below the graph.
6. Formatted the last cached at date time.
This commit is contained in:
cdtank 2011-03-31 15:37:32 +00:00
parent a47a480552
commit f7452b1bce
15 changed files with 519 additions and 170 deletions

View file

@ -13,10 +13,13 @@
<select class="comparisonValues" style="margin-bottom: 20px;">
<#assign currentViewLink = "no view link">
<#list parameterOptions as parameter>
<#if currentParameter = parameter.name>
<#assign selectedText = "selected='selected'">
<#assign currentViewLink = parameter.viewLink>
<#else>
@ -28,6 +31,9 @@
</select>
<img id="copy-vis-viewlink-icon" title="Link to visualization" class="middle" src="${urls.images}/individual/uriIcon.gif" alt="uri icon" />
<span id="copy-vis-viewlink"><input type="text" size="21" value="${currentViewLink}" /></span>
</div>
</div>
@ -84,5 +90,9 @@
</p>
</div>
<p class="displayCounter">Legend</p>
<span style="background-color: #B7B7B7; width: 25px;" class="known-bar legend-bar">&nbsp;</span> <span id="legend-known-bar-text">Known ${currentParameterObject.name} year</span><br />
<span class="legend-bar unknown-legend-bar"><span style="width: 25px;" class="unknown-inner-bar">&nbsp;</span></span> <span id="legend-unknown-bar-text">Unknown ${currentParameterObject.name} year</span>
</div>
</div>

View file

@ -5,6 +5,12 @@ corresponding changes in the included Templates. -->
<#assign currentParameter = "grant">
<script language="JavaScript" type="text/javascript">
var currentParameter = "${currentParameter}";
</script>
<#include "entityComparisonSetup.ftl">
<#assign temporalGraphDownloadFileLink = '${temporalGraphDownloadCSVCommonURL}&vis=entity_grant_count'>

View file

@ -5,6 +5,12 @@ corresponding changes in the included Templates. -->
<#assign currentParameter = "publication">
<script language="JavaScript" type="text/javascript">
var currentParameter = "${currentParameter}";
</script>
<#include "entityComparisonSetup.ftl">
<#assign temporalGraphDownloadFileLink = '${temporalGraphDownloadCSVCommonURL}&vis=entity_comparison'>

View file

@ -13,20 +13,27 @@
<#assign subOrganizationPublicationTemporalGraphCommonURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_comparison">
<#assign organizationPublicationTemporalGraphURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_comparison&uri=${organizationURI}">
<#assign organizationPublicationTemporalGraphDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=entity_comparison&uri=${organizationURI}&vis_mode=json">
<#assign organizationGrantTemporalGraphURL = "${urls.base}${standardVisualizationURLRoot}?vis=entity_grant_count&uri=${organizationURI}">
<#assign organizationGrantTemporalGraphDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=entity_grant_count&uri=${organizationURI}&vis_mode=json">
<#assign temporalGraphSmallIcon = '${urls.images}/visualization/temporal_vis_small_icon.jpg'>
<#assign temporalGraphDownloadCSVCommonURL = '${urls.base}${dataVisualizationURLRoot}?uri=${organizationURI}&labelField=label'>
<#assign publicationParameter = { "name": "publication",
"pluralName": "publications",
"dropDownText": "by Publications",
"viewLink": "${organizationPublicationTemporalGraphURL}",
"viewLink": "${organizationPublicationTemporalGraphURL}",
"dataLink": "${organizationPublicationTemporalGraphDataURL}",
"value": "Publications" }>
<#assign grantParameter = { "name": "grant",
"pluralName": "grants",
"dropDownText": "by Grants",
"viewLink": "${organizationGrantTemporalGraphURL}",
"dataLink": "${organizationGrantTemporalGraphDataURL}",
"value": "Grants" }>
<#assign parameterOptions = [publicationParameter, grantParameter]>
@ -42,6 +49,15 @@ we will default to using the stable version unless the request comes from IE 9 i
we will use rev 293 (dev build version) of the flot & excanvas files.
-->
<script language="JavaScript" type="text/javascript">
var activitiesLabel = {
singular: 'activity',
plural: 'activities'
};
</script>
${scripts.add('<!--[if IE]><script type="text/javascript" src="${urls.base}/js/visualization/entitycomparison/jquery_plugins/flot/r293/excanvas.min.js"></script><![endif]-->',
'<script type="text/javascript" src="${urls.base}/js/visualization/entitycomparison/jquery_plugins/flot/r293/jquery.flot.min.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/visualization/entitycomparison/jquery_plugins/fliptext/jquery.mb.flipText.js"></script>',
@ -50,6 +66,7 @@ ${scripts.add('<!--[if IE]><script type="text/javascript" src="${urls.base}/js/v
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.dataTables.min.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/visualization/entitycomparison/util.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/visualization/entitycomparison/constants.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/visualization/visualization-helper-functions.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/jquery_plugins/jquery.notify.min.js"></script>')}
<#-- CSS files -->