From 923572053acb69f9b58b52a32543ec1b6f236cab Mon Sep 17 00:00:00 2001 From: tworrall Date: Mon, 11 Apr 2011 15:47:44 +0000 Subject: [PATCH] NIHVIVO-2160:improved tooltip for uri icon via javascript --- productMods/js/individual/individualUtils.js | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/productMods/js/individual/individualUtils.js b/productMods/js/individual/individualUtils.js index 32cda7a1..c5e17bf2 100644 --- a/productMods/js/individual/individualUtils.js +++ b/productMods/js/individual/individualUtils.js @@ -7,4 +7,38 @@ $(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: { + title: { + text: 'URI', + }, + text: '
' + $("#uriIcon").attr("title") + '

' + }, + position: { + corner: { + target: 'leftBottom', + tooltip: 'bottomLeft' + } + }, + show: { + when: {event: 'click'} + }, + hide: { + fixed: true // Make it fixed so it can be hovered over + }, + style: { + title: {'backgroundColor': '#2485AE', 'color': 'white', 'fontFamily': '"Lucida Sans Unicode","Lucida Grande", Geneva, helvetica, sans-serif'}, + padding: '6px 6px', // Give it some extra padding + width: 380, + textAlign: 'center', + backgroundColor: '#f1f2ee' + } + }); + }); + }); \ No newline at end of file