Skip to content
Snippets Groups Projects
Commit 82479659 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

fixed errors, removed unused code

parent 4ceb886e
No related branches found
No related tags found
No related merge requests found
......@@ -7,29 +7,3 @@
var timeout = null;
STUDIP.Tooltip.threshold = 6;
/*
$(document).on('mouseenter mouseleave focusin focusout', '[data-tooltip],.tooltip:has(.tooltip-content)', function(event) {
let data = $(this).data();
const visible = event.type === 'mouseenter' || event.type === 'focusin';
const offset = $(this).offset();
const x = offset.left + $(this).outerWidth(true) / 2;
const y = offset.top;
const delay = data.tooltipDelay ?? 300;
if (!data.tooltipObject) {
data.tooltipObject = new STUDIP.Tooltip(x, y, $(this).children('.tooltip-content').first().html());
}
if (visible) {
// If tooltip has already been created, update its position.
// This is necessary if the surrounding content is scrollable AND has
// been scrolled. Otherwise, the tooltip would appear at its previous
// and now wrong location.
data.tooltipObject.position(x, y);
}
}).on('mouseenter focusin', '.studip-tooltip', () => {
clearTimeout(timeout);
}).on('mouseleave focusout', '.studip-tooltip', function() {
$(this).hide();
});
*/
......@@ -43,7 +43,7 @@
bottom: 100%;
display: inline-block;
left: 50%;
margin-left: -($grid-element-width) / 2 - 10px;
margin-left: - calc($grid-element-width / 2) - 10px;
width: $grid-element-width;
}
}
<span class="tooltip tooltip-icon <? if ($important) echo 'tooltip-important'; ?>"
tabindex="0">
tabindex="0" aria-label="<?= $html ? kill_format($text) : htmlReady($text) ?>">
<span class="tooltip-content"><?= $html ? $text : htmlReady($text) ?></span>
</span>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment