NIHVIVO-3418: Done some refactoring, so the Individual link icon for URI/RDF works properly in a VITRO instance.

This commit is contained in:
manolobevia 2011-12-03 01:36:00 +00:00
parent f9d402bff6
commit 81598452e2
2 changed files with 1 additions and 48 deletions

View file

@ -5,15 +5,6 @@ $(document).ready(function(){
// "more"/"less" HTML truncator for showing more or less content in data property core:overview
$('.overview-value').truncate({max_length: 500});
// "more"/"less" HTML truncator for all properties
// $('.subclass-property-list li:gt(4)').hide();
// $('ul li:gt(4)').hide();
// $('.show_button').click(function() {
// $('ul li:gt(4)').show();
// });
// var propList = '.property-list:not(:has(>li>ul)) li:gt(4)';
$.fn.exists = function () {
return this.length !== 0;
}
@ -100,45 +91,6 @@ $(document).ready(function(){
// Change background color button when verbose mode is off
$('a#verbosePropertySwitch:contains("Turn off")').addClass('verbose-off');
// This function creates and styles the "qTip" tooltip that displays the resource uri when the user clicks the uri icon.
$('#uriIcon').each(function()
{
$(this).qtip(
{
content: {
prerender: true, // We need this for the .click() event listener on 'a.close'
text: '<h5>share the URI for this profile</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">view profile in RDF format</a></h5><a class="close" href="#">close</a>'
},
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;
});
// Reveal vCard QR code when QR icon is clicked
$('#qrIcon, .qrCloseLink').click(function() {