/* $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. $('img#downloadIcon').each(function() { $(this).qtip( { content: { prerender: true, // We need this for the .click() event listener on 'a.close' text: '
' +'

' +'

' +'
' +'
close
' +'
Download the results from this search
' +'
download results in XML format
' +'
download results in CSV format
' +'
' }, 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: 500, backgroundColor: '#f1f2ee' } }); }); $( "#slider-vertical" ).slider({ orientation: "vertical", range: "min", min: 10, max: 1000, value: 500, slide: function( event, ui ) { $( "#amount" ).val( ui.value ); $('#csvDownload').attr("href", urlsBase + '/search?' + queryText +'&csv=1&hitsPerPage=' + ui.value); $('#xmlDownload').attr("href", urlsBase + '/search?' + queryText +'&xml=1&hitsPerPage=' + ui.value); } }); $( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) ); // Prevent close link for URI qTip from requesting bogus '#' href $('a.close').click(function() { $('#downloadIcon').qtip("hide"); return false; }); });