1. New icons for co-auth & co-pi vis links.
2. Changes the logic for language to be displayed along with different sparklines in different cases. Person Publication & Grant is done.
|
@ -24,7 +24,7 @@ span.incomplete-data-holder,
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaboratorship-link {
|
.collaboratorship-link {
|
||||||
padding-top: 3px;
|
/*padding-top: 3px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaboratorship-link a {
|
.collaboratorship-link a {
|
||||||
|
@ -32,7 +32,7 @@ span.incomplete-data-holder,
|
||||||
}
|
}
|
||||||
|
|
||||||
.collaboratorship-link h3 {
|
.collaboratorship-link h3 {
|
||||||
line-height: 1em;
|
line-height: 1em !important;
|
||||||
font-size: 1em !important;
|
font-size: 1em !important;
|
||||||
margin-bottom: 0px !important;
|
margin-bottom: 0px !important;
|
||||||
padding-top: 0px !important;
|
padding-top: 0px !important;
|
||||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 5.5 KiB |
BIN
productMods/images/visualization/collaboration/co_author_icon_old.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
productMods/images/visualization/collaboration/co_investigator_icon_old.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1 KiB |
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<div id="coauthorship_link_container" class="collaboratorship-link-container">
|
<div id="coauthorship_link_container" class="collaboratorship-link-container">
|
||||||
<div class="collaboratorship-icon">
|
<div class="collaboratorship-icon">
|
||||||
<a href="${coAuthorURL}"><img src="${coAuthorIcon}" alt="Co-author Network icon" width="22px" height="23px" /></a>
|
<a href="${coAuthorURL}"><img src="${coAuthorIcon}" alt="Co-author Network icon" width="30px" height="30px" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="collaboratorship-link">
|
<div class="collaboratorship-link">
|
||||||
<h3><a href="${coAuthorURL}">Co-Author Network</a></h3>
|
<h3><a href="${coAuthorURL}">Co-Author Network</a></h3>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<div id="coinvestigator_link_container" class="collaboratorship-link-container">
|
<div id="coinvestigator_link_container" class="collaboratorship-link-container">
|
||||||
<div class="collaboratorship-icon">
|
<div class="collaboratorship-icon">
|
||||||
<a href="${coInvestigatorURL}"><img src="${coInvestigatorIcon}" alt="Co-investigator Network icon" width="22px" height="23px" /></a>
|
<a href="${coInvestigatorURL}"><img src="${coInvestigatorIcon}" alt="Co-investigator Network icon" width="30px" height="30px" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="collaboratorship-link">
|
<div class="collaboratorship-link">
|
||||||
<h3><a href="${coInvestigatorURL}">Co-Investigator Network</a></h3>
|
<h3><a href="${coInvestigatorURL}">Co-Investigator Network</a></h3>
|
||||||
|
|
|
@ -18,14 +18,20 @@
|
||||||
|
|
||||||
function drawGrantCountVisualization(providedSparklineImgTD) {
|
function drawGrantCountVisualization(providedSparklineImgTD) {
|
||||||
|
|
||||||
|
var unknownYearGrantCounts = ${sparklineVO.unknownYearGrants};
|
||||||
|
var onlyUnknownYearGrants = false;
|
||||||
|
|
||||||
var data = new google.visualization.DataTable();
|
var data = new google.visualization.DataTable();
|
||||||
data.addColumn('string', 'Year');
|
data.addColumn('string', 'Year');
|
||||||
data.addColumn('number', 'Grants');
|
data.addColumn('number', 'Grants');
|
||||||
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
||||||
|
|
||||||
|
var knownYearGrantCounts = 0;
|
||||||
|
|
||||||
<#list sparklineVO.yearToEntityCountDataTable as yearToGrantCountDataElement>
|
<#list sparklineVO.yearToEntityCountDataTable as yearToGrantCountDataElement>
|
||||||
data.setValue(${yearToGrantCountDataElement.yearToEntityCounter}, 0, '${yearToGrantCountDataElement.year}');
|
data.setValue(${yearToGrantCountDataElement.yearToEntityCounter}, 0, '${yearToGrantCountDataElement.year}');
|
||||||
data.setValue(${yearToGrantCountDataElement.yearToEntityCounter}, 1, ${yearToGrantCountDataElement.currentEntitiesCount});
|
data.setValue(${yearToGrantCountDataElement.yearToEntityCounter}, 1, ${yearToGrantCountDataElement.currentEntitiesCount});
|
||||||
|
knownYearGrantCounts += ${yearToGrantCountDataElement.currentEntitiesCount};
|
||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
<#-- Create a view of the data containing only the column pertaining to grant count. -->
|
<#-- Create a view of the data containing only the column pertaining to grant count. -->
|
||||||
|
@ -55,6 +61,16 @@
|
||||||
chartLabel: 'r'
|
chartLabel: 'r'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This means that all the publications have unknown years & we do not need to display
|
||||||
|
the sparkline.
|
||||||
|
*/
|
||||||
|
if (unknownYearGrantCounts > 0 && knownYearGrantCounts < 1) {
|
||||||
|
|
||||||
|
onlyUnknownYearGrants = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Test if we want to go for the approach when serving visualizations from a secure site..
|
Test if we want to go for the approach when serving visualizations from a secure site..
|
||||||
If "https:" is not found in location.protocol then we do everything normally.
|
If "https:" is not found in location.protocol then we do everything normally.
|
||||||
|
@ -108,6 +124,10 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalGrantCount = knownYearGrantCounts + unknownYearGrantCounts;
|
||||||
|
|
||||||
<#if sparklineVO.shortVisMode>
|
<#if sparklineVO.shortVisMode>
|
||||||
|
|
||||||
<#-- We want to display how many grant counts were considered, so this is used to calculate this. -->
|
<#-- We want to display how many grant counts were considered, so this is used to calculate this. -->
|
||||||
|
@ -118,10 +138,27 @@
|
||||||
renderedShortSparks += data.getValue(value, 1);
|
renderedShortSparks += data.getValue(value, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#${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>");
|
/*
|
||||||
|
In case that there are only unknown grants we want the text to mention these counts,
|
||||||
|
which would not be mentioned in the other case because the renderedShortSparks only hold counts
|
||||||
|
of grants which have any date associated with it.
|
||||||
|
*/
|
||||||
|
var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedShortSparks;
|
||||||
|
|
||||||
|
if (totalGrants === 1) {
|
||||||
|
var grantDisplay = "grant";
|
||||||
|
} else {
|
||||||
|
var grantDisplay = "grants";
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
|
||||||
|
|
||||||
var sparksText = ' within the last 10 years';
|
var sparksText = ' within the last 10 years';
|
||||||
|
|
||||||
|
if (totalGrants !== totalGrantCount) {
|
||||||
|
sparksText += ' (' + totalGrantCount + ' total)';
|
||||||
|
}
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -129,15 +166,37 @@
|
||||||
* any year associated with it. Hence.
|
* any year associated with it. Hence.
|
||||||
* */
|
* */
|
||||||
var renderedSparks = ${sparklineVO.renderedSparks};
|
var renderedSparks = ${sparklineVO.renderedSparks};
|
||||||
$('#${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>");
|
|
||||||
|
/*
|
||||||
|
In case that there are only unknown grants we want the text to mention these counts,
|
||||||
|
which would not be mentioned in the other case because the renderedSparks only hold counts
|
||||||
|
of grants which have any date associated with it.
|
||||||
|
*/
|
||||||
|
var totalGrants = onlyUnknownYearGrants ? unknownYearGrantCounts : renderedSparks;
|
||||||
|
|
||||||
|
if (totalGrants === 1) {
|
||||||
|
var grantDisplay = "grant";
|
||||||
|
} else {
|
||||||
|
var grantDisplay = "grants";
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#${sparklineContainerID} td.sparkline_number').text(totalGrants).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> " + grantDisplay + " <br/></span>");
|
||||||
|
|
||||||
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
||||||
+ ' to ${sparklineVO.latestRenderedGrantYear?c}</span> '
|
+ ' to ${sparklineVO.latestRenderedGrantYear?c}</span>';
|
||||||
+ '<br /> <a href="${sparklineVO.downloadDataLink}" >(.CSV File)</a> ';
|
|
||||||
|
if (totalGrants !== totalGrantCount) {
|
||||||
|
sparksText += ' (' + totalGrantCount + ' total)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sparksText += '<br /> <a href="${sparklineVO.downloadDataLink}" >(.CSV File)</a> ';
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
if (!onlyUnknownYearGrants) {
|
||||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,20 +18,27 @@
|
||||||
|
|
||||||
function drawPubCountVisualization(providedSparklineImgTD) {
|
function drawPubCountVisualization(providedSparklineImgTD) {
|
||||||
|
|
||||||
|
var unknownYearPublicationCounts = ${sparklineVO.unknownYearPublications};
|
||||||
|
var onlyUnknownYearPublications = false;
|
||||||
|
|
||||||
var data = new google.visualization.DataTable();
|
var data = new google.visualization.DataTable();
|
||||||
data.addColumn('string', 'Year');
|
data.addColumn('string', 'Year');
|
||||||
data.addColumn('number', 'Publications');
|
data.addColumn('number', 'Publications');
|
||||||
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
||||||
|
|
||||||
|
var knownYearPublicationCounts = 0;
|
||||||
|
|
||||||
<#list sparklineVO.yearToEntityCountDataTable as yearToPublicationCountDataElement>
|
<#list sparklineVO.yearToEntityCountDataTable as yearToPublicationCountDataElement>
|
||||||
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 0, '${yearToPublicationCountDataElement.year}');
|
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 0, '${yearToPublicationCountDataElement.year}');
|
||||||
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 1, ${yearToPublicationCountDataElement.currentEntitiesCount});
|
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 1, ${yearToPublicationCountDataElement.currentEntitiesCount});
|
||||||
|
knownYearPublicationCounts += ${yearToPublicationCountDataElement.currentEntitiesCount};
|
||||||
</#list>
|
</#list>
|
||||||
|
|
||||||
<#-- Create a view of the data containing only the column pertaining to publication count. -->
|
<#-- Create a view of the data containing only the column pertaining to publication count. -->
|
||||||
var sparklineDataView = new google.visualization.DataView(data);
|
var sparklineDataView = new google.visualization.DataView(data);
|
||||||
sparklineDataView.setColumns([1]);
|
sparklineDataView.setColumns([1]);
|
||||||
|
|
||||||
|
|
||||||
<#if sparklineVO.shortVisMode>
|
<#if sparklineVO.shortVisMode>
|
||||||
|
|
||||||
<#-- For the short view we only want the last 10 year's view of publication count, hence we filter
|
<#-- For the short view we only want the last 10 year's view of publication count, hence we filter
|
||||||
|
@ -56,6 +63,16 @@
|
||||||
chartLabel: 'r'
|
chartLabel: 'r'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
This means that all the publications have unknown years & we do not need to display
|
||||||
|
the sparkline.
|
||||||
|
*/
|
||||||
|
if (unknownYearPublicationCounts > 0 && knownYearPublicationCounts < 1) {
|
||||||
|
|
||||||
|
onlyUnknownYearPublications = true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Test if we want to go for the approach when serving visualizations from a secure site..
|
Test if we want to go for the approach when serving visualizations from a secure site..
|
||||||
If "https:" is not found in location.protocol then we do everything normally.
|
If "https:" is not found in location.protocol then we do everything normally.
|
||||||
|
@ -108,6 +125,9 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var totalPublicationCount = knownYearPublicationCounts + unknownYearPublicationCounts;
|
||||||
|
|
||||||
<#if sparklineVO.shortVisMode>
|
<#if sparklineVO.shortVisMode>
|
||||||
|
|
||||||
|
@ -119,9 +139,14 @@
|
||||||
renderedShortSparks += data.getValue(value, 1);
|
renderedShortSparks += data.getValue(value, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
var totalPubs = parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications});
|
/*
|
||||||
|
In case that there are only unknown publications we want the text to mention these counts,
|
||||||
|
which would not be mentioned in the other case because the renderedShortSparks only hold counts
|
||||||
|
of publications which have any date associated with it.
|
||||||
|
*/
|
||||||
|
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedShortSparks;
|
||||||
|
|
||||||
if ( totalPubs == 1 ) {
|
if (totalPubs === 1) {
|
||||||
var pubDisplay = "publication";
|
var pubDisplay = "publication";
|
||||||
} else {
|
} else {
|
||||||
var pubDisplay = "publications";
|
var pubDisplay = "publications";
|
||||||
|
@ -131,6 +156,10 @@
|
||||||
|
|
||||||
var sparksText = ' within the last 10 years';
|
var sparksText = ' within the last 10 years';
|
||||||
|
|
||||||
|
if (totalPubs !== totalPublicationCount) {
|
||||||
|
sparksText += ' (' + totalPublicationCount + ' total)';
|
||||||
|
}
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -138,7 +167,13 @@
|
||||||
* any year associated with it. Hence.
|
* any year associated with it. Hence.
|
||||||
* */
|
* */
|
||||||
var renderedSparks = ${sparklineVO.renderedSparks};
|
var renderedSparks = ${sparklineVO.renderedSparks};
|
||||||
var totalPubs = parseInt(renderedSparks) + parseInt(${sparklineVO.unknownYearPublications});
|
|
||||||
|
/*
|
||||||
|
In case that there are only unknown publications we want the text to mention these counts,
|
||||||
|
which would not be mentioned in the other case because the renderedSparks only hold counts
|
||||||
|
of publications which have any date associated with it.
|
||||||
|
*/
|
||||||
|
var totalPubs = onlyUnknownYearPublications ? unknownYearPublicationCounts : renderedSparks;
|
||||||
|
|
||||||
if ( totalPubs == 1 ) {
|
if ( totalPubs == 1 ) {
|
||||||
var pubDisplay = "publication";
|
var pubDisplay = "publication";
|
||||||
|
@ -149,11 +184,18 @@
|
||||||
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>");
|
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>");
|
||||||
|
|
||||||
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
||||||
+ ' to ${sparklineVO.latestRenderedPublicationYear?c}</span> '
|
+ ' to ${sparklineVO.latestRenderedPublicationYear?c}</span>';
|
||||||
+ ' <br /><a href="${sparklineVO.downloadDataLink}">(.CSV File)</a> ';
|
|
||||||
|
if (totalPubs !== totalPublicationCount) {
|
||||||
|
sparksText += ' (' + totalPublicationCount + ' total)';
|
||||||
|
}
|
||||||
|
|
||||||
|
sparksText += ' <br /><a href="${sparklineVO.downloadDataLink}">(.CSV File)</a> ';
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
if (!onlyUnknownYearPublications) {
|
||||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|