social_stream-linkser 2.0.0 → 2.1.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: 1ebd749025d733abfc7417e4d3670fc022b6d934
4
- data.tar.gz: 27a23f00c899119856431018524d926cb34c1449
3
+ metadata.gz: 03751e000a115f1b99f96924ae257ad6f1827c71
4
+ data.tar.gz: f51eedab516701b1f4c8aac209f2ef8e0d002ce1
5
5
  SHA512:
6
- metadata.gz: acce60c76d699113786f00751859d423548e09e3e5cbb9e44653893aad02ca3ac665dad9709eabac5fefc82fbcee07c3b0d3a0ef81f2c54bddf6e87cabb7d169
7
- data.tar.gz: ccb16bb5d61ea0030a5d2bdc2f7c860e915a6ec065024747e5175e96a760a24b0f09012af787412719c4d8980fa1d83822d07974038f4a2f4b87c0ae76765c2e
6
+ metadata.gz: 900dfeadd7d5819a350c6607a955623dcd4d0fa338bda0f7a9984acc5f9f8da74de891ad7925000e73a9c4b17256ffa8d8484cd6391e52859e5d15974fa8d14a
7
+ data.tar.gz: 4f1e6ea097102eef66eb18a91fccb673f7a4a4e870dde476c114e4b2addb33fba253a09dd0ac93769760b8c4933e1832193c9a8948be644bd412c1c9b41efbd4
@@ -1,6 +1,8 @@
1
+ //= require social_stream/callback
1
2
  //= require social_stream/wall
2
3
 
3
4
  SocialStream.Linkser.Wall = (function(SS, $) {
5
+ var callback = new SS.Callback();
4
6
  var regexp = /^(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&;:\/~+#-]*[\w@?^=%&;\/~+#-])?$/
5
7
 
6
8
  var urlDetect = function() {
@@ -47,20 +49,16 @@ SocialStream.Linkser.Wall = (function(SS, $) {
47
49
  } else {
48
50
  if ($('#post_text').data('link')) {
49
51
  $('#post_text').data('link', false);
50
- resetWallInput({ postText: false });
52
+ resetWallInput();
51
53
  }
52
54
  }
53
55
  };
54
56
 
55
- var resetWallInput = function(options) {
57
+ var resetWallInput = function() {
56
58
  $("#link_preview").hide().html('');
57
59
  $("#link_url").val("");
58
60
  SS.Wall.changeAction();
59
61
  SS.Wall.changeParams('post');
60
-
61
- if (options.postText) {
62
- $('#post_text').val('');
63
- }
64
62
  };
65
63
 
66
64
  var showLoading = function() {
@@ -82,14 +80,13 @@ SocialStream.Linkser.Wall = (function(SS, $) {
82
80
  };
83
81
 
84
82
 
85
- var create = function() {
86
- resetWallInput({ postText: true });
87
- };
83
+ SS.Wall.callbackRegister('show', init);
88
84
 
89
- SocialStream.Wall.callbackRegister('show', init);
90
-
91
- return {
92
- create: create
93
- };
85
+ callback.register('new_',
86
+ SS.Wall.new_,
87
+ resetWallInput);
88
+
89
+ return callback.extend({
90
+ });
94
91
 
95
92
  })(SocialStream, jQuery);
@@ -1,6 +1,5 @@
1
1
  //Display the new post
2
- $(".timeline").prepend("<%= escape_javascript(render @link.post_activity) %>");
2
+ $(".timeline").prepend("<%= escape_javascript render(@link.post_activity) %>");
3
3
 
4
- SocialStream.Timeline.update();
5
-
6
- SocialStream.Linkser.Wall.create();
4
+ SocialStream.Timeline.update("<%= escape_javascript dom_id(@link.post_activity) %>");
5
+ SocialStream.Linkser.Wall.new_();
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Linkser
3
- VERSION = "2.0.0".freeze
3
+ VERSION = "2.1.0".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 2.0.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 2.1.0')
16
16
  s.add_runtime_dependency('linkser', '~> 0.0.12')
17
17
  # Development Gem dependencies
18
18
  s.add_development_dependency('sqlite3-ruby')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-linkser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Casanova Cuesta
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-17 00:00:00.000000000 Z
12
+ date: 2013-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: social_stream-base
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.0
20
+ version: 2.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0
27
+ version: 2.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: linkser
30
30
  requirement: !ruby/object:Gem::Requirement