Commit 4a8f075a31e2c3bf3d60b5192883b86be491a113
Exists in
master
and in
9 other branches
Merge branch 'tooltips' of https://gitlab.com/softwarepublico/noosfero-spb-theme
Conflicts: theme.js
Showing
3 changed files
with
65 additions
and
0 deletions
Show diff stats
style.css
@@ -17,6 +17,9 @@ | @@ -17,6 +17,9 @@ | ||
17 | /****************** Recent content ********************/ | 17 | /****************** Recent content ********************/ |
18 | @import url(recent-content.css); | 18 | @import url(recent-content.css); |
19 | 19 | ||
20 | +/****************** bootstrap tooltips ********************/ | ||
21 | +@import url(tooltip.css); | ||
22 | + | ||
20 | /****************** FIM cabecalho azul ****************/ | 23 | /****************** FIM cabecalho azul ****************/ |
21 | 24 | ||
22 | /****************** Block Agenda ********************/ | 25 | /****************** Block Agenda ********************/ |
theme.js
@@ -185,7 +185,32 @@ $('#link-buscar').click(function(e) { | @@ -185,7 +185,32 @@ $('#link-buscar').click(function(e) { | ||
185 | $('.ratings-list a.icon-arrow-right-p').html('veja todos os relatos'); | 185 | $('.ratings-list a.icon-arrow-right-p').html('veja todos os relatos'); |
186 | } | 186 | } |
187 | 187 | ||
188 | + function add_top_tooltips(){ | ||
189 | + $('#content span[title]').attr("data-toggle","tooltip"); | ||
190 | + | ||
191 | + $('[data-toggle="tooltip"]').tooltip({ | ||
192 | + position: { | ||
193 | + my: "top-82", | ||
194 | + at: "center" | ||
195 | + }, | ||
196 | + tooltipClass: "ui-tooltip-top" | ||
197 | + }); | ||
198 | + } | ||
199 | + | ||
200 | + function add_bottom_tooltips(){ | ||
201 | + $('#content span[title]').attr("data-toggle","tooltip"); | ||
202 | + | ||
203 | + $('[data-toggle="tooltip"]').tooltip({ | ||
204 | + position: { | ||
205 | + my: "bottom+82", | ||
206 | + at: "center" | ||
207 | + }, | ||
208 | + tooltipClass: "ui-tooltip-bottom" | ||
209 | + }); | ||
210 | + } | ||
211 | + | ||
188 | $(document).ready(function(){ | 212 | $(document).ready(function(){ |
213 | + add_top_tooltips(); | ||
189 | set_events(); | 214 | set_events(); |
190 | move_article_buttons(); | 215 | move_article_buttons(); |
191 | add_link_to_article_div(); | 216 | add_link_to_article_div(); |
@@ -0,0 +1,37 @@ | @@ -0,0 +1,37 @@ | ||
1 | +.ui-tooltip { | ||
2 | + position: relative; | ||
3 | + z-index: 1070; | ||
4 | + font-family: Arial, sans-serif; | ||
5 | + font-size: 13px; | ||
6 | + background: #172638; | ||
7 | + color: white; | ||
8 | + padding: 15px 10px 15px 20px; | ||
9 | + border: 0px !important; | ||
10 | +} | ||
11 | + | ||
12 | +.ui-tooltip-bottom:after { | ||
13 | + bottom: 100%; | ||
14 | + left: 50%; | ||
15 | + border: solid transparent; | ||
16 | + content: " "; | ||
17 | + height: 0; | ||
18 | + width: 0; | ||
19 | + position: absolute; | ||
20 | + border-bottom-color: #172638; | ||
21 | + border-width: 6px; | ||
22 | + margin-left: -6px; | ||
23 | +} | ||
24 | + | ||
25 | +.ui-tooltip-top:after { | ||
26 | + top: 100%; | ||
27 | + left: 50%; | ||
28 | + border: solid transparent; | ||
29 | + content: " "; | ||
30 | + height: 0; | ||
31 | + width: 0; | ||
32 | + position: absolute; | ||
33 | + border-top-color: #172638; | ||
34 | + border-width: 6px; | ||
35 | + margin-left: -6px; | ||
36 | +} | ||
37 | + |