File tree 2 files changed +34
-14
lines changed 2 files changed +34
-14
lines changed Original file line number Diff line number Diff line change 14
14
/* limitations under the License. */
15
15
/* -------------------------------------------------------------------------- */
16
16
17
- define ( function ( require ) {
18
- // require('foundation.tooltip');
17
+ define ( function ( require ) {
19
18
//Replaces all class"tip" divs with an information icon that
20
19
//displays the tip information on mouseover.
21
20
var _setup = function ( context , position ) {
@@ -31,21 +30,16 @@ define(function(require) {
31
30
obj . removeClass ( 'tip' ) ;
32
31
var tip = obj . html ( ) ;
33
32
34
- var tip_classes = [ 'has-tip' ]
35
- if ( position ) {
36
- tip_classes . push ( position )
37
- }
38
- //replace the text with an icon and spans
39
- //obj.html('<span data-tooltip class="' + tip_classes.join(' ') + '" data-width="210" title="' + tip + '"><i class="fas fa-question-circle"></i></span>');
40
- obj . html ( '<span data-tooltip aria-haspopup="true" class="has-tip" data-disable-hover="false" title="' + $ . trim ( tip ) + '"><i class="fas fa-question-circle"></i></span>' ) ;
33
+ obj . html ( _html ( tip ) ) ;
41
34
} ) ;
42
-
43
- Foundation . reflow ( context , 'tooltip' ) ;
44
35
}
45
36
46
- var _html = function ( str ) {
47
- //return '<span data-tooltip class="" data-width="210" title="' + str + '"><i class="fas fa-question-circle"></i></span>'
48
- return '<span data-tooltip aria-haspopup="true" class="has-tip" data-disable-hover="false" title="' + $ . trim ( str ) + '"><i class="fas fa-question-circle"></i></span>' ;
37
+ var _html = function ( tip ) {
38
+ var html = '<div class="opennebula-tooltip">' +
39
+ '<i class="fas fa-question-circle"></i>' +
40
+ '<span class="opennebula-tooltiptext">' + $ . trim ( tip ) + '</span>' +
41
+ '</div>' ;
42
+ return html ;
49
43
}
50
44
51
45
return {
Original file line number Diff line number Diff line change 4
4
5
5
.fa-question-circle {
6
6
color : $medium-gray ;
7
+ }
8
+
9
+ /* Tooltip container */
10
+ .opennebula-tooltip {
11
+ position : relative ;
12
+ display : inline-block ;
13
+ }
14
+
15
+ /* Tooltip text */
16
+ .opennebula-tooltip .opennebula-tooltiptext {
17
+ visibility : hidden ;
18
+ width : 15em ;
19
+ background-color : $bold-black ;
20
+ color : $white ;
21
+ text-align : center ;
22
+ padding : 5px ;
23
+ border-radius : 6px ;
24
+ position : absolute ;
25
+ z-index : 1 ;
26
+ font-size : $helptext-font-size ;
27
+ font-weight : bold ;
28
+ }
29
+
30
+ /* Show the tooltip text when you mouse over the tooltip container */
31
+ .opennebula-tooltip :hover .opennebula-tooltiptext {
32
+ visibility : visible ;
7
33
}
You can’t perform that action at this time.
0 commit comments