From 40189139bb878fd736e075bb8ff67de0e4da84cf Mon Sep 17 00:00:00 2001 From: kongchinhua Date: Mon, 11 Jul 2011 22:26:41 +0000 Subject: [PATCH] Fixed Safari fail to load issue due to QTIP code --- .../js/visualization/mapofscience/Utils.js | 49 ----------------- .../mapofscience/VisModeControllers.js | 55 ++++++++++++++++++- .../mapOfScience/mapOfScienceStandalone.ftl | 4 +- 3 files changed, 55 insertions(+), 53 deletions(-) delete mode 100644 productMods/js/visualization/mapofscience/Utils.js diff --git a/productMods/js/visualization/mapofscience/Utils.js b/productMods/js/visualization/mapofscience/Utils.js deleted file mode 100644 index 90778902..00000000 --- a/productMods/js/visualization/mapofscience/Utils.js +++ /dev/null @@ -1,49 +0,0 @@ -/* $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 when the user hovers over the info icons. - $('.filterInfoIcon').each(function() - { - var tipText ; - var tipLocation = "topLeft"; - if ( $(this).attr('id') == 'imageIconOne' ) { - tipText = $('#toolTipOne').html(); - } - else if ( $(this).attr('id') == 'imageIconTwo' ) { - tipText = $('#toolTipTwo').html(); - } - else { - tipText = $('#toolTipThree').html(); - tipLocation = "topRight" - }; - $(this).qtip( - { - content: { - text: tipText - }, - position: { - corner: { - target: 'center', - tooltip: tipLocation - } - }, - show: { - when: {event: 'mouseover'} - }, - hide: { - fixed: true // Make it fixed so it can be hovered over - }, - style: { - padding: '6px 6px', // Give it some extra padding - width: 500, - textAlign: 'left', - backgroundColor: '#ffffc0', - fontSize: '.7em', - padding: '6px 10px 6px 10px', - lineHeight: '14px' - } - }); - }); - -}); \ No newline at end of file diff --git a/productMods/js/visualization/mapofscience/VisModeControllers.js b/productMods/js/visualization/mapofscience/VisModeControllers.js index 68b4eb4b..c5d18651 100644 --- a/productMods/js/visualization/mapofscience/VisModeControllers.js +++ b/productMods/js/visualization/mapofscience/VisModeControllers.js @@ -71,11 +71,64 @@ var EntityVisModeController = Class.extend({ } // end if }, loadJsonData: function(me, data) { + + $("#" + responseContainerID).unblock(); + $.each(me.widgets, function(i, widget) { widget.loadJsonData(data); }); me.isUnloaded = false; - $("#" + responseContainerID).unblock(); + + me.initToolTipInfo(); + }, + initToolTipInfo: function() { +// console.log("called"); + $('.filterInfoIcon').each(function () { + + var me = $(this); + + var tipText; + var tipLocation = "topLeft"; + + if (me.attr('id') == 'imageIconOne') { + tipText = $('#toolTipOne').html(); + } else if (me.attr('id') == 'imageIconTwo') { + tipText = $('#toolTipTwo').html(); + } else { + tipText = $('#toolTipThree').html(); + tipLocation = "topRight"; + } + + me.qtip({ + content: { + text: tipText + }, + position: { + corner: { + target: 'center', + tooltip: tipLocation + } + }, + show: { + when: { + event: 'mouseover' + } + }, + hide: { + fixed: true // Make it fixed so it can be hovered over + }, + style: { + padding: '6px 6px', + // Give it some extra padding + width: 500, + textAlign: 'left', + backgroundColor: '#ffffc0', + fontSize: '.7em', + padding: '6px 10px 6px 10px', + lineHeight: '14px' + } + }); + }); }, // key can be discippline or subdiscipline show: function(key) { diff --git a/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceStandalone.ftl b/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceStandalone.ftl index 797a4d11..72794121 100644 --- a/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceStandalone.ftl +++ b/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceStandalone.ftl @@ -87,6 +87,4 @@ Each grey dot on the map represents one of the 554 sub-disciplines. A sub-discip This visualization is based on the publications we were able to 'science locate' for ${entityLabel}, and therefore it may not be fully representative of the overall publication activity for ${entityLabel}.

The publication coverage of this visualization can be improved by including more publication data in the VIVO system, and by ensuring that each publication in the VIVO system is associated with a journal that the Map of Science recognizes (based on the holdings of Thomson's ISI database and Elsevier's Scopus database). Journal names containing typos or other idiosyncracies may need to be cleaned up before they are recognized. You may contact a VIVO system administrator if publication coverage is a concern. -${headScripts.add('')} - -${scripts.add('')} +${headScripts.add('')} \ No newline at end of file