diff --git a/home/src/main/resources/rdf/i18n/en_US/interface-i18n/firsttime/vivo_UiLabel.ttl b/home/src/main/resources/rdf/i18n/en_US/interface-i18n/firsttime/vivo_UiLabel.ttl index 20966bdb8..64f76f245 100644 --- a/home/src/main/resources/rdf/i18n/en_US/interface-i18n/firsttime/vivo_UiLabel.ttl +++ b/home/src/main/resources/rdf/i18n/en_US/interface-i18n/firsttime/vivo_UiLabel.ttl @@ -925,6 +925,22 @@ uil-data:qr_icon.VIVO uil:hasKey "qr_icon" ; uil:hasPackage "VIVO-languages" . +uil-data:uri_icon_label.VIVO + rdf:type owl:NamedIndividual ; + rdf:type uil:UILabel ; + rdfs:label "Open sharing options for this profile"@en-US ; + uil:hasApp "VIVO" ; + uil:hasKey "uri_icon_label" ; + uil:hasPackage "VIVO-languages" . + +uil-data:qr_icon_label.VIVO + rdf:type owl:NamedIndividual ; + rdf:type uil:UILabel ; + rdfs:label "Open individual URI QR code"@en-US ; + uil:hasApp "VIVO" ; + uil:hasKey "qr_icon_label" ; + uil:hasPackage "VIVO-languages" . + uil-data:label_type.VIVO rdf:type owl:NamedIndividual ; rdf:type uil:UILabel ; @@ -3076,6 +3092,14 @@ uil-data:research_areas.VIVO uil:hasKey "research_areas" ; uil:hasPackage "VIVO-languages" . +uil-data:research_areas_icon.VIVO + rdf:type owl:NamedIndividual ; + rdf:type uil:UILabel ; + rdfs:label "research areas icon"@en-US ; + uil:hasApp "VIVO" ; + uil:hasKey "research_areas_icon" ; + uil:hasPackage "VIVO-languages" . + uil-data:missing_grant.VIVO rdf:type owl:NamedIndividual ; rdf:type uil:UILabel ; diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-contactInfo.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-contactInfo.ftl index dc26ae72a..91ce5ac1b 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-contactInfo.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-contactInfo.ftl @@ -7,7 +7,7 @@ <#assign addlEmail = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#Email")!> <#if phone?has_content || primaryEmail?has_content || addlEmail?has_content > - +

${i18n().contact_info}

<#-- Primary Email --> diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-iconControls.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-iconControls.ftl index 405e9aeef..35936cdbe 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-iconControls.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-iconControls.ftl @@ -2,9 +2,13 @@ <#-- Icon controls displayed in upper-right corner --> -${i18n().share_the_uri} + <#if checkNamesResult?has_content > - ${i18n().qr_icon} + diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-researchAreas.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-researchAreas.ftl index fd6d30367..f3469eb4b 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-researchAreas.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-researchAreas.ftl @@ -7,7 +7,7 @@ <#assign localName = researchAreas.localName>

${researchAreas.name} - ${i18n().research_areas} + ${i18n().research_areas_icon} <@p.addLink researchAreas editable />

<@p.verboseDisplay researchAreas /> diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-webpage.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-webpage.ftl index 424b3440e..a7c13075c 100644 --- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-webpage.ftl +++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/individual-webpage.ftl @@ -4,7 +4,7 @@ <#assign webpage = propertyGroups.pullProperty("http://purl.obolibrary.org/obo/ARG_2000028","http://www.w3.org/2006/vcard/ns#URL")!> <#if webpage?has_content> <#-- true when the property is in the list, even if not populated (when editing) --> <#if !editable && individual.person() > - +

${i18n().websites}

<@p.addLinkWithLabel webpage editable i18n().websites/> <#assign localName = webpage.localName> diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coAuthorPersonLevelD3.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coAuthorPersonLevelD3.ftl index 14f28721c..a11a36792 100644 --- a/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coAuthorPersonLevelD3.ftl +++ b/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coAuthorPersonLevelD3.ftl @@ -160,6 +160,7 @@ function render_chord() { // #9edae5 var svg = d3.select('#chord').append('svg') + .attr('role', 'presentation') .attr('width', width+padding) .attr('height', height+padding) .append('g').attr('transform', 'translate(' + (width+padding) / 2 + ',' + (height+padding) / 2 +')') @@ -220,14 +221,50 @@ function render_chord() { .on('click', chord_click()) .on("mouseover", chord_hover(.05)) .on("mouseout", chord_hover(.8)); + + // Hide on mouse away from info + d3.select('#chord-info-div') + .on('mouseout', function(event) { + var e = event || d3.event; + var div = this.getBoundingClientRect(); + var x = (e.clientX !== undefined) ? e.clientX : (e.changedTouches ? e.changedTouches[0].clientX : 0); + var y = (e.clientY !== undefined) ? e.clientY : (e.changedTouches ? e.changedTouches[0].clientY : 0); + + d3.select(this).style('display', 'none'); + $('#chord').css('cursor', 'default'); + }); + + $(document).on('keydown', function(e) { + if (e.key === "Escape" || e.key === "Esc" || e.keyCode === 27) { + $('#chord-info-div').hide(); + } + }); } function chord_hover(opacity) { return function(g, i) { if (opacity > .5) { var chordInfoDiv = d3.select('#chord-info-div'); - chordInfoDiv.style('display', 'none'); - $('#chord').css('cursor', 'default'); + + var isHoveringTooltip = false; + if (chordInfoDiv && chordInfoDiv.node()) { + var rect = chordInfoDiv.node().getBoundingClientRect(); + var mouseX = d3.event.clientX; + var mouseY = d3.event.clientY; + if ( + mouseX >= rect.left - 40 && + mouseX <= rect.right + 40 && + mouseY >= rect.top - 40 && + mouseY <= rect.bottom + 40 + ) { + isHoveringTooltip = true; + } + } + if (!isHoveringTooltip) { + chordInfoDiv.style('display', 'none'); + $('#chord').css('cursor', 'default'); + } + } else { var hoverEvent = d3.event; var topPos = hoverEvent.pageY - 60; diff --git a/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coPIPersonLevelD3.ftl b/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coPIPersonLevelD3.ftl index 27efe5436..6c61e404e 100644 --- a/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coPIPersonLevelD3.ftl +++ b/webapp/src/main/webapp/templates/freemarker/visualization/personlevel/coPIPersonLevelD3.ftl @@ -139,6 +139,7 @@ $(document).ready(function(){ // #9edae5 var svg = d3.select('#chord').append('svg') + .attr('role', 'presentation') .attr('width', width+padding) .attr('height', height+padding) .append('g').attr('transform', 'translate(' + (width+padding) / 2 + ',' + (height+padding) / 2 +')') @@ -199,13 +200,51 @@ $(document).ready(function(){ .on('click', chord_click()) .on("mouseover", chord_hover(.05)) .on("mouseout", chord_hover(.8)); + + + // Hide on mouse away from info + d3.select('#chord-info-div') + .on('mouseout', function(event) { + var e = event || d3.event; + var div = this.getBoundingClientRect(); + var x = (e.clientX !== undefined) ? e.clientX : (e.changedTouches ? e.changedTouches[0].clientX : 0); + var y = (e.clientY !== undefined) ? e.clientY : (e.changedTouches ? e.changedTouches[0].clientY : 0); + + d3.select(this).style('display', 'none'); + $('#chord').css('cursor', 'default'); + }); + + $(document).on('keydown', function(e) { + if (e.key === "Escape" || e.key === "Esc" || e.keyCode === 27) { + $('#chord-info-div').hide(); + } + }); + function chord_hover(opacity) { return function(g, i) { if (opacity > .5) { var chordInfoDiv = d3.select('#chord-info-div'); - chordInfoDiv.style('display', 'none'); - $('#chord').css('cursor', 'default'); + + var isHoveringTooltip = false; + if (chordInfoDiv && chordInfoDiv.node()) { + var rect = chordInfoDiv.node().getBoundingClientRect(); + var mouseX = d3.event.clientX; + var mouseY = d3.event.clientY; + if ( + mouseX >= rect.left - 40 && + mouseX <= rect.right + 40 && + mouseY >= rect.top - 40 && + mouseY <= rect.bottom + 40 + ) { + isHoveringTooltip = true; + } + } + if (!isHoveringTooltip) { + chordInfoDiv.style('display', 'none'); + $('#chord').css('cursor', 'default'); + } + } else { var hoverEvent = d3.event; var topPos = hoverEvent.pageY - 60; diff --git a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-academic-article.ftl b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-academic-article.ftl index 8251f59a5..aaafc9621 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-academic-article.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-academic-article.ftl @@ -87,7 +87,11 @@ <#-- Most-specific types --> <@p.mostSpecificTypes individual /> - uri icon + + + diff --git a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl index b7288b535..5ff6e4db3 100644 --- a/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/nemo/templates/individual--foaf-person.ftl @@ -98,9 +98,13 @@ Add divs and wrapper to create funnelback basket controls. MUST BE REMOVED BEFOR
- ${i18n().uri_icon} + <#if checkNamesResult?has_content > - ${i18n().qr_icon} +
<#else>
- placeholder image +
diff --git a/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/individual--foaf-person.ftl index 52315f422..e6404a49b 100644 --- a/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/individual--foaf-person.ftl @@ -54,9 +54,13 @@
- ${i18n().uri_icon} + <#if checkNamesResult?has_content > - ${i18n().qr_icon} +
${i18n().close_capitalized} diff --git a/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/scratch.ftl b/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/scratch.ftl index ee579ae7d..0b3ef6a93 100644 --- a/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/scratch.ftl +++ b/webapp/src/main/webapp/themes/tenderfoot/templates/body/individual/scratch.ftl @@ -17,9 +17,14 @@
- ${i18n().uri_icon} + <#if checkNamesResult?has_content > - ${i18n().qr_icon} + + ${qrCodeLinkedImage!} ${i18n().close_capitalized} diff --git a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl index 86daf9a4b..b6cf9f837 100644 --- a/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl +++ b/webapp/src/main/webapp/themes/wilma/templates/individual--foaf-person.ftl @@ -44,11 +44,21 @@
- ${i18n().uri_icon} + <#if checkNamesResult?has_content > - ${i18n().qr_icon} + +