1. Made style changes for the indivudal page in the sparkline visualization section.
2. Moved co-author n/w link from publication sparkline template to indiv*-sparkline*.ftl
This commit is contained in:
parent
fe193eb1df
commit
a127d6337d
4 changed files with 60 additions and 68 deletions
|
@ -27,3 +27,33 @@ span.incomplete-data-holder,
|
||||||
position:absolute;
|
position:absolute;
|
||||||
width:380px;*/
|
width:380px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collaboratorship-icon {
|
||||||
|
float: left;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collaboratorship-link a {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.collaboratorship-link h3 {
|
||||||
|
line-height: 1em;
|
||||||
|
font-size: 1em !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
padding-top: 0px !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
padding-left: 0px !important;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#coauthorship_link_container,
|
||||||
|
#coinvestigator_link_container {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sparkline_text {
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: left;
|
||||||
|
}
|
|
@ -8,8 +8,6 @@ var visualization = {
|
||||||
var containerIdCoAuthor = 'vis_container_coauthor',
|
var containerIdCoAuthor = 'vis_container_coauthor',
|
||||||
containerCoAuthor = $('#' + containerIdCoAuthor);
|
containerCoAuthor = $('#' + containerIdCoAuthor);
|
||||||
|
|
||||||
//container.empty().html('<img src="${loadingImageLink}" />');
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
data: {
|
data: {
|
||||||
|
@ -20,17 +18,20 @@ var visualization = {
|
||||||
},
|
},
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
if ($.trim(data) != "") {
|
||||||
containerCoAuthor.html(data);
|
containerCoAuthor.html(data);
|
||||||
containerCoAuthor.children("#pub_count_short_sparkline_vis").append(coAuthorIcon);
|
containerCoAuthor.children("#pub_count_short_sparkline_vis");
|
||||||
/* containerCoAuthor.find("<img>").css("float", "left"); */
|
|
||||||
|
/* Since there are publications there are chances that there will be co-authors as well, so show the
|
||||||
|
* co-author network icon.*/
|
||||||
|
$("#coauthorship_link_container").show();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
visualizationUrl = visualizationUrl.replace("/visualization", "/visualizationAjax");
|
|
||||||
|
|
||||||
visualization.renderCoAuthor(visualizationUrl);
|
visualization.renderCoAuthor(visualizationUrl);
|
||||||
});
|
});
|
|
@ -8,50 +8,29 @@
|
||||||
<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'>
|
<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'>
|
||||||
<#assign standardVisualizationURLRoot ="/visualizationfm">
|
<#assign standardVisualizationURLRoot ="/visualizationfm">
|
||||||
<#assign googleJSAPI = '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'>
|
<#assign googleJSAPI = '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'>
|
||||||
<#assign CoInvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=copi'>
|
<#assign coAuthorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=coauthor'>
|
||||||
|
<#assign coInvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${individual.uri}&vis_mode=copi'>
|
||||||
<style>
|
|
||||||
|
|
||||||
.collaboratorship-icon {
|
|
||||||
float: left;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collaboratorship-link a {
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.collaboratorship-link h3 {
|
|
||||||
line-height: 1em;
|
|
||||||
font-size: 1em !important;
|
|
||||||
margin-bottom: 0px !important;
|
|
||||||
padding-top: 0px !important;
|
|
||||||
padding-right: 0px !important;
|
|
||||||
padding-left: 0px !important;
|
|
||||||
padding-bottom: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div id="vis_container_coauthor"> </div>
|
<div id="vis_container_coauthor"> </div>
|
||||||
|
|
||||||
<div id="vis_container_coinvestigator">
|
<div id="coauthorship_link_container" style="display: none;">
|
||||||
<div class="collaboratorship-icon"><img src="${coInvestigatorIcon}" /></div>
|
<div class="collaboratorship-icon"><img src="${coAuthorIcon}" /></div>
|
||||||
<div class="collaboratorship-link"><h3>Co-Investigator Network </h3><a class="view-all-style" href="${CoInvestigatorURL}">View <span class= "pictos-arrow-10">4</span></a>
|
<div class="collaboratorship-link"><h3>Co-Author Network </h3><a class="view-all-style" href="${coAuthorURL}">View <span class= "pictos-arrow-10">4</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${stylesheets.addFromTheme("/visualization/visualization.css")}
|
<div id="coinvestigator_link_container">
|
||||||
|
<div class="collaboratorship-icon"><img src="${coInvestigatorIcon}" /></div>
|
||||||
|
<div class="collaboratorship-link"><h3>Co-Investigator Network </h3><a class="view-all-style" href="${coInvestigatorURL}">View</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
${stylesheets.add("css/visualization/visualization.css")}
|
||||||
${scripts.add(googleJSAPI)}
|
${scripts.add(googleJSAPI)}
|
||||||
${scripts.add("/js/visualization/sparkline.js")}
|
${scripts.add("/js/visualization/sparkline.js")}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var visualizationUrl = '${individual.visualizationUrl}';
|
var visualizationUrl = '${individual.visualizationUrl}';
|
||||||
|
|
||||||
var coAuthorIcon = $("<img>");
|
|
||||||
coAuthorIcon.attr("src", '${coAuthorIcon}');
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
|
@ -69,15 +69,7 @@
|
||||||
renderedShortSparks += data.getValue(value, 1);
|
renderedShortSparks += data.getValue(value, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
var totalPubs = parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications});
|
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications})).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> publication(s) <br/></span>");
|
||||||
|
|
||||||
if ( totalPubs > 1 ) {
|
|
||||||
var pubDisplay = "publications";
|
|
||||||
} else {
|
|
||||||
var pubDisplay = "publication";
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#${sparklineContainerID} td.sparkline_number').text(totalPubs).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> "+ pubDisplay +"<br/></span>");
|
|
||||||
|
|
||||||
var sparksText = ' within the last 10 years';
|
var sparksText = ' within the last 10 years';
|
||||||
|
|
||||||
|
@ -88,22 +80,14 @@
|
||||||
* 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.unkownYearPublications});
|
$('#${sparklineContainerID} td.sparkline_number').text(parseInt(renderedSparks) + parseInt(${sparklineVO.unknownYearPublications})).css("font-weight", "bold").attr("class", "grey").append("<span style='color: #2485AE;'> publication(s) <br/></span>");
|
||||||
|
|
||||||
if ( totalPubs > 1 ) {
|
|
||||||
var pubDisplay = "publications";
|
|
||||||
} else {
|
|
||||||
var pubDisplay = "publication";
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#${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> '
|
||||||
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
|
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText).css("font-weight", "bold");
|
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +139,6 @@
|
||||||
|
|
||||||
var sparklineTextTD = $('<td>');
|
var sparklineTextTD = $('<td>');
|
||||||
sparklineTextTD.attr('class', 'sparkline_text');
|
sparklineTextTD.attr('class', 'sparkline_text');
|
||||||
sparklineTextTD.css('text-align', 'left');
|
|
||||||
row3.append(sparklineTextTD);
|
row3.append(sparklineTextTD);
|
||||||
table.append(row);
|
table.append(row);
|
||||||
table.append(row2);
|
table.append(row2);
|
||||||
|
@ -171,10 +154,9 @@
|
||||||
</div><!-- Sparkline Viz -->
|
</div><!-- Sparkline Viz -->
|
||||||
|
|
||||||
<#if sparklineVO.shortVisMode>
|
<#if sparklineVO.shortVisMode>
|
||||||
<#--<span class="vis_link">-->
|
|
||||||
<h3>Co-Author Network
|
<#-- Shifted the link to co-author to the individual-sparkline.ftl instead. -->
|
||||||
<a class="view-all-style" href="${sparklineVO.fullTimelineNetworkLink}">View <span class= "pictos-arrow-10">4</span></a> </h3>
|
|
||||||
<#--</span>-->
|
|
||||||
<#else>
|
<#else>
|
||||||
<!-- For Full Sparkline - Print the Table of Publication Counts per Year -->
|
<!-- For Full Sparkline - Print the Table of Publication Counts per Year -->
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue