1. Partial fix for NIHVIVO-2130. Now the downloadable csv file properly prints out all the authors, with same name. The right hand side bar still prints wrong values in case of authors with duplicate names.
2. Solution for 2 stage loading for temporal graph where now when the intial call is made to it, it returns with the markup & js lib includes & then makes an ajax call to get the data file in json format which is the used to render the linegraph & the table.
This commit is contained in:
parent
f1bcbd69ca
commit
ad3497d0bc
17 changed files with 1277 additions and 562 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div id="body">
|
||||
|
||||
<h2><span id="header-entity-label"><a id="organizationMoniker" href="#"></a></span></h2>
|
||||
<h2><span id="header-entity-label"><a id="organizationMoniker" href="${organizationVivoProfileURL}">${organizationLabel}</a></span></h2>
|
||||
|
||||
<div id="leftblock">
|
||||
<div id="leftUpper">
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
<div id="rightblock">
|
||||
|
||||
<h3 id="headerText">Comparing <span id="comparisonHeader">${currentParameterObject.value}</span> of <span id="entityHeader">Institutions</span> in <span id="organizationLabel"></span></h3>
|
||||
<h3 id="headerText">Comparing <span id="comparisonHeader">${currentParameterObject.value}</span> of <span id="entityHeader">Institutions</span> in ${organizationLabel}</h3>
|
||||
|
||||
<div id="temporal-graph">
|
||||
<div id="yaxislabel"></div>
|
||||
|
|
|
@ -5,11 +5,15 @@
|
|||
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI?url}">
|
||||
<#assign temporalGraphURL = '${urls.base}${standardVisualizationURLRoot}?vis=${otherVisType}&uri=${organizationURI}&labelField=label'>
|
||||
|
||||
<div id="error-container">
|
||||
|
||||
<h1 id="noPubsOrGrants-header">${organizationLabel}</h1>
|
||||
|
||||
<h3>${textForCurrentEntityComparisonType?capitalize} Temporal Graph
|
||||
<span id="noPubsOrGrants-span">| <a href="${temporalGraphURL}">view ${textForOtherEntityComparisonType} temporal graph</a></span>
|
||||
</h3>
|
||||
<div id="error-body">
|
||||
<p>This organization has neither sub-organizations nor people with ${textForCurrentEntityComparisonType} in the system. Please visit the full ${organizationLabel} <a href="${organizationVivoProfileURL}">profile page</a> for a more complete overview.</p>
|
||||
<p>This organization has neither sub-organizations nor people with ${textForCurrentEntityComparisonType} in the system. Please visit the full ${organizationLabel} <a href="${organizationVivoProfileURL}">profile page</a> for a more complete overview.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -8,17 +8,61 @@ corresponding changes in the included Templates. -->
|
|||
<#include "entityComparisonSetup.ftl">
|
||||
|
||||
<#assign temporalGraphDownloadFileLink = '${temporalGraphDownloadCSVCommonURL}&vis=entity_grant_count'>
|
||||
<#assign temporalGraphDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=entity_grant_count&uri=${organizationURI}&vis_mode=json">
|
||||
|
||||
<#-- variables passed from server-side code -->
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
/*
|
||||
This is used in util.js to print grant temporal graph links for all sub-organizations.
|
||||
*/
|
||||
var subOrganizationTemporalGraphURL = "${subOrganizationGrantTemporalGraphCommonURL}";
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.blockUI.defaults.overlayCSS = {
|
||||
backgroundColor: '#fff',
|
||||
opacity: 1.0
|
||||
};
|
||||
|
||||
$.blockUI.defaults.css.width = '500px';
|
||||
$.blockUI.defaults.css.border = '0px';
|
||||
|
||||
$("div#body").block({
|
||||
message: '<h3><img src="' + loadingImageLink + '" /> Loading data for <i>${organizationLabel}</i></h3>'
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '${temporalGraphDataURL}',
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
if (data.error) {
|
||||
$("#error-container").show();
|
||||
$("#body").remove();
|
||||
} else {
|
||||
temporalGraphProcessor.initiateTemporalGraphRenderProcess(graphContainer, data);
|
||||
$("#error-container").remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// unblock when ajax activity stops
|
||||
$(document).ajaxStop($("div#body").unblock());
|
||||
|
||||
});
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<#assign currentParameterObject = grantParameter>
|
||||
|
||||
<#include "entityComparisonBody.ftl">
|
||||
<#include "entityComparisonBody.ftl">
|
||||
|
||||
<#--
|
||||
Right now we include the error message by default becuae currently I could not devise any more smarted solution. By default
|
||||
the CSS of the #error-container is display:none; so it will be hidden unless explicitly commanded to be shown which we do in
|
||||
via JavaScript.
|
||||
-->
|
||||
<#include "entityGrantComparisonError.ftl">
|
|
@ -8,17 +8,69 @@ corresponding changes in the included Templates. -->
|
|||
<#include "entityComparisonSetup.ftl">
|
||||
|
||||
<#assign temporalGraphDownloadFileLink = '${temporalGraphDownloadCSVCommonURL}&vis=entity_comparison'>
|
||||
<#assign temporalGraphDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=entity_comparison&uri=${organizationURI}&vis_mode=json">
|
||||
|
||||
<#-- variables passed from server-side code -->
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
|
||||
/*
|
||||
This is used in util.js to print grant temporal graph links for all sub-organizations.
|
||||
*/
|
||||
var subOrganizationTemporalGraphURL = "${subOrganizationPublicationTemporalGraphCommonURL}";
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$.blockUI.defaults.overlayCSS = {
|
||||
backgroundColor: '#fff',
|
||||
opacity: 1.0
|
||||
};
|
||||
|
||||
$.blockUI.defaults.css.width = '500px';
|
||||
$.blockUI.defaults.css.border = '0px';
|
||||
$.blockUI.defaults.css.top = '15%';
|
||||
|
||||
$("div#temporal-graph-response").block({
|
||||
message: '<h3><img src="' + loadingImageLink + '" /> Loading data for <i>${organizationLabel}</i></h3>'
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '${temporalGraphDataURL}',
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
if (data.error) {
|
||||
$("#body").remove();
|
||||
$("#error-container").show();
|
||||
$("div#temporal-graph-response").unblock();
|
||||
|
||||
} else {
|
||||
temporalGraphProcessor.initiateTemporalGraphRenderProcess(graphContainer, data);
|
||||
$("#error-container").remove();
|
||||
$("div#temporal-graph-response").unblock();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// unblock when ajax activity stops
|
||||
//$(document).ajaxStop($("div#temporal-graph-response").unblock());
|
||||
|
||||
});
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<#assign currentParameterObject = publicationParameter>
|
||||
|
||||
<#include "entityComparisonBody.ftl">
|
||||
<div id="temporal-graph-response">
|
||||
|
||||
<#include "entityComparisonBody.ftl">
|
||||
|
||||
<#--
|
||||
Right now we include the error message by default becuae currently I could not devise any more smarted solution. By default
|
||||
the CSS of the #error-container is display:none; so it will be hidden unless explicitly commanded to be shown which we do in
|
||||
via JavaScript.
|
||||
-->
|
||||
<#include "entityPublicationComparisonError.ftl">
|
||||
|
||||
</div>
|
|
@ -5,8 +5,6 @@
|
|||
<#assign dataVisualizationURLRoot ="/visualizationData">
|
||||
|
||||
<#assign organizationURI ="${organizationURI?url}">
|
||||
<#assign jsonContent ="${jsonContent}">
|
||||
<#assign organizationLabel = "${organizationLabel}">
|
||||
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}">
|
||||
|
||||
<#assign subOrganizationVivoProfileURL = "${urls.base}/individual?">
|
||||
|
@ -49,6 +47,7 @@ we will use rev 293 (dev build version) of the flot & excanvas files.
|
|||
|
||||
<#assign fliptext = 'js/visualization/entitycomparison/jquery_plugins/fliptext/jquery.mb.flipText.js'>
|
||||
<#assign jqueryNotify = 'js/jquery_plugins/jquery.notify.min.js'>
|
||||
<#assign jqueryBlockUI = 'js/jquery_plugins/jquery.blockUI.min.js'>
|
||||
<#assign jqueryUI = 'js/jquery-ui/js/jquery-ui-1.8.4.custom.min.js'>
|
||||
<#assign datatable = 'js/jquery_plugins/jquery.dataTables.min.js'>
|
||||
<#assign entityComparisonUtils = 'js/visualization/entitycomparison/util.js'>
|
||||
|
@ -56,9 +55,11 @@ we will use rev 293 (dev build version) of the flot & excanvas files.
|
|||
<#assign guiEventManager = 'js/visualization/entitycomparison/gui-event-manager.js'>
|
||||
|
||||
|
||||
|
||||
<!--[if IE]><script type="text/javascript" src="${excanvas}"></script><![endif]-->
|
||||
${scripts.add(flot)}
|
||||
${scripts.add(fliptext)}
|
||||
${scripts.add(jqueryBlockUI)}
|
||||
${scripts.add(jqueryUI)}
|
||||
${scripts.add(datatable)}
|
||||
${scripts.add(entityComparisonUtils)}
|
||||
|
@ -90,14 +91,16 @@ var contextPath = "${urls.base}";
|
|||
var temporalGraphSmallIcon = "${temporalGraphSmallIcon}";
|
||||
var subOrganizationVivoProfileURL = "${subOrganizationVivoProfileURL}";
|
||||
|
||||
var jsonString = '${jsonContent}';
|
||||
var jsonString = '${jsonContent!}';
|
||||
var organizationLabel = '${organizationLabel}';
|
||||
var organizationVIVOProfileURL = "${organizationVivoProfileURL}";
|
||||
|
||||
var loadingImageLink = contextPath + "/images/visualization/ajax-loader.gif";
|
||||
var loadingImageLink = contextPath + "/images/visualization/ajax-loader-indicator.gif";
|
||||
|
||||
var entityCheckboxSelectorDOMClass = "${entityCheckboxSelectorDOMClass}";
|
||||
|
||||
var temporalGraphProcessor;
|
||||
|
||||
/*
|
||||
This has to be declared before making a call to GUI event manager JS.
|
||||
*/
|
||||
|
@ -119,4 +122,4 @@ var COMPARISON_PARAMETERS_INFO = {
|
|||
|
||||
</script>
|
||||
|
||||
${scripts.add(guiEventManager)}
|
||||
${headScripts.add(guiEventManager)}
|
Loading…
Add table
Add a link
Reference in a new issue