Merge branch 'develop' of github.com:vivo-project/VIVO into develop

This commit is contained in:
Stephen V. Williams 2013-08-26 09:41:23 -06:00
commit 957b6345e7
15 changed files with 554 additions and 82 deletions

View file

@ -0,0 +1,47 @@
<rdf:RDF
xmlns:vitro-public="http://vitro.mannlib.cornell.edu/ns/vitro/public#"
xmlns:c4o="http://purl.org/spar/c4o/"
xmlns:ero="http://purl.obolibrary.org/obo/"
xmlns:pvs="http://vivoweb.org/ontology/provenance-support#"
xmlns:owl2="http://www.w3.org/2006/12/owl2-xml#"
xmlns:scirr="http://vivoweb.org/ontology/scientific-research-resource#"
xmlns:vivo="http://vivoweb.org/ontology/core#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:afn="http://jena.hpl.hp.com/ARQ/function#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:scires="http://vivoweb.org/ontology/scientific-research#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:geo="http://aims.fao.org/aos/geopolitical.owl#"
xmlns:skco="http://www.w3.org/2004/02/skos/core#"
xmlns:event="http://purl.org/NET/c4dm/event.owl#"
xmlns:dcelem="http://purl.org/dc/elements/1.1/"
xmlns:vitro="http://vitro.mannlib.cornell.edu/ns/vitro/0.7#"
xmlns:vann="http://purl.org/vocab/vann/"
xmlns:skos="http://www.w3.org/2008/05/skos#"
xmlns:swvs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:fabio="http://purl.org/spar/fabio/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:versionInfo rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal"
>0.7</owl:versionInfo>
<owl:Class rdf:about="http://vivoweb.org/ontology/core#ConceptSemanticType">
<vitro:exampleAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Semantic Type for given concept, for example UMLS's type returned for concepts</vitro:exampleAnnot>
<vitro:descriptionAnnot rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Semantic Type for given concept, for example UMLS's type returned for concepts.</vitro:descriptionAnnot>
<vitro:shortDef rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Concept Semantic Type</vitro:shortDef>
</owl:Class>
<owl:ObjectProperty rdf:about="http://vivoweb.org/ontology/core#hasConceptSemanticType">
<rdfs:range rdf:resource="http://vivoweb.org/ontology/core#ConceptSemanticType"/>
<owl:inverseOf rdf:resource="http://vivoweb.org/ontology/core#isConceptSemanticTypeOf"/>
</owl:ObjectProperty>
</rdf:RDF>

View file

@ -9,6 +9,7 @@ $(document).ready(function(){
$.extend(this, urlsBase);
$.extend(this, i18nStrings);
$.extend(this, geoResearcherCount);
getGeoJsonForMaps();
@ -368,7 +369,7 @@ $(document).ready(function(){
function getResearcherCount(area) {
var researcherCount = 0;
var researcherCount = this.geoResearcherCount;
var areaCount = 0;
var text = "";
if ( area == "global" ) {
@ -383,7 +384,6 @@ $(document).ready(function(){
$.each(researchAreas.features, function() {
if ( this.properties.mapType == area ) {
researcherCount = researcherCount + this.properties.html ;
areaCount = areaCount + 1;
}
});
@ -391,10 +391,16 @@ $(document).ready(function(){
if ( areaCount == 1 && text == " states.") {
text = " " + i18nStrings.stateString;
}
if ( researcherCount == 1 ) {
researcherText = " " + i18nStrings.researcherString + " " + i18nStrings.inString;
}
else {
researcherText = " " + i18nStrings.researcherInString
}
$('div#researcherTotal').html("<font style='font-size:1.05em;color:#167093'>"
+ researcherCount.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2')
+ "</font> " + i18nStrings.researchersInString + " <font style='font-size:1.05em;color:#167093'>"
+ researcherCount
+ "</font> " + researcherText + " <font style='font-size:1.05em;color:#167093'>"
+ areaCount + "</font>" + text);
}
function appendLegendToLeafletContainer() {

View file

@ -69,22 +69,25 @@ $(document).ready(function(){
location.hash = location.hash.replace(/\s+/g, '');
if ( location.hash.indexOf("map") >= 0 ) {
// get the name of the group that contains the geographicFocusOf property.
var tabName = $('h3#geographicFocusOf').parent('article').parent('div').attr("id");
tabName = tabName.replace("Group","");
tabNameCapped = tabName.charAt(0).toUpperCase() + tabName.slice(1);
// if the name of the first tab section = tabName we don't have to do anything;
// otherwise, select the correct tab and deselect the first one
var $firstTab = $('li.clickable').first();
if ( $firstTab.text() != tabNameCapped ) {
// select the correct tab
$('li[groupName="' + tabName + '"]').removeClass("nonSelectedGroupTab clickable");
$('li[groupName="' + tabName + '"]').addClass("selectedGroupTab clickable");
// deselect the first tab
$firstTab.removeClass("selectedGroupTab clickable");
$firstTab.addClass("nonSelectedGroupTab clickable");
$('section.property-group:visible').hide();
// show the selected tab section
$('section#' + tabName).show();
// if it doesn't exist, don't do anything.
if ( $('h3#geographicFocusOf').length ) {
var tabName = $('h3#geographicFocusOf').parent('article').parent('div').attr("id");
tabName = tabName.replace("Group","");
tabNameCapped = tabName.charAt(0).toUpperCase() + tabName.slice(1);
// if the name of the first tab section = tabName we don't have to do anything;
// otherwise, select the correct tab and deselect the first one
var $firstTab = $('li.clickable').first();
if ( $firstTab.text() != tabNameCapped ) {
// select the correct tab
$('li[groupName="' + tabName + '"]').removeClass("nonSelectedGroupTab clickable");
$('li[groupName="' + tabName + '"]').addClass("selectedGroupTab clickable");
// deselect the first tab
$firstTab.removeClass("selectedGroupTab clickable");
$firstTab.addClass("nonSelectedGroupTab clickable");
$('section.property-group:visible').hide();
// show the selected tab section
$('section#' + tabName).show();
}
}
// if there is a more link, "click" more to show all the researchers
// we need the timeout delay so that the more link can get rendered

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- List of positions for the individual --> <h3>Positions!${core}personInPosition</h3>
<#-- List of positions for the individual -->
<#assign positions = propertyGroups.pullProperty("${core}personInPosition")!>
<#if positions?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#assign localName = positions.localName>

View file

@ -3,8 +3,6 @@
<#-- List of research areas for the individual -->
<#assign researchAreas = propertyGroups.pullProperty("${core}hasResearchArea")!>
<#assign concepts = propertyGroups.pullProperty("${core}hasAssociatedConcept")!>
<#if concepts?has_content> concepts has content <#else> concepts dont have content</#if>
<h2>RESEARCH AREAS: ${core}hasResearchArea</h2>
<#if researchAreas?has_content> <#-- true when the property is in the list, even if not populated (when editing) -->
<#assign localName = researchAreas.localName>
<h2 id="${localName}" class="mainPropGroup">
@ -14,5 +12,5 @@
</h2>
<ul id="individual-${localName}" role="list" >
<@p.objectProperty researchAreas editable />
</ul> <#else> Research areas does not have content
</ul>
</#if>

View file

@ -281,7 +281,7 @@ var addConceptForm = {
generateIndividualLabelsDisplay:function(label, altLabels) {
var labelDisplay = label;
if(altLabels != null && altLabels.length > 0) {
labelDisplay += "<br>(" + altLabels + ")";
labelDisplay += "<br> [" + altLabels + "]";
}
return labelDisplay;
},

View file

@ -205,3 +205,16 @@ var urlsBase = "${urls.base}";
</section>
</#macro>
<#-- retrieves a count, the number of researchers with a geographic focus, -->
<#-- and saves it as a js variable to be used by the homePageMaps.js file -->
<#macro getGeoResearcherCount>
<script>
<#if researcherCountDG?has_content>
<#assign theCount = researcherCountDG[0].count />
<#else>
<#assign theCount = 0 />
</#if>
var geoResearcherCount = ${theCount};
</script>
</#macro>