1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-27 00:05:18 +02:00

Link types help

This commit is contained in:
Jakub Vrana
2013-07-19 16:24:59 -07:00
parent e8e3c5789b
commit 9a7805c318
2 changed files with 4 additions and 8 deletions

View File

@@ -632,13 +632,9 @@ function helpMouseover(el, event, text, side) {
help.innerHTML = text;
jush.highlight_tag([ help ]);
alterClass(help, 'hidden');
var top = 0, left = 0, parent = target;
do {
top += parent.offsetTop;
left += parent.offsetLeft;
} while (parent = parent.offsetParent);
help.style.top = (top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
help.style.left = (left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
var rect = target.getBoundingClientRect();
help.style.top = (rect.top - (side ? (help.offsetHeight - target.offsetHeight) / 2 : help.offsetHeight)) + 'px';
help.style.left = (rect.left - (side ? help.offsetWidth : (help.offsetWidth - target.offsetWidth) / 2)) + 'px';
}
}