diff --git a/src/main/webapp/static/js/openolat/glossaryhighlighter.css b/src/main/webapp/static/js/openolat/glossaryhighlighter.css index d23dab0a94e94a8676f2f591114199d20531e999..9fd9eacf73f59798abdc9cffcbf07fef8b6339d3 100644 --- a/src/main/webapp/static/js/openolat/glossaryhighlighter.css +++ b/src/main/webapp/static/js/openolat/glossaryhighlighter.css @@ -12,17 +12,88 @@ visibility: visible; } +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} + +.tooltip.right { + margin-top: 3px; + padding: 0 5px; +} + .tooltip.bottom { margin-top: 3px; padding: 5px 0 0 0; } +.tooltip.left { + margin-top: -3px; + padding: 0 5px; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #aaa; +} + +.tooltip.top-left .tooltip-arrow { + bottom: 0; + right: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #aaa; +} + +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #aaa; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #aaa; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #aaa; +} + .tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #aaa; + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #aaa; +} + +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #aaa; +} + +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #aaa; } .tooltip-inner { diff --git a/src/main/webapp/static/js/openolat/glossaryhighlighter.js b/src/main/webapp/static/js/openolat/glossaryhighlighter.js index d502d19a4eda80686635323556ed7e2e706ef4e2..1b63ca8471eb64f1272d3059031c68a09947123d 100644 --- a/src/main/webapp/static/js/openolat/glossaryhighlighter.js +++ b/src/main/webapp/static/js/openolat/glossaryhighlighter.js @@ -190,7 +190,7 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){ //bootstrap tooltip html: true, container:'body', - placement: 'bottom', + placement: 'auto bottom', title: function() { var elem = jQuery(this); jQuery.ajax(glossUrl).always(function(data, textStatus, jqXHR) {