social_stream 2.0.4 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.rdoc +2 -1
  4. data/base/README.rdoc +2 -0
  5. data/base/app/assets/javascripts/social_stream/relation_customs.js +8 -3
  6. data/base/app/assets/javascripts/social_stream/timeline.js +1 -2
  7. data/base/app/assets/javascripts/social_stream/wall.js +11 -0
  8. data/base/app/assets/stylesheets/social_stream/base/contacts/_contacts.css.sass +1 -0
  9. data/base/app/assets/stylesheets/social_stream/base/contacts/layouts/_contacts.css.sass +1 -42
  10. data/base/app/assets/stylesheets/social_stream/base/footer/layout/_footer.css.sass +3 -2
  11. data/base/app/assets/stylesheets/social_stream/base/layouts/_layout.css.sass +4 -1
  12. data/base/app/assets/stylesheets/social_stream/base/mixins/_layout.css.sass +48 -0
  13. data/base/app/assets/stylesheets/social_stream/base/profile/_profile.css.sass +21 -25
  14. data/base/app/assets/stylesheets/social_stream/base/sidebar/_sidebar.css.sass +1 -27
  15. data/base/app/assets/stylesheets/social_stream/base/sidebar/layout/_sidebar.css.sass +1 -24
  16. data/base/app/assets/stylesheets/social_stream/base/toolbar/_toolbar.css.sass +2 -11
  17. data/base/app/assets/stylesheets/social_stream/base/toolbar/layout/_toolbar.css.sass +18 -5
  18. data/base/app/controllers/contacts_controller.rb +17 -22
  19. data/base/app/controllers/permissions_controller.rb +3 -1
  20. data/base/app/helpers/contacts_helper.rb +9 -14
  21. data/base/app/models/actor.rb +28 -2
  22. data/base/app/models/contact.rb +18 -1
  23. data/base/app/models/permission.rb +21 -1
  24. data/base/app/models/relation.rb +14 -15
  25. data/base/app/models/relation/custom.rb +27 -24
  26. data/base/app/views/activities/_new.html.erb +1 -1
  27. data/base/app/views/contacts/{_link_custom.html.erb → _button.html.erb} +0 -0
  28. data/base/app/views/contacts/_contact.html.erb +1 -1
  29. data/base/app/views/contacts/index.html.erb +1 -1
  30. data/base/app/views/devise/passwords/new.html.erb +6 -8
  31. data/base/app/views/devise/registrations/new.html.erb +5 -7
  32. data/base/app/views/layouts/application.html.erb +7 -8
  33. data/base/app/views/permissions/_index.html.erb +12 -12
  34. data/base/app/views/permissions/_list.html.erb +10 -0
  35. data/base/app/views/permissions/index.js.erb +1 -15
  36. data/base/app/views/posts/create.js.erb +5 -4
  37. data/base/app/views/profiles/_personal.html.erb +2 -2
  38. data/base/app/views/relation/customs/_custom.html.erb +2 -27
  39. data/base/app/views/relation/customs/_form.html.erb +1 -1
  40. data/base/app/views/relation/customs/_index.html.erb +1 -1
  41. data/base/app/views/relation/customs/_list.html.erb +5 -4
  42. data/base/app/views/relation/customs/index.html.erb +1 -1
  43. data/base/app/views/relations/_relation.html.erb +33 -0
  44. data/base/config/locales/en.yml +10 -5
  45. data/base/config/locales/es.yml +20 -40
  46. data/base/config/locales/pt.yml +5 -1
  47. data/base/config/locales/zh.yml +17 -9
  48. data/base/lib/generators/social_stream/base/install_generator.rb +0 -4
  49. data/base/lib/generators/social_stream/base/templates/initializer.rb +24 -0
  50. data/base/lib/social_stream/base.rb +70 -0
  51. data/base/lib/social_stream/base/ability.rb +13 -1
  52. data/base/lib/social_stream/base/version.rb +1 -1
  53. data/base/lib/social_stream/test_helpers/controllers.rb +12 -6
  54. data/base/social_stream-base.gemspec +1 -1
  55. data/base/spec/controllers/permissions_controller_spec.rb +2 -6
  56. data/documents/app/assets/stylesheets/social_stream-documents.css.sass +2 -0
  57. data/documents/app/assets/stylesheets/social_stream/documents/explore/_explore-documents.css.sass +1 -2
  58. data/documents/app/assets/stylesheets/social_stream/documents/explore/layout/_explore-documents.css.sass +2 -13
  59. data/documents/app/assets/stylesheets/social_stream/documents/mixins/_mixins.css.sass +19 -0
  60. data/documents/lib/social_stream-documents.rb +0 -2
  61. data/documents/lib/social_stream/documents/version.rb +1 -1
  62. data/documents/social_stream-documents.gemspec +1 -1
  63. data/events/lib/social_stream/events/version.rb +1 -1
  64. data/events/social_stream-events.gemspec +1 -1
  65. data/lib/social_stream/version.rb +1 -1
  66. data/linkser/app/assets/javascripts/social_stream/linkser.wall.js +11 -14
  67. data/linkser/app/views/links/create.js.erb +3 -4
  68. data/linkser/lib/social_stream/linkser/version.rb +1 -1
  69. data/linkser/social_stream-linkser.gemspec +1 -1
  70. data/oauth2_server/app/assets/stylesheets/social_stream-oauth2_server.css.sass +1 -1
  71. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/applications/_applications-oauth2server.css.sass +1 -1
  72. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/applications/layout/_applications-oauth2server.css.sass +4 -0
  73. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/create/_create-oauth2server.css.sass +3 -7
  74. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/mixins/_mixin.css.sass +10 -0
  75. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/show/layout/_show-oauth2server.css.sass +15 -6
  76. data/oauth2_server/app/controllers/site/clients_controller.rb +14 -11
  77. data/oauth2_server/app/models/relation/manager.rb +19 -0
  78. data/oauth2_server/app/models/site/client.rb +10 -6
  79. data/oauth2_server/app/views/site/clients/_avatar.html.erb +15 -0
  80. data/oauth2_server/app/views/site/clients/_edit.html.erb +6 -0
  81. data/oauth2_server/app/views/site/clients/_edit_step_2.html.erb +11 -0
  82. data/oauth2_server/app/views/site/clients/_edit_step_3.html.erb +10 -0
  83. data/oauth2_server/app/views/site/clients/_list.html.erb +20 -17
  84. data/oauth2_server/app/views/site/clients/edit.html.erb +5 -6
  85. data/oauth2_server/app/views/site/clients/index.html.erb +1 -1
  86. data/oauth2_server/app/views/site/clients/new.html.erb +4 -2
  87. data/oauth2_server/app/views/site/clients/show.html.erb +49 -42
  88. data/oauth2_server/config/locales/en.yml +21 -3
  89. data/oauth2_server/config/locales/es.yml +26 -11
  90. data/oauth2_server/config/locales/zh.yml +25 -0
  91. data/oauth2_server/db/migrate/20130619134332_site_client_admin_to_manager.rb +24 -0
  92. data/oauth2_server/lib/social_stream-oauth2_server.rb +1 -19
  93. data/oauth2_server/lib/social_stream/oauth2_server.rb +33 -5
  94. data/oauth2_server/lib/social_stream/oauth2_server/ability.rb +23 -0
  95. data/oauth2_server/lib/social_stream/oauth2_server/engine.rb +6 -0
  96. data/oauth2_server/lib/social_stream/oauth2_server/models/actor.rb +2 -2
  97. data/oauth2_server/lib/social_stream/oauth2_server/version.rb +1 -1
  98. data/oauth2_server/social_stream-oauth2_server.gemspec +1 -1
  99. data/oauth2_server/spec/controllers/site_clients_controller_authorization_spec.rb +112 -0
  100. data/oauth2_server/spec/factories/site_client.rb +2 -2
  101. data/oauth2_server/spec/models/site/client_authorization_spec.rb +20 -0
  102. data/ostatus/lib/social_stream-ostatus.rb +0 -4
  103. data/ostatus/lib/social_stream/ostatus/engine.rb +11 -0
  104. data/ostatus/lib/social_stream/ostatus/version.rb +1 -1
  105. data/ostatus/social_stream-ostatus.gemspec +1 -1
  106. data/places/config/locales/en.yml +0 -1
  107. data/places/config/locales/es.yml +1 -2
  108. data/presence/lib/social_stream/presence/version.rb +1 -1
  109. data/presence/social_stream-presence.gemspec +1 -1
  110. data/social_stream.gemspec +7 -7
  111. metadata +30 -26
  112. data/base/app/helpers/permissions_helper.rb +0 -21
  113. data/base/lib/generators/social_stream/base/templates/relations.yml +0 -39
  114. data/oauth2_server/app/assets/stylesheets/social_stream/oauth2_server/mixins/_mixins.css.sass +0 -5
  115. data/oauth2_server/app/models/relation/admin.rb +0 -9
  116. data/oauth2_server/app/views/site/clients/_form_step1.html.erb +0 -7
  117. data/oauth2_server/app/views/site/clients/_form_step2.html.erb +0 -20
  118. data/ostatus/app/decorators/social_stream/base/relation/custom_decorator.rb +0 -3
  119. data/ostatus/lib/social_stream/ostatus/models/relation/custom.rb +0 -22
  120. data/spec/dummy/config/relations.yml +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0db077c1e603d3899591dea35f043c8aa3d91df
4
- data.tar.gz: 0c2b036ffe855298d2a8ebbdc75e6a5534f38459
3
+ metadata.gz: d3eb4537e10308e9a0ed535c6abaf0c1121eeded
4
+ data.tar.gz: eed0069d1cf71067c8601893a0966e1fefb1af56
5
5
  SHA512:
6
- metadata.gz: efba25852f05c3076943c393eaffbae7891aff2db73f40c4c25a5cae8cb3d37d40373be95bb056437392e458ca1d293f91918d7bb519b3023c60aecb3a73b8bc
7
- data.tar.gz: 06b33c37329c16de1d5fd01ad27516beb74a19f5ccf207db288503cf0b4f2dce2256db8708e68f779141fc1152ece372ab6d7c2f8072459ebaf3755048ad69cc
6
+ metadata.gz: 2be013846c7bea51673bfe725caf094fbb9e3c03c4ec05c1cc9d748a019ad8534b47093b2aaecfb72b26962387073269d43f977e30f20bf790b7288ec2d9dc54
7
+ data.tar.gz: 0c04503eea1f785382fc7e58854492054e190654df48a99f12ea948f06b9ec5ad537b1f95d6848509c4833bcf7f2846e73b24ae542fb68280ccfe7280e8877a1
data/Gemfile CHANGED
@@ -18,6 +18,6 @@ gem 'paperclip_waveform'
18
18
  gem "social_stream-#{ g }", :path => g
19
19
  end
20
20
 
21
- # gem 'social2social', :path => '../social2social'
21
+ gem 'pry'
22
22
 
23
23
  gemspec
data/README.rdoc CHANGED
@@ -3,8 +3,9 @@
3
3
  Social Stream is an engine for Ruby on Rails. It provides a robust and flexible framework
4
4
  with {social networking}[http://en.wikipedia.org/wiki/Social_network] features and {activity streams}[http://activitystrea.ms/] for building websites.
5
5
 
6
- {<img src="https://secure.travis-ci.org/ging/social_stream.png" />}[http://travis-ci.org/ging/social_stream]
6
+ {<img src="https://badge.fury.io/rb/social_stream.png" />}[http://rubygems.org/gems/social_stream]
7
7
  {<img src="https://codeclimate.com/github/ging/social_stream.png" />}[https://codeclimate.com/github/ging/social_stream]
8
+ {<img src="https://secure.travis-ci.org/ging/social_stream.png" />}[http://travis-ci.org/ging/social_stream]
8
9
 
9
10
  = Social Stream components
10
11
 
data/base/README.rdoc CHANGED
@@ -5,6 +5,8 @@ Social Stream Base provides the basic functionality for
5
5
  network websites. The features of this gem are limited, for a complete social
6
6
  network environment see https://github.com/ging/social_stream
7
7
 
8
+ {<img src="https://badge.fury.io/rb/social_stream-base.png" />}[http://rubygems.org/gems/social_stream-base]
9
+
8
10
  == Features
9
11
 
10
12
  * Social network infrastructure
@@ -120,8 +120,6 @@ SocialStream.RelationCustom = (function(SS, $, undefined){
120
120
  $('#new_relation').before(options.relation.html);
121
121
 
122
122
  initList($('#relation_custom_' + options.relation.id));
123
-
124
- resetNewForm();
125
123
  };
126
124
 
127
125
  var resetNameForm = function(options) {
@@ -153,6 +151,10 @@ SocialStream.RelationCustom = (function(SS, $, undefined){
153
151
  el.find('input[name="relation_custom[name]"]').val('');
154
152
  };
155
153
 
154
+ var selectNewItem = function(options) {
155
+ $('input[name^="relation"][value="' + options.relation.id + '"]').click();
156
+ };
157
+
156
158
  var hideElement = function(options) {
157
159
  $('#relation_custom_' + options.relation.id).hide();
158
160
  $('#relation_' + options.relation.id + '_permissions').hide();
@@ -162,7 +164,10 @@ SocialStream.RelationCustom = (function(SS, $, undefined){
162
164
  initList,
163
165
  initPermission);
164
166
 
165
- callback.register('create', addToList);
167
+ callback.register('create',
168
+ addToList,
169
+ resetNewForm,
170
+ selectNewItem);
166
171
 
167
172
  callback.register('update',
168
173
  resetNameForm,
@@ -60,8 +60,7 @@ SocialStream.Timeline = (function(SS, $, undefined){
60
60
 
61
61
  callback.register('create',
62
62
  SS.Audience.index,
63
- SS.Comment.index,
64
- SS.Wall.new_);
63
+ SS.Comment.index);
65
64
 
66
65
  callback.register('update',
67
66
  SS.Audience.index,
@@ -11,8 +11,18 @@ SocialStream.Wall = (function(SS, $, undefined){
11
11
  $('.wall_input [name="post[text]"]').autosize();
12
12
  };
13
13
 
14
+ // Prevent sending the same post several times
15
+ var initShareButton = function() {
16
+ $('.wall_input input[type="submit"]').on('click', loadingShareButton);
17
+ };
18
+
19
+ var loadingShareButton = function() {
20
+ $(this).button('loading');
21
+ };
22
+
14
23
  var resetWallInput = function(){
15
24
  $('#post_text').val('');
25
+ $('.wall_input input[type="submit"]').button('reset');
16
26
  };
17
27
 
18
28
  var changeAction = function(path) {
@@ -37,6 +47,7 @@ SocialStream.Wall = (function(SS, $, undefined){
37
47
 
38
48
  callback.register('show',
39
49
  initInputAutosize,
50
+ initShareButton,
40
51
  SS.Object.new_);
41
52
 
42
53
  callback.register('new_',
@@ -12,6 +12,7 @@
12
12
  float: right
13
13
  .contact-list
14
14
  .contact
15
+ @include contact-style
15
16
  .x
16
17
  font-size: 12px
17
18
  color: $black
@@ -30,48 +30,7 @@ input#group_name
30
30
  padding-bottom: 50px
31
31
 
32
32
  .contact
33
- width: 240px
34
- float: left
35
- margin-left: 19px
36
- min-height: 76px
37
- margin-bottom: 14px
38
-
39
- .avatar
40
- float: left
41
- margin-left: 0px
42
- width: 50px
43
- display: inline
44
- margin-top: 10px
45
- img
46
- width: 45px
47
- vertical-align: top
48
-
49
- .data
50
- float: left
51
- margin-left: 0px
52
- width: 175px
53
- display: inline-block
54
- margin-top: 11px
55
- .name
56
- @include ellipsis
57
- .info
58
- @include ellipsis
59
- z-index: 1
60
- padding-left: 2%
61
-
62
- .add
63
- z-index: 1
64
- float: left
65
- .edit_contact
66
- margin-bottom: 0px
67
- .dropdown-toggle
68
- margin-left: 0
69
- widht: 100%
70
- .x
71
- display: inline-block
72
- float: right
73
- margin-top: -40px
74
-
33
+ @include contact-layout
75
34
 
76
35
 
77
36
  #contact-form
@@ -1,6 +1,4 @@
1
1
  footer
2
- height: auto
3
- line-height: 32px
4
2
  text-align: center
5
3
  clear: both
6
4
  padding-top: 30px
@@ -8,5 +6,8 @@ footer
8
6
  margin-left: 0
9
7
  li
10
8
  display: inline-block
9
+ footer,
10
+ .push
11
+ height: 32px
11
12
 
12
13
 
@@ -1,3 +1,6 @@
1
+ html,
2
+ body
3
+ height: 100%
1
4
  body
2
5
  background-color: #f9f9f9
3
6
  color: #555
@@ -6,7 +9,7 @@ body
6
9
 
7
10
 
8
11
  .wrapper
9
- min-height: 100%
12
+ min-height: 95%
10
13
  height: auto !important
11
14
  margin: 0 auto -32px
12
15
 
@@ -33,3 +33,51 @@
33
33
  @mixin hidden-desktop
34
34
  @extend .hidden-desktop
35
35
 
36
+
37
+ @mixin contact-style
38
+ .avatar
39
+ img
40
+ @include border-radius(5px)
41
+ .data
42
+ .name
43
+ color: $black
44
+ .x
45
+ font-size: 12px
46
+ color: $black
47
+ a
48
+ text-decoration: none
49
+ .info
50
+ font-size: 11px
51
+ color: #777
52
+ font-family: $sansFontFamilyLight
53
+ .add
54
+ @include btn-add
55
+
56
+ @mixin contact-layout
57
+ margin: 4px 0 19px 14px
58
+ width: 240px
59
+ min-height: 76px
60
+ float: left
61
+ .avatar
62
+ width: 45px !important
63
+ float: left
64
+ .data
65
+ display: inline-block
66
+ margin: 2px 0 3px 3px
67
+ float: left
68
+ width: 65%
69
+ .info
70
+ z-index: 1
71
+ a
72
+ display: inline
73
+ .x
74
+ a
75
+ float: right
76
+ display: inline-block
77
+ margin-right: 16px
78
+ margin-top: -98px
79
+ .info
80
+ z-index: 1
81
+ .add
82
+ margin-top: 2px
83
+ width: auto
@@ -7,32 +7,28 @@
7
7
  margin-bottom: 10px
8
8
  .colorfont-overlay
9
9
  top: 20px !important
10
- .tags,
11
- .personal,
12
- .comunication-info,
13
- .experience,
14
- .avatar
15
- input,
16
- textarea
17
- background-color: $whiteSmoke
18
- .briefing
19
- background-color: $white
20
- color: $gray
21
- span
22
- @include border-radius(5px)
23
- background-color: #D9EDF7
24
- border: 1px solid #BCE8F1
25
- color: #3A87AD
26
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5)
27
- p
28
- border-top: 5px solid $whiteSmoke
29
- background-color: none
30
-
10
+ input,
11
+ textarea
12
+ background-color: $whiteSmoke
13
+ .briefing
14
+ background-color: $white
15
+ color: $gray
16
+ span
17
+ @include border-radius(5px)
18
+ background-color: #D9EDF7
19
+ border: 1px solid #BCE8F1
20
+ color: #3A87AD
21
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5)
22
+ p
23
+ border-top: 5px solid $whiteSmoke
24
+ background-color: none
25
+
31
26
 
32
- form.edit_profile
33
- input
34
- &[type="submit"]
35
- @include btn-secundary
27
+ form.edit_profile
28
+ input
29
+ &[type="submit"]
30
+ @include btn-secundary
31
+
36
32
  .personal
37
33
  form.edit_profile
38
34
  h6
@@ -3,31 +3,5 @@
3
3
  #pendings
4
4
  h4
5
5
  font-size: 33.5px
6
-
7
6
  .contact
8
- .avatar
9
- img
10
- @include border-radius(5px)
11
-
12
- .data
13
- .name
14
- color: $black
15
- .x
16
- font-size: 12px
17
- color: $black
18
- a
19
- text-decoration: none
20
- .info
21
- font-size: 11px
22
- color: #777
23
- font-family: $sansFontFamilyLight
24
-
25
- .add
26
- @include btn-add
27
-
28
- .see-more
29
- font-size: 12px
30
- line-height: 20px
31
- a
32
- text-decoration: none
33
- color: $grayLight
7
+ @include contact-style
@@ -4,30 +4,7 @@
4
4
  width: 22.85714%
5
5
  float: right
6
6
  .contact
7
- margin: 4px 0
8
- .avatar
9
- width: 45px !important
10
- float: left
11
- .data
12
- display: inline-block
13
- margin: 2px 0 3px 3px
14
- float: left
15
- width: 65%
16
- .info
17
- z-index: 1
18
- a
19
- display: inline
20
- .x
21
- a
22
- float: right
23
- display: inline-block
24
- margin-right: 16px
25
- margin-top: -98px
26
- .info
27
- z-index: 1
28
- .add
29
- margin-top: 2px
30
- width: auto
7
+ @include contact-layout
31
8
 
32
9
  #suggestions
33
10
  margin-top: 30px
@@ -5,8 +5,6 @@
5
5
  li
6
6
  @include btn-primary
7
7
  @include border-radius(5px)
8
- padding: 4px 7px
9
- margin-bottom: 5px
10
8
  a
11
9
  @include ellipsis
12
10
  .icon_tool16-info
@@ -63,9 +61,6 @@
63
61
 
64
62
  #toolbar
65
63
  h5
66
- position: relative
67
- margin-top: 7px
68
- margin-bottom: 16px
69
64
  font-size: 16px
70
65
  @include ellipsis
71
66
  a
@@ -80,11 +75,8 @@
80
75
 
81
76
  .contacts-toolbar,
82
77
  section.groups
83
- @extend .hidden-phone
84
78
  h4
85
- margin-bottom: 0px
86
79
  font-family: $sansFontFamilyLight
87
- border-bottom: 1px solid #ddd
88
80
  ul
89
81
  border-right: 1px solid #ddd
90
82
  img
@@ -103,10 +95,9 @@
103
95
  @include ellipsis
104
96
  img
105
97
  @include border-radius(5px)
98
+ .subject-name
99
+ @include ellipsis
106
100
  .subject-name-phone
107
- position: relative
108
- margin-top: 7px
109
- margin-bottom: 16px
110
101
  font-size: 16px
111
102
  @include ellipsis
112
103
  a
@@ -1,4 +1,9 @@
1
- #toolbar
1
+ #toolbar
2
+ h5
3
+ position: relative
4
+ margin-top: 7px
5
+ margin-bottom: 16px
6
+
2
7
  .contact-button
3
8
  .btn-group
4
9
  width: 100%
@@ -9,7 +14,7 @@
9
14
  .caret
10
15
  margin-left: 14px
11
16
 
12
-
17
+
13
18
  .icon_navbar-message-blue,
14
19
  .icon_tool16-info
15
20
  margin-right: 4px
@@ -61,11 +66,12 @@
61
66
  .logo_home
62
67
 
63
68
  .subject-name
64
- @include ellipsis
65
69
  @extend .hidden-phone
66
70
  .subject-name-phone
67
- @include ellipsis
68
71
  display: none
72
+ position: relative
73
+ margin-top: 7px
74
+ margin-bottom: 16px
69
75
  @extend .visible-phone
70
76
 
71
77
 
@@ -89,4 +95,11 @@
89
95
  img,
90
96
  .icon_navbar-message-blue,
91
97
  .icon_tool16-info
92
- margin-right: 4px
98
+ margin-right: 4px
99
+
100
+ .toolbar-profile
101
+ .toolbar_menu
102
+ ul
103
+ li
104
+ padding: 4px 7px
105
+ margin-bottom: 5px