share_buttons 1.0.0 → 1.1.0
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 +22 -1
- data/lib/share_buttons/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48ddf4aed372d084e4fa5e3178c0a81654ab68d7
|
4
|
+
data.tar.gz: f647c4f310618ddda0a25d980bcdb1f36d17b006
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 197612915bf4fedfb6bdd2fbe9cef27aebc33872d8a96e8b4750bedfc56f23f6ff4d49b4c55bd7b3e49bb6f2407e3278c839a403903b8766a44cda1d1e1d5847
|
7
|
+
data.tar.gz: cd365c831279ea569ce960c23ae8e6b3679990446207a76b424b575ddbc8a857d43de316ebc165db1e08fba4eacdefed607b8d3693388b910e5e4c54037e2c20
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ the associated javascript to run.
|
|
14
14
|
Add to your Gemfile and `bundle install` :
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
gem 'share_buttons'
|
17
|
+
gem 'share_buttons'
|
18
18
|
```
|
19
19
|
|
20
20
|
Use the included generator to generate the initializer file and the customizable views :
|
@@ -68,6 +68,27 @@ default but you can pass a custom URL as follow
|
|
68
68
|
Useful if you want to handle when user cancelled dialog (e.g. close popup) or
|
69
69
|
successfully shared on his wall (e.g. track sharing hits)
|
70
70
|
|
71
|
+
### Initializing plugins manually (async modals & co)
|
72
|
+
|
73
|
+
Sometimes you need to manually initialize the javascript plugins, like when the
|
74
|
+
buttons where added to the page after the actual page loading, in a modal or
|
75
|
+
in some other way.
|
76
|
+
|
77
|
+
All you need to do, is find the newly loaded container, and initialize the
|
78
|
+
`.shareButtons()` plugin on it. This way, all the contained share buttons will
|
79
|
+
be initialized.
|
80
|
+
|
81
|
+
```javascript
|
82
|
+
// Let's imagine you're loading a modal through ajax
|
83
|
+
$.get('/lodal/modal').then(function(response) {
|
84
|
+
$response = $(response);
|
85
|
+
$response.appendTo('body').modal();
|
86
|
+
// Now that you have the jQuery object containing the share buttons,
|
87
|
+
// just initialize the plugin on it
|
88
|
+
$response.shareButtons();
|
89
|
+
})
|
90
|
+
```
|
91
|
+
|
71
92
|
## Licence
|
72
93
|
|
73
94
|
This project rocks and uses MIT-LICENSE.
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: share_buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valentin Ballestrino
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.0'
|
20
|
+
- - "<="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '4.0'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: zeroclipboard-rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
114
|
version: '0'
|
109
115
|
requirements: []
|
110
116
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.6.8
|
112
118
|
signing_key:
|
113
119
|
specification_version: 4
|
114
120
|
summary: Simple social share buttons helpers for Rails.
|