social_stream 0.20.2 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- data/base/app/assets/images/btn/permission_negative.png +0 -0
- data/base/app/assets/images/btn/permission_positive.png +0 -0
- data/base/app/assets/javascripts/activities.js.erb +2 -118
- data/base/app/assets/javascripts/social_stream-base.js +3 -0
- data/base/app/assets/javascripts/social_stream.timeline.js +42 -0
- data/base/app/assets/javascripts/social_stream.wall.js.erb +125 -0
- data/base/app/assets/stylesheets/cheesecake.css.scss +9 -1
- data/base/app/helpers/notifications_helper.rb +1 -5
- data/base/app/models/activity.rb +21 -2
- data/base/app/models/comment.rb +5 -0
- data/base/app/models/permission.rb +16 -1
- data/base/app/models/post.rb +5 -0
- data/base/app/views/activities/_new.html.erb +7 -6
- data/base/app/views/activities/_wall.html.erb +6 -0
- data/base/app/views/cheesecake/_index.html.erb +17 -0
- data/base/app/views/cheesecake/_sector_form.html.erb +15 -6
- data/base/app/views/comments/_new.html.erb +2 -2
- data/base/app/views/comments/create.js.erb +1 -3
- data/base/app/views/notifications/activities/_post.html.erb +0 -3
- data/base/app/views/permissions/_index.html.erb +2 -2
- data/base/app/views/posts/create.js.erb +1 -4
- data/base/config/locales/en.yml +33 -23
- data/base/config/locales/es.yml +53 -24
- data/base/db/migrate/20120208135718_group_title_and_description_in_activity_object.rb +52 -0
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/spec/factories/activity.rb +1 -1
- data/documents/db/migrate/20120208143721_documents_group_title_and_description_in_activity_object.rb +28 -0
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +1 -1
- data/documents/spec/factories/document.rb +1 -0
- data/documents/spec/factories/picture.rb +1 -0
- data/events/db/migrate/20120208143756_events_group_title_and_description_in_activity_object.rb +26 -0
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/social_stream-events.gemspec +1 -1
- data/lib/social_stream/version.rb +1 -1
- data/linkser/app/views/links/create.js.erb +1 -3
- data/linkser/db/migrate/20120208143739_linkser_group_title_and_description_in_activity_object.rb +30 -0
- data/linkser/lib/social_stream/linkser/version.rb +1 -1
- data/linkser/social_stream-linkser.gemspec +1 -1
- data/presence/app/assets/images/black_arrow7.png +0 -0
- data/presence/app/assets/images/black_arrow8.png +0 -0
- data/presence/app/assets/images/black_arrow9.png +0 -0
- data/presence/app/assets/javascripts/chat_interface_manager.js.erb +191 -23
- data/presence/app/assets/javascripts/chat_persistence.js +15 -6
- data/presence/app/assets/javascripts/chat_utilities.js +13 -0
- data/presence/app/assets/javascripts/chat_window_manager.js +101 -20
- data/presence/app/assets/javascripts/social_stream-presence.js +2 -0
- data/presence/app/assets/javascripts/xmpp_client_management.js.erb +6 -5
- data/presence/app/assets/stylesheets/chat.css.scss +43 -3
- data/presence/app/assets/stylesheets/social_stream-presence.css +1 -0
- data/presence/app/helpers/xmpp_helper.rb +4 -2
- data/presence/app/views/chat/_contacts.html.erb +55 -42
- data/presence/config/locales/en.yml +4 -1
- data/presence/config/locales/es.yml +3 -1
- data/presence/db/migrate/20110928135031_add_status_column_to_user.rb +1 -1
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/social_stream-presence.gemspec +1 -1
- data/presence/vendor/assets/javascripts/jquery.flexselect.js +265 -0
- data/presence/vendor/assets/javascripts/jquery.tools.tooltip.js +2 -1
- data/presence/vendor/assets/javascripts/liquidmetal.js +90 -0
- data/presence/vendor/assets/stylesheets/flexselect.css +39 -0
- data/social_stream.gemspec +5 -5
- metadata +45 -32
- data/base/app/views/activities/_filter.html.erb +0 -83
@@ -6,12 +6,6 @@
|
|
6
6
|
:receiver => receiver
|
7
7
|
} %>
|
8
8
|
<% end %>
|
9
|
-
|
10
|
-
<%= javascript_tag do %>
|
11
|
-
$(function(){
|
12
|
-
activate_anti_rebounds();
|
13
|
-
});
|
14
|
-
<% end %>
|
15
9
|
</div>
|
16
10
|
|
17
11
|
<div id="activity_form_select">
|
@@ -54,3 +48,10 @@
|
|
54
48
|
<%= submit_tag(t('share'), :class => "button submitActivity", :id => "masterSubmitButton") %>
|
55
49
|
</div>
|
56
50
|
<% end %>
|
51
|
+
|
52
|
+
<%= javascript_tag do %>
|
53
|
+
$(function(){
|
54
|
+
SocialStream.Wall.setup();
|
55
|
+
});
|
56
|
+
<% end %>
|
57
|
+
|
@@ -151,6 +151,23 @@
|
|
151
151
|
$("#edited_subsector_name_" + event.data[0]).html($("#form_subsector_name_" + event.data[0]).val());
|
152
152
|
event.data[1].changeLabel($("#form_subsector_name_" + event.data[0]).val());
|
153
153
|
});
|
154
|
+
$("#subsector_" + i).find(".permissions_field .permission").each(function(){
|
155
|
+
var permission_field = $(this);
|
156
|
+
var update_state = function(){
|
157
|
+
var label_class = permission_field.attr("id").replace("form_", "edited_");
|
158
|
+
if(permission_field.is(":checked")){
|
159
|
+
$("." + label_class).removeClass("negative").addClass("positive");
|
160
|
+
$("." + label_class).find(".negative_message").hide();
|
161
|
+
$("." + label_class).find(".positive_message").show();
|
162
|
+
}else{
|
163
|
+
$("." + label_class).removeClass("positive").addClass("negative");
|
164
|
+
$("." + label_class).find(".positive_message").hide();
|
165
|
+
$("." + label_class).find(".negative_message").show();
|
166
|
+
}
|
167
|
+
}
|
168
|
+
update_state();
|
169
|
+
permission_field.on("change",update_state);
|
170
|
+
});
|
154
171
|
$("#subsector_" + i).show();
|
155
172
|
}else{
|
156
173
|
if(sector.subsectors[i-1]){
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<%= t('cheesecake.form.fields.name')%>:
|
39
39
|
</div>
|
40
40
|
<div class="form_field">
|
41
|
-
<input type="text" class="form_tag
|
41
|
+
<input type="text" class="form_tag form_subsector_name" id="form_subsector_name_<%= i %>" value="New subsector <%= i %>">
|
42
42
|
</div>
|
43
43
|
</div>
|
44
44
|
<div class="form_row less_padding">
|
@@ -50,15 +50,22 @@
|
|
50
50
|
<div class="form_field permissions_field">
|
51
51
|
<% default_permissions.each_with_index do |p, i| %>
|
52
52
|
<div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
|
53
|
-
<input class="permission <%= dom_id p %>" type="checkbox"/>
|
54
|
-
<label for
|
53
|
+
<input id="form_subsector_<%= i %>_<%= dom_id p %>" class="permission <%= dom_id p %>" type="checkbox"/>
|
54
|
+
<label for="form_subsector_<%= i %>_<%= dom_id p %>"><%= p.description(:brief, :relation => "%RELATION_NAME%", :subject => current_subject) %></label>
|
55
55
|
<div class="clearfloat"></div>
|
56
56
|
</div>
|
57
57
|
<% end %>
|
58
58
|
</div>
|
59
59
|
<div class="permissions_explanation" style="display:none;">
|
60
60
|
<% default_permissions.each_with_index do |p, i| %>
|
61
|
-
<div class="permission <%= dom_id p %>
|
61
|
+
<div class="permission <%= dom_id p %> positive edited_subsector_<%= i %>_<%= dom_id p %>">
|
62
|
+
<div class="positive_message">
|
63
|
+
<%= p.description(:detailed, :relation => "%RELATION_NAME%", :subject => current_subject, :state => "positive") %>
|
64
|
+
</div>
|
65
|
+
<div class="negative_message" style="display:none;">
|
66
|
+
<%= p.description(:detailed, :relation => "%RELATION_NAME%", :subject => current_subject, :state => "negative") %>
|
67
|
+
</div>
|
68
|
+
</div>
|
62
69
|
<% end %>
|
63
70
|
</div>
|
64
71
|
</div>
|
@@ -86,7 +93,7 @@
|
|
86
93
|
$(".permissions_field").each(function(){
|
87
94
|
$(this).tipsy({
|
88
95
|
delayIn: 500,
|
89
|
-
delayOut:
|
96
|
+
delayOut: 200,
|
90
97
|
gravity: 'e',
|
91
98
|
offset: 100,
|
92
99
|
opacity: 1,
|
@@ -94,7 +101,9 @@
|
|
94
101
|
html: true,
|
95
102
|
hoverable: true,
|
96
103
|
title: function(){
|
97
|
-
|
104
|
+
var html = $(this).parent().find('.permissions_explanation').html();
|
105
|
+
var relation = $(this).parent().parent().find('.form_subsector_name').val();
|
106
|
+
return html.replace(/%RELATION_NAME%/g, relation);
|
98
107
|
}
|
99
108
|
});
|
100
109
|
});
|
@@ -33,9 +33,8 @@
|
|
33
33
|
<% end %>
|
34
34
|
|
35
35
|
<%= javascript_tag do %>
|
36
|
-
$(
|
36
|
+
$(function() {
|
37
37
|
$("#comment_text_<%= dom_id(activity) %>").Watermark("<%= I18n.t('comment.input') %>","#666");
|
38
|
-
activate_anti_rebounds();
|
39
38
|
|
40
39
|
$("#comment_text_<%= dom_id(activity) %>")
|
41
40
|
.change(function(){autoSize("<%= dom_id(activity) %>");})
|
@@ -43,5 +42,6 @@
|
|
43
42
|
.keyup(function(){autoSize("<%= dom_id(activity) %>");});
|
44
43
|
autoSize("<%= dom_id(activity) %>");
|
45
44
|
|
45
|
+
SocialStream.Wall.activateAntiRebounds();
|
46
46
|
});
|
47
47
|
<% end %>
|
@@ -5,6 +5,4 @@ $(".input_new_comments").each(function() {
|
|
5
5
|
$(this).focus().val("").blur();
|
6
6
|
});
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
unblock_all_forms();
|
8
|
+
SocialStream.Timeline.newActivity("<%= escape_javascript dom_id(@comment.post_activity) %>");
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<td>
|
11
11
|
<div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
|
12
12
|
<input id=<%= dom_id p %> class="permission" type="checkbox"/>
|
13
|
-
<label for=<%= dom_id p %>><%= p.description(:brief) %></label>
|
13
|
+
<label for=<%= dom_id p %>><%= p.description(:brief, :subject => current_subject) %></label>
|
14
14
|
<div class="clearfloat"></div>
|
15
15
|
</div>
|
16
16
|
</td>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<%= raw t('privacy.intro', :relation => h(@relation.name)) %>
|
29
29
|
|
30
30
|
<%= semantic_form_for @relation, :url => polymorphic_path(@relation, :section => 'rules'), :remote => true do |f| %>
|
31
|
-
<%= f.input :permissions, :as => :check_boxes, :collection => default_permissions.map{ |p| [p.description(:detailed, :relation => @relation.name, :subject => current_subject
|
31
|
+
<%= f.input :permissions, :as => :check_boxes, :collection => default_permissions.map{ |p| [p.description(:detailed, :relation => @relation.name, :subject => current_subject, :state => "positive"), p.id] } %>
|
32
32
|
<%= f.submit t('button.save'), :class => 'button' %>
|
33
33
|
<% end %>
|
34
34
|
</div>
|
@@ -1,7 +1,4 @@
|
|
1
1
|
//Display the new post
|
2
2
|
$("#wall").prepend("<%= escape_javascript(render @post.post_activity) %>");
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
unblock_all_forms();
|
7
|
-
|
4
|
+
SocialStream.Timeline.newActivity("<%= escape_javascript dom_id(@post.post_activity) %>");
|
data/base/config/locales/en.yml
CHANGED
@@ -380,29 +380,39 @@ en:
|
|
380
380
|
other: "Everybody"
|
381
381
|
permission:
|
382
382
|
description:
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
383
|
+
default:
|
384
|
+
brief:
|
385
|
+
create:
|
386
|
+
activity: "Post to your wall"
|
387
|
+
follow:
|
388
|
+
nil: "Follow their activity"
|
389
|
+
read:
|
390
|
+
activity: "Read your wall"
|
391
|
+
represent:
|
392
|
+
nil: "Administrate"
|
393
|
+
notify:
|
394
|
+
nil: "Notify"
|
395
|
+
detailed:
|
396
|
+
create:
|
397
|
+
activity:
|
398
|
+
positive: "They WILL BE ABLE to post new activities to your wall"
|
399
|
+
negative: "They WILL NOT BE ABLE to post new activities to your wall"
|
400
|
+
follow:
|
401
|
+
nil:
|
402
|
+
positive: "Activities of the contacts at %{relation} WILL APPEAR in your home wall"
|
403
|
+
negative: "Activities of the contacts at %{relation} WILL APPEAR in your home wall"
|
404
|
+
read:
|
405
|
+
activity:
|
406
|
+
positive: "They WILL BE ABLE to read posts in your wall, except those shared with specific contacts"
|
407
|
+
negative: "They WILL NOT BE ABLE to read posts in your wall, except those marked as public"
|
408
|
+
represent:
|
409
|
+
nil:
|
410
|
+
positive: "They WILL BE ABLE to change session and act as %{subject}"
|
411
|
+
negative: "They WILL NOT BE ABLE to change session and act as %{subject}"
|
412
|
+
notify:
|
413
|
+
nil:
|
414
|
+
positive: "Activities WILL BE notified to contacts at %{name}"
|
415
|
+
negative: "Activities WILL NOT BE notified to contacts at %{name}"
|
406
416
|
of_relation:
|
407
417
|
choose: "2. Permissions in <strong>%{name}</strong> sphere"
|
408
418
|
privacy:
|
data/base/config/locales/es.yml
CHANGED
@@ -379,33 +379,62 @@ es:
|
|
379
379
|
other: "Todo el mundo"
|
380
380
|
permission:
|
381
381
|
description:
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
382
|
+
default:
|
383
|
+
brief:
|
384
|
+
create:
|
385
|
+
activity: "Publicar en vuestro muro"
|
386
|
+
follow:
|
387
|
+
nil: "Seguir su actividad"
|
388
|
+
read:
|
389
|
+
activity: "Leer vuestro muro"
|
390
|
+
represent:
|
391
|
+
nil: "Administrar"
|
392
|
+
notify:
|
393
|
+
nil: "Notificar"
|
394
|
+
detailed:
|
395
|
+
create:
|
396
|
+
activity:
|
397
|
+
positive: "PODRÁN publicar actividades en vuestro muro"
|
398
|
+
negative: "NO PODRÁN publicar actividades en vuestro muro"
|
399
|
+
follow:
|
400
|
+
nil:
|
401
|
+
positive: "Las actividades de los contactos en %{relation} APARECERÁN en vuestra página de inicio"
|
402
|
+
negative: "Las actividades de los contactos en %{relation} NO APARECERÁN en vuestra página de inicio"
|
403
|
+
read:
|
404
|
+
activity:
|
405
|
+
positive: "PODRÁN leer las publicaciones que aparezcan en vuestro muro, salvo las que compartas solo ciertas personas"
|
406
|
+
negative: "NO PODRÁN leer las publicaciones que aparezcan en vuestro muro, salvo las que marques como públicas"
|
407
|
+
represent:
|
408
|
+
nil:
|
409
|
+
positive: "PODRÁN cambiar sesión para actuar en nombre de %{name}"
|
410
|
+
negative: "NO PODRÁN cambiar sesión para actuar en nombre de %{name}"
|
411
|
+
notify:
|
412
|
+
nil:
|
413
|
+
positive: "Las actividades SE NOTIFICARÁN a los contactos en %{relation}"
|
414
|
+
negative: "Las actividades NO SE NOTIFICARÁN a los contactos en %{relation}"
|
415
|
+
user:
|
416
|
+
brief:
|
417
|
+
create:
|
418
|
+
activity: "Publicar en tu muro"
|
419
|
+
read:
|
420
|
+
activity: "Leer tu muro"
|
421
|
+
detailed:
|
422
|
+
create:
|
423
|
+
activity:
|
424
|
+
positive: "PODRÁN publicar actividades en tu muro"
|
425
|
+
negative: "NO PODRÁN publicar actividades en tu muro"
|
426
|
+
follow:
|
427
|
+
nil:
|
428
|
+
positive: "Las actividades de los contactos en %{relation} APARECERÁN en tu página de inicio"
|
429
|
+
negative: "Las actividades de los contactos en %{relation} NO APARECERÁN en tu página de inicio"
|
430
|
+
read:
|
431
|
+
activity:
|
432
|
+
positive: "PODRÁN leer las publicaciones que aparezcan en tu muro, salvo las que compartas solo con ciertas personas"
|
433
|
+
negative: "NO PODRÁN leer las publicaciones que aparezcan en tu muro, salvo las que marques como públicas"
|
405
434
|
of_relation:
|
406
435
|
choose: "2. Permisos para <strong>%{name}</strong>"
|
407
436
|
privacy:
|
408
|
-
intro: "Los contactos en <strong>%{relation}</strong
|
437
|
+
intro: "Los contactos en <strong>%{relation}</strong>:"
|
409
438
|
rule:
|
410
439
|
add: "Añadir"
|
411
440
|
title: "Reglas de privacidad"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
class GroupTitleAndDescriptionInActivityObject < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
ao_ts = ActivityObject.record_timestamps
|
4
|
+
ActivityObject.record_timestamps = false
|
5
|
+
|
6
|
+
change_table :activity_objects do |t|
|
7
|
+
t.string :title, :default => ""
|
8
|
+
t.text :description
|
9
|
+
end
|
10
|
+
|
11
|
+
# Fix 'comments' table
|
12
|
+
c_ts = Comment.record_timestamps
|
13
|
+
Comment.record_timestamps = false
|
14
|
+
|
15
|
+
Comment.all.each do |c|
|
16
|
+
# Remove comments that are not properly deleted
|
17
|
+
# https://github.com/ging/social_stream/issues/213
|
18
|
+
if c.activity_object.activities.blank?
|
19
|
+
c.destroy
|
20
|
+
next
|
21
|
+
end
|
22
|
+
|
23
|
+
c.activity_object.description = c.read_attribute(:text)
|
24
|
+
c.save!
|
25
|
+
end
|
26
|
+
change_table :comments do |t|
|
27
|
+
t.remove :text
|
28
|
+
end
|
29
|
+
Comment.reset_column_information
|
30
|
+
Comment.record_timestamps = c_ts
|
31
|
+
|
32
|
+
# Fix 'posts' table
|
33
|
+
p_ts = Post.record_timestamps
|
34
|
+
Post.record_timestamps = false
|
35
|
+
|
36
|
+
Post.all.each do |p|
|
37
|
+
p.activity_object.description = p.read_attribute(:text)
|
38
|
+
p.save!
|
39
|
+
end
|
40
|
+
change_table :posts do |t|
|
41
|
+
t.remove :text
|
42
|
+
end
|
43
|
+
Post.reset_column_information
|
44
|
+
Post.record_timestamps = p_ts
|
45
|
+
|
46
|
+
ActivityObject.record_timestamps = ao_ts
|
47
|
+
end
|
48
|
+
|
49
|
+
def down
|
50
|
+
raise ActiveRecord::IrreversibleMigration # Due to trans-gem oddities
|
51
|
+
end
|
52
|
+
end
|
@@ -12,11 +12,11 @@ end
|
|
12
12
|
|
13
13
|
Factory.define :activity_object_spec_helper do |a|
|
14
14
|
a.object_type "Post"
|
15
|
+
a.description "Post spec helper"
|
15
16
|
end
|
16
17
|
|
17
18
|
Factory.define :post_spec_helper do |p|
|
18
19
|
p.association :activity_object_spec_helper
|
19
|
-
p.text "Post spec helper"
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
data/documents/db/migrate/20120208143721_documents_group_title_and_description_in_activity_object.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
class DocumentsGroupTitleAndDescriptionInActivityObject < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
ao_ts = ActivityObject.record_timestamps
|
4
|
+
ActivityObject.record_timestamps = false
|
5
|
+
|
6
|
+
# Fix 'documents' table
|
7
|
+
d_ts = Document.record_timestamps
|
8
|
+
Document.record_timestamps = false
|
9
|
+
|
10
|
+
Document.all.each do |d|
|
11
|
+
d.activity_object.title = d.read_attribute(:title)
|
12
|
+
d.activity_object.description = d.read_attribute(:description)
|
13
|
+
d.save!
|
14
|
+
end
|
15
|
+
change_table :documents do |t|
|
16
|
+
t.remove :title
|
17
|
+
t.remove :description
|
18
|
+
end
|
19
|
+
Document.reset_column_information
|
20
|
+
Document.record_timestamps = d_ts
|
21
|
+
|
22
|
+
ActivityObject.record_timestamps = ao_ts
|
23
|
+
end
|
24
|
+
|
25
|
+
def down
|
26
|
+
raise ActiveRecord::IrreversibleMigration # Due to trans-gem oddities
|
27
|
+
end
|
28
|
+
end
|