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
|
@ -26,4 +26,34 @@ span.incomplete-data-holder,
|
|||
margin-top:-2%;
|
||||
position:absolute;
|
||||
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',
|
||||
containerCoAuthor = $('#' + containerIdCoAuthor);
|
||||
|
||||
//container.empty().html('<img src="${loadingImageLink}" />');
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: {
|
||||
|
@ -20,17 +18,20 @@ var visualization = {
|
|||
},
|
||||
dataType: 'html',
|
||||
success:function(data){
|
||||
containerCoAuthor.html(data);
|
||||
containerCoAuthor.children("#pub_count_short_sparkline_vis").append(coAuthorIcon);
|
||||
/* containerCoAuthor.find("<img>").css("float", "left"); */
|
||||
if ($.trim(data) != "") {
|
||||
containerCoAuthor.html(data);
|
||||
containerCoAuthor.children("#pub_count_short_sparkline_vis");
|
||||
|
||||
/* 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() {
|
||||
|
||||
visualizationUrl = visualizationUrl.replace("/visualization", "/visualizationAjax");
|
||||
|
||||
visualization.renderCoAuthor(visualizationUrl);
|
||||
});
|
||||
});
|
|
@ -8,50 +8,29 @@
|
|||
<#assign coInvestigatorIcon = '${urls.images}/visualization/co_investigator_icon.png'>
|
||||
<#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 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_coinvestigator">
|
||||
<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 <span class= "pictos-arrow-10">4</span></a>
|
||||
<div id="coauthorship_link_container" style="display: none;">
|
||||
<div class="collaboratorship-icon"><img src="${coAuthorIcon}" /></div>
|
||||
<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>
|
||||
|
||||
${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("/js/visualization/sparkline.js")}
|
||||
|
||||
<script type="text/javascript">
|
||||
var visualizationUrl = '${individual.visualizationUrl}';
|
||||
|
||||
var coAuthorIcon = $("<img>");
|
||||
coAuthorIcon.attr("src", '${coAuthorIcon}');
|
||||
|
||||
</script>
|
||||
|
||||
</#if>
|
|
@ -68,16 +68,8 @@
|
|||
$.each(shortSparkRows, function(index, value) {
|
||||
renderedShortSparks += data.getValue(value, 1);
|
||||
});
|
||||
|
||||
var totalPubs = parseInt(renderedShortSparks) + parseInt(${sparklineVO.unknownYearPublications});
|
||||
|
||||
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>");
|
||||
|
||||
$('#${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>");
|
||||
|
||||
var sparksText = ' within the last 10 years';
|
||||
|
||||
|
@ -87,23 +79,15 @@
|
|||
* Sparks that will be rendered will always be the one's which has
|
||||
* any year associated with it. Hence.
|
||||
* */
|
||||
var renderedSparks = ${sparklineVO.renderedSparks};
|
||||
var totalPubs = parseInt(renderedSparks) + parseInt(${sparklineVO.unkownYearPublications});
|
||||
|
||||
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 renderedSparks = ${sparklineVO.renderedSparks};
|
||||
$('#${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>");
|
||||
|
||||
var sparksText = ' from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
||||
+ ' to ${sparklineVO.latestRenderedPublicationYear?c}</span> '
|
||||
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
|
||||
</#if>
|
||||
|
||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText).css("font-weight", "bold");
|
||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
||||
|
||||
}
|
||||
|
||||
|
@ -155,7 +139,6 @@
|
|||
|
||||
var sparklineTextTD = $('<td>');
|
||||
sparklineTextTD.attr('class', 'sparkline_text');
|
||||
sparklineTextTD.css('text-align', 'left');
|
||||
row3.append(sparklineTextTD);
|
||||
table.append(row);
|
||||
table.append(row2);
|
||||
|
@ -171,10 +154,9 @@
|
|||
</div><!-- Sparkline Viz -->
|
||||
|
||||
<#if sparklineVO.shortVisMode>
|
||||
<#--<span class="vis_link">-->
|
||||
<h3>Co-Author Network
|
||||
<a class="view-all-style" href="${sparklineVO.fullTimelineNetworkLink}">View <span class= "pictos-arrow-10">4</span></a> </h3>
|
||||
<#--</span>-->
|
||||
|
||||
<#-- Shifted the link to co-author to the individual-sparkline.ftl instead. -->
|
||||
|
||||
<#else>
|
||||
<!-- For Full Sparkline - Print the Table of Publication Counts per Year -->
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue