Added hover event to help text

This commit is contained in:
bergware
2019-03-17 13:57:20 +01:00
parent 69eb06119d
commit ac8e853e4c

View File

@@ -85,6 +85,7 @@ var before = new Date();
// page timer events
var timers = {};
var delay = null;
function pauseEvents(id){
$.each(timers, function(i, timer) {
@@ -459,6 +460,17 @@ echo "</span></div>";
// Firefox specific workaround
if (typeof InstallTrigger!=='undefined') $('#nav-block').addClass('mozilla');
function clickHelp(i) {
clearTimeout(delay);
$('#helpinfo'+i).toggle('slow');
delay = (delay==-1 ? null : -1);
}
function hoverOnHelp(i) {
if (delay!=-1) {delay=setTimeout(function(){$('#helpinfo'+i).show('slow');},1250);}
}
function hoverOffHelp(i) {
if (delay!=-1) {clearTimeout(delay); $('#helpinfo'+i).hide('slow');}
}
function parseINI(data){
var regex = {
section: /^\s*\[\s*\"*([^\]]*)\s*\"*\]\s*$/,
@@ -612,9 +624,9 @@ $(function() {
node = node.prev();
name = node.prop('nodeName').toLowerCase();
}
node.css('cursor','help').click(function(){$('#helpinfo'+i).toggle('slow');clearTimeout(delay);delay=null;}).hover(function(){delay=setTimeout(function(){$('#helpinfo'+i).show('slow');},1000);},function(){if(delay){clearTimeout(delay);$('#helpinfo'+i).hide('slow');}});
node.css('cursor','help').click(function(){clickHelp(i);}).hover(function(){hoverOnHelp(i);},function(){hoverOffHelp(i);});
} else {
if (node.html() && (name!='tr' || node.children('td:first').html())) node.css('cursor','help').click(function(){$('#helpinfo'+i).toggle('slow');clearTimeout(delay);delay=null;}).hover(function(){delay=setTimeout(function(){$('#helpinfo'+i).show('slow');},1000);},function(){if(delay){clearTimeout(delay);$('#helpinfo'+i).hide('slow');}});
if (node.html() && (name!='tr' || node.children('td:first').html())) node.css('cursor','help').click(function(){clickHelp(i);}).hover(function(){hoverOnHelp(i);},function(){hoveOffHelp(i);});
}
});
});