awesome_tooltip 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -2
- data/app/assets/javascripts/awesome_tooltip/tooltip.js +2 -2
- data/lib/awesome_tooltip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dad2a5d9423fd95f2ccad59d86e6332128715adb7a10c861ba410e80b05d6367
|
|
4
|
+
data.tar.gz: b4563f9fe7721d69c5d3b63c103a3317ac766d7428de69d93f4f403e249c4f9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a962cc05ca20cc55d82e975a4fb9aa02b5b4f22fe2bfc7930b5805e0540245e1a76c96e6b0690959e8784e106775e5b93321de0ea5ec52fdf144fbb006ae7fd7
|
|
7
|
+
data.tar.gz: 2d616393b9d932ee4fa5cd592d6ba7abcbc53013b764fc0e8db418562e3faa5bad5208f2758833667f508f94be68a415bcbd086a84535c4f0fb9aea9e66e5657
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://travis-ci.com/BogdanBusko/awesome_tooltip)
|
|
3
3
|
[](https://codeclimate.com/github/BogdanBusko/awesome_tooltip/maintainability)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Lightwer get for loading tooltips on your page without preloading this data on page. With this gem you can load static template and templates with data from database.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
Add this line to your application's Gemfile:
|
|
@@ -52,6 +52,21 @@ And now just add template.
|
|
|
52
52
|
$ touch app/awesome_tooltips/template.html.erb
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
Also you can update js configurations
|
|
56
|
+
```javascript
|
|
57
|
+
AwesomeTooltip({
|
|
58
|
+
tooltipPath: '/your/custom/path/',
|
|
59
|
+
delay: 2000,
|
|
60
|
+
location: 'bottom'
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
| Option | Default value | Type |
|
|
65
|
+
|--------|---------------|------|
|
|
66
|
+
| tooltipPath | /tooltip/ | String |
|
|
67
|
+
| hideDelay | 1500 | Integer |
|
|
68
|
+
| location | top(also available bottom) | String |
|
|
69
|
+
|
|
55
70
|
## Usage
|
|
56
71
|
|
|
57
72
|
To start using AwesomeTooltip add following attributes to HTML element
|
|
@@ -59,7 +74,7 @@ To start using AwesomeTooltip add following attributes to HTML element
|
|
|
59
74
|
<div class="awesome_tooltip"
|
|
60
75
|
data-template="user_template"
|
|
61
76
|
data-object="user-1"
|
|
62
|
-
data-
|
|
77
|
+
data-location="bottom">John Doe</div>
|
|
63
78
|
```
|
|
64
79
|
|
|
65
80
|
Also you can use static templates
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var showDelayTimeId;
|
|
5
5
|
var config = {
|
|
6
6
|
tooltipPath: "/tooltip/",
|
|
7
|
-
|
|
7
|
+
hideDelay: 1500,
|
|
8
8
|
location: "top"
|
|
9
9
|
};
|
|
10
10
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
if(tooltip) {
|
|
40
40
|
tooltip.remove();
|
|
41
41
|
}
|
|
42
|
-
}, config.
|
|
42
|
+
}, config.hideDelay);
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|