scrivito_facebook_widget 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe085dfab1deb6d75139fa8c1d70a5b4ccaf3b9a
4
- data.tar.gz: f43ec2c54b2b9f1cad5c59fb5092b02ca148fa3f
3
+ metadata.gz: 2021ce80cf630eb3e91b1a5f7ce4013cfaa2ef34
4
+ data.tar.gz: d8053fc0a58a8d8edeeefaf1e4ea857c4c8274ac
5
5
  SHA512:
6
- metadata.gz: fd7711cdb0f06d20360884685e2a848657bed1b180bf4d0551171920588993980c99855cc04f2e8a2309078712bf7278d86074e188bd29241c1a334a37b12203
7
- data.tar.gz: 81d57975186b7054c9a51a5ed96a3a4db29230938c855c2d34babebc43002bdd5613c31adcfb8616759ca631b27268a07452b81eb744f299ebd5c5df638de263
6
+ metadata.gz: 6cccce61e042137120d0b74edd2a5bfdc0890ab0637b8b19f7c7f02b0596cde6bbc8254724ffb7fb05e93c8d935b19a97062b93d0e353e16007d170e2f59d692
7
+ data.tar.gz: 1f449d44e4b223774fd34aed8846d611ac6f752e6b1ab62011c2826d3fed8b8df7b0258b38a00f25389c662b72c6a42aa086b034c256b54b6a69ecc008712ff9
data/README.md CHANGED
@@ -1,23 +1,25 @@
1
1
  # ScrivitoFacebookWidget
2
2
 
3
- A Widget for scrivito to insert a Facebok stream. You can add a page by its url, a video or a single post.
3
+ A Scrivito widget that inserts a Facebook stream into a page. You can add a Facebook page by its URL, or a video or a single post by its ID.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add to your gemfile
7
+ Add this line to your application's Gemfile:
8
8
 
9
9
  gem 'scrivito_facebook_widget'
10
10
 
11
- Add to your Javascript mainfest
11
+ Add this line to your application stylesheet manifest:
12
12
 
13
13
  //= require scrivito_facebook_widget
14
14
 
15
- ## Facebook App id
15
+ ## Facebook App ID
16
16
 
17
- Normaly you will see a warning, that no app id is set. This is no problem as long as you do not want to use private content on you webpage.
17
+ When using this widget, a warning is displayed in the browser console, saying that no app ID is set. This is no problem as long as you are not using private content from Facebook on your web page.
18
18
 
19
- Iy you want to remove this warning, you have to set a global variable in javascript at the beginning of you document.
19
+ To remove this warning, just set a global JavaScript variable at the top of the page:
20
20
 
21
21
  ```javascript
22
22
  var fbAppId = yourAppId
23
- ```
23
+ ```
24
+
25
+ The App ID can be generated using Facebook's developer tools.
data/Rakefile CHANGED
@@ -16,9 +16,6 @@ end
16
16
 
17
17
 
18
18
 
19
- load 'rails/tasks/statistics.rake'
20
-
21
-
22
19
 
23
20
  Bundler::GemHelper.install_tasks
24
21
 
@@ -1,14 +1,22 @@
1
1
  $(function() {
2
- $('body').prepend('<div id="fb-root"></div>');
3
-
4
- $.getScript('//connect.facebook.net/en_US/sdk.js', function(){
2
+ $('body').prepend("<div id='fb-root'></div>");
3
+ window.fbAsyncInit = function() {
5
4
  FB.init({
6
- appId: ("fbAppId" in window) ? window.fbAppId : '',
7
- version: 'v2.3'
5
+ appId : ("fbAppId" in window) ? window.fbAppId : '',
6
+ xfbml : true,
7
+ version : 'v2.5'
8
8
  });
9
9
 
10
10
  scrivito.on('content', function() {
11
11
  FB.XFBML.parse();
12
12
  });
13
- });
14
- });
13
+ };
14
+
15
+ (function(d, s, id){
16
+ var js, fjs = d.getElementsByTagName(s)[0];
17
+ if (d.getElementById(id)) {return;}
18
+ js = d.createElement(s); js.id = id;
19
+ js.src = "//connect.facebook.net/en_US/sdk.js";
20
+ fjs.parentNode.insertBefore(js, fjs);
21
+ }(document, 'script', 'facebook-jssdk'));
22
+ });
@@ -1,25 +1,32 @@
1
1
  <%= scrivito_details_for 'Type' do %>
2
2
  <%= scrivito_toggle_button_editor widget, :type %>
3
3
  <% end %>
4
+
4
5
  <%= scrivito_details_for 'Url' do %>
5
6
  <%= scrivito_tag :div, widget, :url %>
6
7
  <% end %>
8
+
7
9
  <%= scrivito_details_for 'More Options for type page' do %>
8
10
  <%= scrivito_details_for 'Max Width (max: 500; min: 180)' do %>
9
11
  <%= scrivito_tag :div, widget, :width %>
10
12
  <% end %>
13
+
11
14
  <%= scrivito_details_for 'Height (min: 70)' do %>
12
15
  <%= scrivito_tag :div, widget, :height %>
13
16
  <% end %>
17
+
14
18
  <%= scrivito_details_for 'Hide cover' do %>
15
19
  <%= scrivito_toggle_button_editor widget, :hide_cover %>
16
20
  <% end %>
21
+
17
22
  <%= scrivito_details_for 'Show faces' do %>
18
- <%= scrivito_toggle_button_editor widget, :hide_cover %>
23
+ <%= scrivito_toggle_button_editor widget, :show_facepile %>
19
24
  <% end %>
25
+
20
26
  <%= scrivito_details_for 'Show latest posts' do %>
21
27
  <%= scrivito_toggle_button_editor widget, :show_posts %>
22
28
  <% end %>
29
+
23
30
  <%= scrivito_details_for 'Hide cta' do %>
24
31
  <%= scrivito_toggle_button_editor widget, :hide_cta %>
25
32
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoFacebookWidget
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_facebook_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-14 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: scrivito
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +24,6 @@ dependencies:
38
24
  - - ">="
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
27
  description: A widget for scrivito to create a facebook stream.
56
28
  email:
57
29
  - support@scrivito.com