social_stream-base 0.9.22 → 0.9.23
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.
- data/app/assets/images/btn/download.png +0 -0
- data/app/assets/javascripts/activities.js.erb +1 -1
- data/app/assets/javascripts/social_stream-base.js +2 -0
- data/app/assets/stylesheets/social_stream-base.css +2 -0
- data/app/views/avatars/index.html.erb +0 -13
- data/app/views/comments/create.js.erb +3 -0
- data/app/views/toolbar/_home.html.erb +1 -1
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/lib/social_stream/base/version.rb +1 -1
- data/lib/social_stream/controllers/helpers.rb +6 -0
- data/lib/social_stream/migrations/base.rb +12 -9
- data/lib/social_stream/migrations/components.rb +1 -1
- data/social_stream-base.gemspec +1 -1
- metadata +9 -9
- data/lib/social_stream/migrations/finder.rb +0 -20
Binary file
|
@@ -138,7 +138,7 @@ $(function() {
|
|
138
138
|
$(".actor_logo_new_comment").hide();
|
139
139
|
|
140
140
|
//if there are 4 or more commments we only show the last 2 and a link to show the rest
|
141
|
-
$(".activity_comments").each(function(){
|
141
|
+
$("#wall .activity_comments").each(function(){
|
142
142
|
var comments = $(this).children(".subactivity");
|
143
143
|
//check if there are more than 3 comments
|
144
144
|
if (comments.size() > 3){
|
@@ -1,18 +1,5 @@
|
|
1
1
|
<% toolbar :profile => current_subject %>
|
2
2
|
|
3
|
-
<% content_for :headers do %>
|
4
|
-
<%= stylesheet_link_tag "avatars.css", :media => "screen, projection" %>
|
5
|
-
<%= javascript_include_tag 'jquery.Jcrop.min' %>
|
6
|
-
<%= javascript_include_tag 'jquery.form' %>
|
7
|
-
<%= javascript_include_tag 'jquery.fileupload' %>
|
8
|
-
<%= javascript_include_tag 'jquery.fileupload-ui' %>
|
9
|
-
<%= javascript_include_tag 'avatars.js' %>
|
10
|
-
|
11
|
-
<%= stylesheet_link_tag "jquery.Jcrop", :media => "screen, projection" %>
|
12
|
-
<%= stylesheet_link_tag "avatars", :media => "screen, projection" %>
|
13
|
-
<%= stylesheet_link_tag "jquery.fileupload-ui", :media => "screen, projection" %>
|
14
|
-
<% end %>
|
15
|
-
|
16
3
|
<% content_for :title do%>
|
17
4
|
<%= current_subject.name %>
|
18
5
|
<% end%>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
//Display the new comment
|
2
2
|
$("#comments_activity_<%= @comment.post_activity.parent.id %>").append("<%= escape_javascript(render @comment.post_activity) %>");
|
3
3
|
$(".activities_comment_btn").hide();
|
4
|
+
$(".input_new_comments").each(function() {
|
5
|
+
$(this).focus().val("").blur();
|
6
|
+
});
|
4
7
|
|
5
8
|
setActivityPrivacyTooltips("<%= escape_javascript dom_id(@comment.post_activity) %>");
|
6
9
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= yield(:toolbar_menu).empty? ? home_toolbar_menu : yield(:toolbar_menu)%>
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<% if defined?(SocialStream::Presence) %>
|
10
|
+
<% if defined?(SocialStream::Presence) and SocialStream::Presence.enable %>
|
11
11
|
<%= render :partial => 'xmpp/chat' %>
|
12
12
|
<% end %>
|
13
13
|
|
data/config/locales/en.yml
CHANGED
@@ -377,6 +377,7 @@ en:
|
|
377
377
|
relation_public:
|
378
378
|
name: "Public"
|
379
379
|
representation:
|
380
|
+
notice: "Your session has changed. Now you are acting on behalf of %{subject}. Use the top-right menu to return to your session"
|
380
381
|
switch: "Switch session"
|
381
382
|
required: "(*) These fields are required"
|
382
383
|
search:
|
data/config/locales/es.yml
CHANGED
@@ -372,6 +372,7 @@ es:
|
|
372
372
|
relation_public:
|
373
373
|
name: "Público"
|
374
374
|
representation:
|
375
|
+
notice: "Tu sesión ha cambiado. Ahora actúas en nombre de %{subject}. Para regresar a tu sessión, utiliza el menú de arriba a la derecha"
|
375
376
|
switch: "Cambiar sessión"
|
376
377
|
required: "(*) Estos campos son obligatorios"
|
377
378
|
search:
|
@@ -103,6 +103,12 @@ module SocialStream
|
|
103
103
|
raise CanCan::AccessDenied.new("Not authorized!", :represent, subject.name)
|
104
104
|
end
|
105
105
|
|
106
|
+
if subject != current_user
|
107
|
+
flash[:notice] ||= ""
|
108
|
+
flash[:notice] += t('representation.notice',
|
109
|
+
:subject => subject.name)
|
110
|
+
end
|
111
|
+
|
106
112
|
self.current_subject = subject
|
107
113
|
end
|
108
114
|
|
@@ -1,12 +1,8 @@
|
|
1
|
-
require 'social_stream/migrations/finder'
|
2
|
-
|
3
1
|
module SocialStream
|
4
2
|
module Migrations
|
5
3
|
class Base
|
6
4
|
def initialize
|
7
|
-
|
8
|
-
["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
|
9
|
-
|
5
|
+
require_old_migration 'acts-as-taggable-on', 'lib/generators/acts_as_taggable_on/migration/templates/active_record/migration'
|
10
6
|
@mailboxer_migration = find_migration 'mailboxer'
|
11
7
|
@base_migration = find_migration 'social_stream-base'
|
12
8
|
end
|
@@ -43,12 +39,19 @@ module SocialStream
|
|
43
39
|
protected
|
44
40
|
|
45
41
|
def find_migration(gem)
|
46
|
-
|
47
|
-
File.join([path,'db', 'migrate'])
|
42
|
+
File.join([get_full_gem_path(gem)], 'db/migrate')
|
48
43
|
end
|
49
44
|
|
50
|
-
def
|
51
|
-
|
45
|
+
def require_old_migration(gem,file_path)
|
46
|
+
require File.join([get_full_gem_path(gem),file_path])
|
47
|
+
end
|
48
|
+
|
49
|
+
def get_full_gem_path(gem)
|
50
|
+
if (Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.8.0'))
|
51
|
+
return Gem::Specification.find_by_name(gem).full_gem_path
|
52
|
+
else
|
53
|
+
return Gem::GemPathSearcher.new.find(gem).full_gem_path
|
54
|
+
end
|
52
55
|
end
|
53
56
|
end
|
54
57
|
end
|
@@ -4,7 +4,7 @@ module SocialStream
|
|
4
4
|
module Migrations
|
5
5
|
class Components < Base
|
6
6
|
def initialize
|
7
|
-
@component = find_migration
|
7
|
+
@component = find_migration "social_stream-#{ self.class.name.split('::').last.underscore }"
|
8
8
|
end
|
9
9
|
|
10
10
|
def up(options = {})
|
data/social_stream-base.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
# Slug generation
|
27
27
|
s.add_runtime_dependency('stringex', '~> 1.3.0')
|
28
28
|
# Avatar attachments
|
29
|
-
s.add_runtime_dependency('avatars_for_rails', '~> 0.
|
29
|
+
s.add_runtime_dependency('avatars_for_rails', '~> 0.2.0')
|
30
30
|
# jQuery
|
31
31
|
s.add_runtime_dependency('jquery-rails', '~> 1.0.9')
|
32
32
|
# Authorization
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 23
|
10
|
+
version: 0.9.23
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- GING - DIT - UPM
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-10-
|
19
|
+
date: 2011-10-28 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -123,12 +123,12 @@ dependencies:
|
|
123
123
|
requirements:
|
124
124
|
- - ~>
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
hash:
|
126
|
+
hash: 23
|
127
127
|
segments:
|
128
128
|
- 0
|
129
|
-
-
|
130
|
-
-
|
131
|
-
version: 0.
|
129
|
+
- 2
|
130
|
+
- 0
|
131
|
+
version: 0.2.0
|
132
132
|
type: :runtime
|
133
133
|
version_requirements: *id007
|
134
134
|
- !ruby/object:Gem::Dependency
|
@@ -548,6 +548,7 @@ files:
|
|
548
548
|
- app/assets/images/btn/close.png
|
549
549
|
- app/assets/images/btn/date.png
|
550
550
|
- app/assets/images/btn/delete.png
|
551
|
+
- app/assets/images/btn/download.png
|
551
552
|
- app/assets/images/btn/edit.png
|
552
553
|
- app/assets/images/btn/error.png
|
553
554
|
- app/assets/images/btn/facebook.png
|
@@ -963,7 +964,6 @@ files:
|
|
963
964
|
- lib/social_stream/d3.rb
|
964
965
|
- lib/social_stream/migrations/base.rb
|
965
966
|
- lib/social_stream/migrations/components.rb
|
966
|
-
- lib/social_stream/migrations/finder.rb
|
967
967
|
- lib/social_stream/models/object.rb
|
968
968
|
- lib/social_stream/models/subject.rb
|
969
969
|
- lib/social_stream/models/supertype.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module SocialStream
|
2
|
-
module Migrations
|
3
|
-
# Searches for migrations in a gem and requires them.
|
4
|
-
# Example:
|
5
|
-
#
|
6
|
-
# MigrationFinder.new 'acts-as-taggable-on',
|
7
|
-
# ["generators", "acts_as_taggable_on", "migration", "templates", "active_record", "migration"]
|
8
|
-
# ActsAsTaggableOnMigration.up
|
9
|
-
class Finder
|
10
|
-
def initialize gem, path
|
11
|
-
finder = Gem::GemPathSearcher.new
|
12
|
-
taggable_spec = finder.find(gem)
|
13
|
-
taggable_migration = finder.matching_files(taggable_spec,
|
14
|
-
File.join(*path)).first
|
15
|
-
|
16
|
-
require taggable_migration
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|