Skip to content
Snippets Groups Projects
Commit 7b3acb17 authored by srosse's avatar srosse
Browse files

OO-4525: replace the jQuery UI tooltip by the bootstrap

Replace the jQuery UI tooltip in single by the implementation of
bootstrap as they don't work with the latest browsers
parent d87bde95
No related branches found
No related tags found
No related merge requests found
...@@ -659,7 +659,7 @@ public class IFrameDeliveryMapper implements Mapper { ...@@ -659,7 +659,7 @@ public class IFrameDeliveryMapper implements Mapper {
public void appendGlossary() { public void appendGlossary() {
appendStaticJs("js/openolat/glossaryhighlighter.js"); appendStaticJs("js/openolat/glossaryhighlighter.js");
appendStaticJs("js/jquery/ui/jquery-ui-1.11.4.custom.tooltip.min.js"); appendStaticJs("bootstrap/javascripts/bootstrap/tooltip.js");
appendStaticCss("js/openolat/glossaryhighlighter.css", "textmarkercss"); appendStaticCss("js/openolat/glossaryhighlighter.css", "textmarkercss");
} }
......
...@@ -3,4 +3,42 @@ ...@@ -3,4 +3,42 @@
.o_tm_yellow { background-color: #FFFF66; } .o_tm_yellow { background-color: #FFFF66; }
.o_tm_blue { background-color: #33FFFF; } .o_tm_blue { background-color: #33FFFF; }
.o_tm_red { background-color: #FF3333; } .o_tm_red { background-color: #FF3333; }
.o_tm_green { background-color: #99FF00; } .o_tm_green { background-color: #99FF00; }
\ No newline at end of file
.tooltip {
position: absolute;
z-index: 10000;
display: block;
visibility: visible;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0 0 0;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #aaa;
}
.tooltip-inner {
max-width: 400px;
padding: 3px 8px;
text-align: left;
text-decoration: none;
background-color: white;
border-radius: 5px;
border: 2px solid #aaa;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
\ No newline at end of file
...@@ -190,6 +190,7 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){ ...@@ -190,6 +190,7 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){
//bootstrap tooltip //bootstrap tooltip
html: true, html: true,
container:'body', container:'body',
placement: 'bottom',
title: function() { title: function() {
var elem = jQuery(this); var elem = jQuery(this);
jQuery.ajax(glossUrl).always(function(data, textStatus, jqXHR) { jQuery.ajax(glossUrl).always(function(data, textStatus, jqXHR) {
...@@ -197,17 +198,10 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){ ...@@ -197,17 +198,10 @@ function o_tm_addExtToolTip(glossaryMainTerm, highlightString, occurrence){
(elem.attr('data-original-title') == null || elem.attr('data-original-title') == "")) { (elem.attr('data-original-title') == null || elem.attr('data-original-title') == "")) {
jQuery('.tooltip').remove(); jQuery('.tooltip').remove();
elem.attr('data-original-title', data); elem.attr('data-original-title', data);
elem.tooltip('show'); var tool = elem.tooltip('show');
tool.data('bs.tooltip').tip().addClass('o_gloss_tooltip');
} }
}); });
},
//jquery tooltip
items: '#' + targetId,
content: function(evt, ui) {
var elem = jQuery(this);
jQuery.ajax(glossUrl).always(function(data, textStatus, jqXHR) {
elem.tooltip('option', 'content', data).tooltip('open');
});
} }
}); });
} }
......
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