social-share-button 0.4.0 → 0.5.0

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: f07384bca069133009b4b28000b590d5a2738425
4
- data.tar.gz: fbd6819f29c4b9de1b6fafed9adaa3cd886ad202
3
+ metadata.gz: 9dd97baeefb3f07baa960dace3b1d4e27aa0ce1f
4
+ data.tar.gz: 2252a07b7fc893bc4a98fc8e385aa284f9063edc
5
5
  SHA512:
6
- metadata.gz: fa4dcb1ca1614a57a94834c2fbd96dcd86468da214dfdbf77384e39b99230f64c260c99248fa2cfd79074320668f5eaa67f287517da0491a9e3dabb2e50a9ec2
7
- data.tar.gz: b4c7675ca07d27d2c7b6ad7124067a7dcf1552159fc9409358913abec4ff97940bc89e233f06a859079318ca82366b4cd7ec7489ff35b558a9eda3de7f40b356
6
+ metadata.gz: 2def706044feb4a99dc4cbc961fb798b39d5e31ac50a7e534d291ab8fceca97fbc9f618074bf5865469c9308ae0cc8c8cafe4e68a6d71c0b44d9e653dc8e6ad3
7
+ data.tar.gz: 04b2787745397d3936142093654fb5fc6ecf9c4a39ef5a4502b0ae90d9fec8276c83ef4c8cad17e9ba4c04b67ab603f2c815e84135d3c39619baf5d78f0cecf3
@@ -1,6 +1,10 @@
1
+ == 0.5.0
2
+
3
+ * Fix QRCode WeChat typo error.
4
+
1
5
  == 0.4.0
2
6
 
3
- * QRCode for Wechat share.
7
+ * QRCode for WeChat share.
4
8
 
5
9
  == 0.3.4
6
10
 
@@ -11,7 +15,7 @@
11
15
  * New SVG icon, new style.
12
16
  * Removed `tqq renren kaixin001 baidu plurk` support.
13
17
  * Share with popup window.
14
- * Add Weixin (Weichat).
18
+ * Add Weixin (WeChat).
15
19
 
16
20
  == 0.2.1
17
21
 
data/README.md CHANGED
@@ -18,7 +18,7 @@ This is a gem to helper you quick create a share feature in you Rails apps.
18
18
  * Pinterest
19
19
  * Email
20
20
  * LinkedIn
21
- * Weichat (Weixin)
21
+ * WeChat (Weixin)
22
22
  * Vkontakte
23
23
 
24
24
  ## Screenshot
@@ -64,7 +64,7 @@ You need add require css,js file in your app assets files:
64
64
 
65
65
  ```
66
66
  #= require social-share-button
67
- #= require social_share_button/weichat # if you need use Weichat
67
+ #= require social_share_button/wechat # if you need use WeChat
68
68
  ```
69
69
 
70
70
  `app/assets/stylesheets/application.scss`
@@ -1,5 +1,5 @@
1
1
  <svg width="256px" height="256px" viewBox="3153 111 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
- <desc>Weichat (Weixin)</desc>
2
+ <desc>WeChat (Weixin)</desc>
3
3
  <defs></defs>
4
4
  <g id="weixin" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(3153.000000, 111.000000)">
5
5
  <rect id="bg" fill="#44AB12" x="0" y="0" width="256" height="256" rx="40"></rect>
@@ -45,11 +45,11 @@ window.SocialShareButton =
45
45
  SocialShareButton.openUrl("https://www.linkedin.com/shareArticle?mini=true&url=#{url}&title=#{title}&summary=#{desc}")
46
46
  when "vkontakte"
47
47
  SocialShareButton.openUrl("http://vk.com/share.php?url=#{url}&title=#{title}&image=#{img}")
48
- when "weichat"
49
- throw new Error("You should require social-share-button/weichat to your application.js") unless window.SocialShareWeichatButton
50
- window.SocialShareWeichatButton.qrcode
48
+ when "wechat"
49
+ throw new Error("You should require social-share-button/wechat to your application.js") unless window.SocialShareWeChatButton
50
+ window.SocialShareWeChatButton.qrcode
51
51
  header: $(el).attr('title')
52
- footer: $(el).data('weichat-footer')
52
+ footer: $(el).data('wechat-footer')
53
53
 
54
54
  when "tumblr"
55
55
  get_tumblr_extra = (param) ->
@@ -1,14 +1,14 @@
1
1
  #= require jquery.qrcode.min
2
2
 
3
- window.SocialShareWeichatButton =
3
+ window.SocialShareWeChatButton =
4
4
  init: (opts={}) ->
5
- $wDialog = "<div id='ss-weichat-dialog' class='ss-weichat-dialog'>
6
- <div class='weichat-popup-header'>
5
+ $wDialog = "<div id='ss-wechat-dialog' class='ss-wechat-dialog'>
6
+ <div class='wechat-popup-header'>
7
7
  <span>#{opts.header}</span>
8
- <a href='#' onclick='return false;' class='weichat-popup-close'>×</a>
8
+ <a href='#' onclick='return false;' class='wechat-popup-close'>×</a>
9
9
  </div>
10
- <div id='ss-weichat-dialog-qr' class='weichat-dialog-qr'></div>
11
- <div class='weichat-popup-footer'>
10
+ <div id='ss-wechat-dialog-qr' class='wechat-dialog-qr'></div>
11
+ <div class='wechat-popup-footer'>
12
12
  #{opts.footer}
13
13
  </div>
14
14
  </div>"
@@ -16,23 +16,23 @@ window.SocialShareWeichatButton =
16
16
  $("body").append($wDialog)
17
17
 
18
18
  bindEvents: ()->
19
- $wContainer = $("#ss-weichat-dialog")
20
- $wContainer.find(".weichat-popup-close").on "click", (e) ->
19
+ $wContainer = $("#ss-wechat-dialog")
20
+ $wContainer.find(".wechat-popup-close").on "click", (e) ->
21
21
  $wContainer.hide()
22
22
 
23
23
  qrcode: (opts={}) ->
24
- unless $("#ss-weichat-dialog").length
24
+ unless $("#ss-wechat-dialog").length
25
25
  @init(opts)
26
26
  @bindEvents()
27
27
 
28
- $wBody = $('#ss-weichat-dialog-qr')
28
+ $wBody = $('#ss-wechat-dialog-qr')
29
29
  $wBody.empty()
30
30
  $wBody.qrcode
31
31
  width: 200
32
32
  height: 200
33
33
  text: location.href
34
34
 
35
- $wContainer = $("#ss-weichat-dialog")
35
+ $wContainer = $("#ss-wechat-dialog")
36
36
  top = ($(window).height() - $wContainer.height()) / 2
37
37
  top = 100 if top < 100
38
38
  left = ($(window).width() - $wContainer.width()) / 2
@@ -11,9 +11,43 @@ $size: 18px;
11
11
  }
12
12
 
13
13
  @each $site in twitter, facebook, google_bookmark, google_plus, weibo, qq,
14
- delicious, linkedin, tumblr, pinterest, douban, weichat, vkontakte, email {
14
+ delicious, linkedin, tumblr, pinterest, douban, wechat, vkontakte, email {
15
15
  .ssb-#{$site} {
16
16
  background-image: image-url('social-share-button/#{$site}.svg');
17
17
  }
18
18
  }
19
19
  }
20
+
21
+ .ss-wechat-dialog {
22
+ width: 270px;
23
+ height: 300px;
24
+ position: fixed;
25
+ background: #fff;
26
+ padding: 10px;
27
+ border: solid 1px #ddd;
28
+ z-index: 11001;
29
+ font-size: 12px;
30
+ line-height: 1.2em;
31
+
32
+ .wechat-dialog-qr {
33
+ text-align: center;
34
+ margin: 10px 0px;
35
+ }
36
+
37
+ .wechat-popup-close {
38
+ width: 16px;
39
+ height: 16px;
40
+ position: absolute;
41
+ right: 0px;
42
+ top: 10px;
43
+ color: #999;
44
+ text-decoration: none;
45
+ font-size: 16px;
46
+ }
47
+
48
+ .wechat-popup-footer {
49
+ text-align: left;
50
+ line-height: 22px;
51
+ color: #666;
52
+ }
53
+ }
@@ -1,3 +1,3 @@
1
1
  SocialShareButton.configure do |config|
2
- config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin weichat vkontakte)
2
+ config.allow_sites = %w(twitter facebook google_plus weibo qq douban google_bookmark delicious tumblr pinterest email linkedin wechat vkontakte)
3
3
  end
@@ -13,6 +13,6 @@ en:
13
13
  pinterest: Pinterest
14
14
  email: Email
15
15
  linkedin: Linkedin
16
- weichat: Weichat
17
- weichat_footer: Open your Weichat, click "Discover" button then click the "Scan QR Code" menu.
16
+ wechat: WeChat
17
+ wechat_footer: Open your WeChat, click "Discover" button then click the "Scan QR Code" menu.
18
18
  vkontakte: Vkontakte
@@ -13,6 +13,6 @@ fr:
13
13
  pinterest: Pinterest
14
14
  email: Email
15
15
  linkedin: Linkedin
16
- weichat: Weichat
17
- weichat_footer: Open your Weichat, click "Discover" button then click the "Scan QR Code" menu.
16
+ wechat: WeChat
17
+ wechat_footer: Open your WeChat, click "Discover" button then click the "Scan QR Code" menu.
18
18
  vkontakte: Vkontakte
@@ -13,6 +13,6 @@
13
13
  pinterest: Pinterest
14
14
  email: Email
15
15
  linkedin: Linkedin
16
- weichat: 微信
17
- weichat_footer: 打开微信,点击底部的“发现”,<br/> 使用“扫一扫”即可将网页分享至朋友圈。
16
+ wechat: 微信
17
+ wechat_footer: 打开微信,点击底部的“发现”,<br/> 使用“扫一扫”即可将网页分享至朋友圈。
18
18
  vkontakte: Vkontakte
@@ -13,6 +13,6 @@
13
13
  pinterest: Pinterest
14
14
  email: Email
15
15
  linkedin: Linkedin
16
- weichat: 微信
17
- weichat_footer: 打開微信,點擊底部的“發現”,<br/> 使用“掃一掃”即可將網頁分享至朋友圈。
16
+ wechat: 微信
17
+ wechat_footer: 打開微信,點擊底部的“發現”,<br/> 使用“掃一掃”即可將網頁分享至朋友圈。
18
18
  vkontakte: Vkontakte
@@ -21,7 +21,7 @@ module SocialShareButton
21
21
  # - pinterest
22
22
  # - email
23
23
  # - linkedin
24
- # - weichat
24
+ # - wechat
25
25
  # - vkontakte
26
26
  attr_accessor :allow_sites
27
27
 
@@ -14,7 +14,7 @@ module SocialShareButton
14
14
  extra_data = opts.select { |k, _| k.to_s.start_with?('data') } if name.eql?('tumblr')
15
15
  special_data = opts.select { |k, _| k.to_s.start_with?('data-' + name) }
16
16
 
17
- special_data["data-weichat-footer"] = t "social_share_button.weichat_footer" if name == "weichat"
17
+ special_data["data-wechat-footer"] = t "social_share_button.wechat_footer" if name == "wechat"
18
18
 
19
19
  link_title = t "social_share_button.share_to", :name => t("social_share_button.#{name.downcase}")
20
20
  html << link_to("", "#", { :rel => ["nofollow", rel],
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social-share-button
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -74,13 +74,12 @@ files:
74
74
  - app/assets/images/social-share-button/tumblr.svg
75
75
  - app/assets/images/social-share-button/twitter.svg
76
76
  - app/assets/images/social-share-button/vkontakte.svg
77
+ - app/assets/images/social-share-button/wechat.svg
77
78
  - app/assets/images/social-share-button/weibo.svg
78
- - app/assets/images/social-share-button/weichat.svg
79
79
  - app/assets/javascripts/jquery.qrcode.min.js
80
80
  - app/assets/javascripts/social-share-button.coffee
81
- - app/assets/javascripts/social-share-button/weichat.coffee
81
+ - app/assets/javascripts/social-share-button/wechat.coffee
82
82
  - app/assets/stylesheets/social-share-button.scss
83
- - app/assets/stylesheets/social-share-button/weichat.scss
84
83
  - lib/generators/social_share_button/install_generator.rb
85
84
  - lib/generators/social_share_button/templates/config/initializers/social_share_button.rb
86
85
  - lib/generators/social_share_button/templates/config/locales/social_share_button.en.yml
@@ -1,33 +0,0 @@
1
- .ss-weichat-dialog {
2
- width: 270px;
3
- height: 300px;
4
- position: fixed;
5
- background: #fff;
6
- padding: 10px;
7
- border: solid 1px #d8d8d8;
8
- z-index: 11001;
9
- font-size: 12px;
10
- line-height: 1.2em;
11
-
12
- .weichat-dialog-qr {
13
- text-align: center;
14
- margin: 10px 0px;
15
- }
16
-
17
- .weichat-popup-close {
18
- width: 16px;
19
- height: 16px;
20
- position: absolute;
21
- right: 10px;
22
- top: 8px;
23
- color: #999;
24
- text-decoration: none;
25
- font-size: 16px;
26
- }
27
-
28
- .weichat-popup-footer {
29
- text-align: left;
30
- line-height: 22px;
31
- color: #666;
32
- }
33
- }