diff --git a/style.css b/style.css index 3dff98f..d98777b 100644 --- a/style.css +++ b/style.css @@ -17,6 +17,9 @@ /****************** Recent content ********************/ @import url(recent-content.css); +/****************** bootstrap tooltips ********************/ +@import url(tooltip.css); + /****************** FIM cabecalho azul ****************/ /****************** Block Agenda ********************/ diff --git a/theme.js b/theme.js index de4ef29..07f090e 100644 --- a/theme.js +++ b/theme.js @@ -179,7 +179,32 @@ $('#link-buscar').click(function(e) { }); } + function add_top_tooltips(){ + $('#content span[title]').attr("data-toggle","tooltip"); + + $('[data-toggle="tooltip"]').tooltip({ + position: { + my: "top-82", + at: "center" + }, + tooltipClass: "ui-tooltip-top" + }); + } + + function add_bottom_tooltips(){ + $('#content span[title]').attr("data-toggle","tooltip"); + + $('[data-toggle="tooltip"]').tooltip({ + position: { + my: "bottom+82", + at: "center" + }, + tooltipClass: "ui-tooltip-bottom" + }); + } + $(document).ready(function(){ + add_top_tooltips(); set_events(); move_article_buttons(); add_link_to_article_div(); diff --git a/tooltip.css b/tooltip.css new file mode 100644 index 0000000..9f89e2e --- /dev/null +++ b/tooltip.css @@ -0,0 +1,37 @@ +.ui-tooltip { + position: relative; + z-index: 1070; + font-family: Arial, sans-serif; + font-size: 13px; + background: #172638; + color: white; + padding: 15px 10px 15px 20px; + border: 0px !important; +} + +.ui-tooltip-bottom:after { + bottom: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + border-bottom-color: #172638; + border-width: 6px; + margin-left: -6px; +} + +.ui-tooltip-top:after { + top: 100%; + left: 50%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + border-top-color: #172638; + border-width: 6px; + margin-left: -6px; +} + -- libgit2 0.21.2