diff --git a/webapp/web/js/individual/individualUriRdf.js b/webapp/web/js/individual/individualUriRdf.js new file mode 100644 index 000000000..4c812fc54 --- /dev/null +++ b/webapp/web/js/individual/individualUriRdf.js @@ -0,0 +1,42 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +$(document).ready(function(){ + // This function creates and styles the "qTip" tooltip that displays the resource uri and the rdf link when the user clicks the uri/rdf icon. + $('#uriIcon').each(function() + { + $(this).qtip( + { + content: { + prerender: true, // We need this for the .click() event listener on 'a.close' + text: '
share the URI for this profile
view profile in RDF format
close' + }, + position: { + corner: { + target: 'bottomLeft', + tooltip: 'topLeft' + } + }, + show: { + when: {event: 'click'} + }, + hide: { + fixed: true, // Make it fixed so it can be hovered over and interacted with + when: { + target: $('a.close'), + event: 'click' + } + }, + style: { + padding: '1em', + width: 400, + backgroundColor: '#f1f2ee' + } + }); + }); + + // Prevent close link for URI qTip from requesting bogus '#' href + $('a.close').click(function() { + $('#uriIcon').qtip("hide"); + return false; + }); +}); \ No newline at end of file diff --git a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl index 61182a21b..fced9a10d 100644 --- a/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl +++ b/webapp/web/templates/freemarker/body/individual/individual-vitro.ftl @@ -65,4 +65,5 @@ ${stylesheets.add('', '')} -${scripts.add('')} +${scripts.add('', + '')}