mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/6466] Removed link tooltip
It wasn't being used anymore and didn't work anymore. PHPBB3-6466
This commit is contained in:
parent
faa5ab5899
commit
795776db4b
1 changed files with 5 additions and 56 deletions
|
@ -14,47 +14,9 @@ phpBB Development Team:
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var head_text, tooltip_mode, tooltips;
|
var head_text, tooltips;
|
||||||
tooltips = [];
|
tooltips = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable tooltip replacements for links
|
|
||||||
*/
|
|
||||||
function enable_tooltips_link(id, headline, sub_id) {
|
|
||||||
var links, i, hold;
|
|
||||||
|
|
||||||
head_text = headline;
|
|
||||||
|
|
||||||
if (!document.getElementById || !document.getElementsByTagName) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
hold = document.createElement('span');
|
|
||||||
hold.id = '_tooltip_container';
|
|
||||||
hold.setAttribute('id', '_tooltip_container');
|
|
||||||
hold.style.position = 'absolute';
|
|
||||||
|
|
||||||
document.getElementsByTagName('body')[0].appendChild(hold);
|
|
||||||
|
|
||||||
if (id === null) {
|
|
||||||
links = document.getElementsByTagName('a');
|
|
||||||
} else {
|
|
||||||
links = document.getElementById(id).getElementsByTagName('a');
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < links.length; i++) {
|
|
||||||
if (sub_id) {
|
|
||||||
if (links[i].id.substr(0, sub_id.length) === sub_id) {
|
|
||||||
prepare(links[i]);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
prepare(links[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tooltip_mode = 'link';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable tooltip replacements for selects
|
* Enable tooltip replacements for selects
|
||||||
* @param {string} id ID tag of select
|
* @param {string} id ID tag of select
|
||||||
|
@ -93,8 +55,6 @@ function enable_tooltips_select(id, headline, sub_id) {
|
||||||
prepare($this);
|
prepare($this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
tooltip_mode = 'select';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,10 +86,6 @@ function prepare($element) {
|
||||||
tooltips[$element.attr('data-id')] = tooltip;
|
tooltips[$element.attr('data-id')] = tooltip;
|
||||||
$element.on('mouseover', show_tooltip);
|
$element.on('mouseover', show_tooltip);
|
||||||
$element.on('mouseout', hide_tooltip);
|
$element.on('mouseout', hide_tooltip);
|
||||||
|
|
||||||
if (tooltip_mode === 'link') {
|
|
||||||
$element.onmousemove = locate;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -186,17 +142,10 @@ function locate($element) {
|
||||||
$element = $element.parent();
|
$element = $element.parent();
|
||||||
offset = $element.offset();
|
offset = $element.offset();
|
||||||
|
|
||||||
if (tooltip_mode === 'link') {
|
$('#_tooltip_container').css({
|
||||||
$('#_tooltip_container').css({
|
top: offset.top + 30,
|
||||||
top: offset.top + 20,
|
left: offset.left - 205
|
||||||
left: offset.left - 20
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$('#_tooltip_container').css({
|
|
||||||
top: offset.top + 30,
|
|
||||||
left: offset.left - 205
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue