Fixed Safari fail to load issue due to QTIP code
This commit is contained in:
parent
8e2aeee861
commit
40189139bb
3 changed files with 55 additions and 53 deletions
|
@ -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'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
|
@ -71,11 +71,64 @@ var EntityVisModeController = Class.extend({
|
||||||
} // end if
|
} // end if
|
||||||
},
|
},
|
||||||
loadJsonData: function(me, data) {
|
loadJsonData: function(me, data) {
|
||||||
|
|
||||||
|
$("#" + responseContainerID).unblock();
|
||||||
|
|
||||||
$.each(me.widgets, function(i, widget) {
|
$.each(me.widgets, function(i, widget) {
|
||||||
widget.loadJsonData(data);
|
widget.loadJsonData(data);
|
||||||
});
|
});
|
||||||
me.isUnloaded = false;
|
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
|
// key can be discippline or subdiscipline
|
||||||
show: function(key) {
|
show: function(key) {
|
||||||
|
|
|
@ -88,5 +88,3 @@ This visualization is based on the publications we were able to 'science locate'
|
||||||
|
|
||||||
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.</div>
|
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.</div>
|
||||||
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>')}
|
${headScripts.add('<script type="text/javascript" src="${urls.base}/js/jquery_plugins/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>')}
|
||||||
|
|
||||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/Utils.js"></script>')}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue