aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts
diff options
context:
space:
mode:
authorRon Lucke <lucke@elan-ev.de>2025-01-15 11:36:40 +0000
committerRon Lucke <lucke@elan-ev.de>2025-01-15 11:36:40 +0000
commit40cf00d385e5d9810327e1f2b0e1f92ef55e1726 (patch)
tree96faa2b7748b2cb5a199903e0b7c4fdf3bf43744 /resources/assets/javascripts
parent770db728b5bc8ba01a55c9ea49bb9f3edcb1c4de (diff)
Fehler bei Hochkontrastmodus in der Kopfzeile
Closes #5027 Merge request studip/studip!3829
Diffstat (limited to 'resources/assets/javascripts')
-rw-r--r--resources/assets/javascripts/bootstrap/tooltip.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/assets/javascripts/bootstrap/tooltip.js b/resources/assets/javascripts/bootstrap/tooltip.js
index 4b17cb0..0792f5a 100644
--- a/resources/assets/javascripts/bootstrap/tooltip.js
+++ b/resources/assets/javascripts/bootstrap/tooltip.js
@@ -11,11 +11,13 @@ STUDIP.Tooltip.threshold = 6;
$(document).on('mouseenter mouseleave focusin focusout', '[data-tooltip],.tooltip:has(.tooltip-content)', function(event) {
let data = $(this).data();
+ const inTopBar = $(this).parents('#top-bar').length > 0;
const visible = ['mouseenter', 'focusin'].includes(event.type);
const offset = $(this).offset();
const x = offset.left + $(this).outerWidth(true) / 2;
- const y = offset.top;
+ const y = inTopBar ? offset.top + 160 : offset.top;
const delay = data.tooltipDelay ?? 300;
+ const tooltipClasses = inTopBar ? 'studip-tooltip studip-tooltip-top' : '';
let content;
let tooltip;
@@ -38,7 +40,7 @@ $(document).on('mouseenter mouseleave focusin focusout', '[data-tooltip],.toolti
$(this).attr('title', null);
$(this).attr('data-tooltip', content);
- tooltip = new STUDIP.Tooltip(x, y, content);
+ tooltip = new STUDIP.Tooltip(x, y, content, tooltipClasses);
data.tooltipObject = tooltip;