social_stream 0.19.2 → 0.19.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.travis.yml +1 -1
  2. data/README.rdoc +1 -1
  3. data/base/app/assets/stylesheets/cheesecake.css.scss +43 -12
  4. data/base/app/controllers/contacts_controller.rb +1 -1
  5. data/base/app/models/activity.rb +4 -1
  6. data/base/app/models/actor.rb +2 -14
  7. data/base/app/models/relation.rb +2 -4
  8. data/base/app/models/relation/single.rb +2 -7
  9. data/base/app/models/tie.rb +2 -1
  10. data/base/app/views/activities/_new.html.erb +1 -1
  11. data/base/app/views/cheesecake/_cheesecake.html.erb +170 -105
  12. data/base/app/views/cheesecake/_index.html.erb +45 -47
  13. data/base/app/views/cheesecake/_sector_form.html.erb +1 -0
  14. data/base/app/views/toolbar/_home.html.erb +1 -1
  15. data/base/config/locales/en.yml +2 -0
  16. data/base/config/locales/es.yml +2 -0
  17. data/base/config/locales/rails.es.yml +192 -0
  18. data/base/db/migrate/20110912074426_add_reject_relation.rb +2 -2
  19. data/base/db/migrate/20120201185454_singleton_single_relations.rb +46 -0
  20. data/base/lib/social_stream/base/version.rb +1 -1
  21. data/base/lib/tasks/db/populate.rake +1 -1
  22. data/base/spec/controllers/posts_controller_spec.rb +2 -2
  23. data/base/spec/factories/activity.rb +1 -1
  24. data/base/spec/factories/post.rb +1 -1
  25. data/base/spec/factories/tie.rb +3 -3
  26. data/base/spec/models/activity_authorization_spec.rb +3 -3
  27. data/base/spec/support/db.rb +3 -1
  28. data/documents/app/assets/images/48/{word.png → doc.png} +0 -0
  29. data/documents/app/assets/images/48/{excel.png → xls.png} +0 -0
  30. data/documents/lib/social_stream/documents/version.rb +1 -1
  31. data/documents/social_stream-documents.gemspec +1 -1
  32. data/documents/spec/factories/document.rb +1 -1
  33. data/documents/spec/factories/picture.rb +1 -1
  34. data/documents/spec/support/db.rb +3 -3
  35. data/events/app/views/events/_sidebar_calendar.html.erb +5 -5
  36. data/events/lib/social_stream/events/version.rb +1 -1
  37. data/events/social_stream-events.gemspec +1 -1
  38. data/lib/social_stream/version.rb +1 -1
  39. data/linkser/db/migrate/20120202104549_add_links_foreign_key.rb +9 -0
  40. data/presence/app/assets/javascripts/chat_interface_manager.js.erb +167 -177
  41. data/presence/app/assets/javascripts/chat_persistence.js +194 -0
  42. data/presence/app/assets/javascripts/chat_utilities.js +15 -0
  43. data/presence/app/assets/javascripts/chat_window_manager.js +57 -1
  44. data/presence/app/assets/javascripts/xmpp_client_management.js.erb +191 -143
  45. data/presence/app/assets/stylesheets/chat.css.scss +4 -5
  46. data/presence/app/views/chat/_contacts.html.erb +2 -5
  47. data/presence/app/views/chat/_index.html.erb +46 -32
  48. data/presence/app/views/chat/_off.html.erb +2 -2
  49. data/presence/config/routes.rb +1 -1
  50. data/presence/lib/social_stream/presence/version.rb +1 -1
  51. data/presence/vendor/assets/javascripts/jquery.ui.chatbox.js +14 -11
  52. data/social_stream.gemspec +4 -4
  53. data/spec/support/db.rb +4 -4
  54. metadata +37 -32
@@ -91,11 +91,7 @@ div.ui-chatbox-notify{
91
91
  background: $fill-color;
92
92
  background-color: $fill-color;
93
93
  color: black;
94
- z-index: 1;
95
- position:absolute;
96
- top: 0;
97
- margin-top: 30px;
98
- padding: 4px 0px 4px 0px;
94
+ height: 12px;
99
95
  width: 236px;
100
96
  text-align: center;
101
97
  border-style:solid;
@@ -103,9 +99,12 @@ div.ui-chatbox-notify{
103
99
  border-color: $fill-color;
104
100
  opacity:0.95;
105
101
  filter:alpha(opacity=95); /* For IE8 and earlier */
102
+ padding: 5px 0px 5px 0px;
103
+ display: none;
106
104
  }
107
105
 
108
106
  p.ui-chatbox-notify-text{
107
+ margin-top: 10px;
109
108
  text-align: center;
110
109
  font-weight: bold;
111
110
  }
@@ -12,7 +12,7 @@
12
12
  <dt><a href=""><span><%=t('chat.status.choose')%></span></a></dt>
13
13
  <dd>
14
14
  <ul>
15
- <li><a id="available" href="#" class="option"><img class="flag" src="assets/status/available.png" alt=""/> <%=t('chat.status.available')%> <span class="value">chat</span></a></li>
15
+ <li><a id="available" href="#" class="option"><img class="flag" src="assets/status/available.png" alt=""/> <%=t('chat.status.available')%> <span class="value">available</span></a></li>
16
16
  <li><a id="away" href="#" class="option"><img class="flag" src="assets/status/away.png" alt=""/> <%=t('chat.status.away')%> <span class="value">away</span></a></li>
17
17
  <li><a id="dnd" href="#" class="option"><img class="flag" src="assets/status/dnd.png" alt=""/> <%=t('chat.status.dnd')%> <span class="value">dnd</span></a></li>
18
18
  <li><a id="offline" href="#" class="option"><img class="flag" src="assets/status/offline.png" alt=""/> <%=t('chat.status.offline')%> <span class="value">offline</span></a></li>
@@ -41,7 +41,4 @@
41
41
 
42
42
  </div>
43
43
 
44
- <div id="chat_divs">
45
- <div id="chat_div">
46
- </div>
47
- </div>
44
+
@@ -1,41 +1,55 @@
1
+ <% flow = false %>
2
+
3
+
1
4
  <% if current_user and current_user.chat_enabled and current_subject.subject_type=="User" %>
2
5
 
6
+ <div id="chat_wrapper">
7
+ <div id="chat_partial">
8
+ <%= render :partial => 'chat/connecting' %>
9
+ </div>
10
+ <div id="chat_divs">
11
+ <div id="chat_div"></div>
12
+ </div>
13
+ </div>
3
14
 
4
- <script type="text/javascript">
5
15
 
6
- //Global variables
7
- var BOSH_SERVICE = '<%= SocialStream::Presence.bosh_service || root_url + "http-bind/" %>';
8
- var cookie = "AuthenticationByCookie>>" + "<%=cookies[Rails.application.config.session_options[:key]]%>";
9
- var domain = '<%=SocialStream::Presence.domain%>';
10
- var user_name = '<%=current_user.name%>';
11
- var user_slug = '<%=current_user.slug%>';
12
- var user_jid = '<%=current_user.slug%>'+"@"+domain;
13
- var sound_path = "/assets/audio/chat/onMessage";
16
+ <script type="text/javascript">
14
17
 
18
+ //Global variables
19
+ var cookie = "AuthenticationByCookie>>" + "<%=cookies[Rails.application.config.session_options[:key]]%>";
20
+ var BOSH_SERVICE = '<%= SocialStream::Presence.bosh_service || root_url + "http-bind/" %>';
21
+ var user_name = '<%=current_user.name%>';
22
+ var user_slug = '<%=current_user.slug%>';
23
+ var user_jid = '<%=current_user.slug%>'+"@"+domain;
15
24
 
16
- $(document).ready(function () {
17
-
18
- if (authByCookie()){
19
- if (connectToServerWithCookie()==false){
20
- refreshChatWindow();
21
- }
22
- } else {
23
- if (connectToServerWithPassword(null)==false){
24
- refreshChatWindow();
25
- }
26
- }
27
-
28
- initialTimer = setTimeout("updateChatWindow()", 15000);
29
- initAudio();
30
- initFocusListeners();
31
-
32
- });
33
-
34
- </script>
25
+
26
+ $(document).ready(function () {
27
+
28
+ if(getRestoreUserChatStatus()!="offline"){
29
+ connectToChat(user_jid,cookie,null);
30
+ //connectToChat(user_jid,null,null); //To use auth by password.
31
+
32
+ initialTimer = setTimeout("updateChatWindow()", 15000);
33
+ } else {
34
+ initialTimer = setTimeout("updateChatWindow()", 1);
35
+ }
36
+
37
+ initAudio();
38
+ initFocusListeners();
35
39
 
40
+ });
41
+
42
+ </script>
43
+
44
+ <% if flow %>
45
+ <script type="text/javascript">
46
+ $(document).ready(function () {
47
+ createMainChatBox();
48
+ addContentToMainChatBox($("#chat_partial"));
49
+ $("#chat_wrapper").find("#chat_partial").remove();
50
+ });
51
+ </script>
52
+ <% end %>
53
+
36
54
 
37
- <div id="chat_partial">
38
- <%= render :partial => 'chat/connecting' %>
39
- </div>
40
-
41
55
  <% end %>
@@ -7,7 +7,7 @@
7
7
  $("#passwordFormChat").hide();
8
8
  $('.connectChatButton').bind('click', function () {
9
9
  if (requestConnectToChat()){
10
- connectToServerWithCookie();
10
+ connectToChat(user_jid,cookie,null);
11
11
  }
12
12
  });
13
13
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  $('.connectChatButton').bind('click', function () {
24
24
  if (requestConnectToChat()) {
25
- connectToServerWithPassword($('#user_password').val());
25
+ connectToChat(user_jid,null,$('#user_password').val());
26
26
  }
27
27
  });
28
28
 
@@ -1,5 +1,5 @@
1
1
  Rails.application.routes.draw do
2
- #match "/active_users" => "Xmpp#active_users"
2
+ match "/active_users" => "Xmpp#active_users"
3
3
 
4
4
  match '/xmpp/setConnection' => "Xmpp#setConnection"
5
5
  match '/xmpp/unsetConnection' => "Xmpp#unsetConecction"
@@ -1,5 +1,5 @@
1
1
  module Socialstream
2
2
  module Presence
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
@@ -196,6 +196,19 @@
196
196
  )
197
197
  .appendTo(uiChatbox),
198
198
 
199
+
200
+ //Notification div
201
+ uiChatboxNotify = (self.uiChatboxNotify = $('<div></div>'))
202
+ .addClass('ui-widget-content ' +
203
+ 'ui-chatbox-notify'
204
+ )
205
+ .click(function(event) {
206
+ // anything?
207
+ self.uiChatboxNotify.fadeOut();
208
+ })
209
+ .appendTo(uiChatboxContent),
210
+
211
+
199
212
  //VideoBox div
200
213
  uiVideobox = (self.uiVideobox = $('<div></div>'))
201
214
  .addClass('ui-widget-content ' +
@@ -207,6 +220,7 @@
207
220
  })
208
221
  .appendTo(uiChatboxContent),
209
222
 
223
+
210
224
  //ChatBoxLog
211
225
  uiChatboxLog = (self.uiChatboxLog = self.element)
212
226
  //.show()
@@ -215,17 +229,6 @@
215
229
  )
216
230
  .appendTo(uiChatboxContent),
217
231
 
218
- //Notification div
219
- uiChatboxNotify = (self.uiChatboxNotify = $('<div></div>'))
220
- .addClass('ui-widget-content ' +
221
- 'ui-chatbox-notify'
222
- )
223
- .click(function(event) {
224
- // anything?
225
- self.uiChatboxNotify.fadeOut();
226
- })
227
- .appendTo(uiChatboxContent),
228
-
229
232
 
230
233
  uiChatboxInput = (self.uiChatboxInput = $('<div></div>'))
231
234
  .addClass('ui-widget-content ' +
@@ -11,11 +11,11 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files`.split("\n")
12
12
 
13
13
  # Gem dependencies
14
- s.add_runtime_dependency('social_stream-base', '~> 0.14.2')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.9.0')
16
- s.add_runtime_dependency('social_stream-events', '~> 0.6.1')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.14.3')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.9.1')
16
+ s.add_runtime_dependency('social_stream-events', '~> 0.6.2')
17
17
  s.add_runtime_dependency('social_stream-linkser', '~> 0.4.0')
18
- s.add_runtime_dependency('social_stream-presence', '~> 0.5.0')
18
+ s.add_runtime_dependency('social_stream-presence', '~> 0.5.2')
19
19
 
20
20
  # Development Gem dependencies
21
21
  #
data/spec/support/db.rb CHANGED
@@ -1,3 +1,7 @@
1
+ ActiveRecord::Base.connection.tables.each do |t|
2
+ ActiveRecord::Base.connection.drop_table t
3
+ end
4
+
1
5
  gems = %w{ documents events linkser presence }
2
6
 
3
7
  gems.each do |g|
@@ -6,10 +10,6 @@ end
6
10
 
7
11
  gems.unshift("base")
8
12
 
9
- gems.reverse.each do |g|
10
- "SocialStream::Migrations::#{ g.camelize }".constantize.new.down
11
- end
12
-
13
13
  gems.each do |g|
14
14
  "SocialStream::Migrations::#{ g.camelize }".constantize.new.up
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.19.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,44 +10,44 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-01 00:00:00.000000000Z
13
+ date: 2012-02-03 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
17
- requirement: &88831090 !ruby/object:Gem::Requirement
17
+ requirement: &87805300 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.14.2
22
+ version: 0.14.3
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *88831090
25
+ version_requirements: *87805300
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: social_stream-documents
28
- requirement: &88830720 !ruby/object:Gem::Requirement
28
+ requirement: &87805030 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.0
33
+ version: 0.9.1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *88830720
36
+ version_requirements: *87805030
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: social_stream-events
39
- requirement: &88830370 !ruby/object:Gem::Requirement
39
+ requirement: &87804790 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 0.6.1
44
+ version: 0.6.2
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *88830370
47
+ version_requirements: *87804790
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: social_stream-linkser
50
- requirement: &88830030 !ruby/object:Gem::Requirement
50
+ requirement: &87804550 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,21 +55,21 @@ dependencies:
55
55
  version: 0.4.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *88830030
58
+ version_requirements: *87804550
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: social_stream-presence
61
- requirement: &88829670 !ruby/object:Gem::Requirement
61
+ requirement: &87804320 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
65
65
  - !ruby/object:Gem::Version
66
- version: 0.5.0
66
+ version: 0.5.2
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *88829670
69
+ version_requirements: *87804320
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: capybara
72
- requirement: &88829340 !ruby/object:Gem::Requirement
72
+ requirement: &87804090 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 0.3.9
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *88829340
80
+ version_requirements: *87804090
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: sqlite3
83
- requirement: &88829040 !ruby/object:Gem::Requirement
83
+ requirement: &87803880 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *88829040
91
+ version_requirements: *87803880
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: ruby-debug19
94
- requirement: &88828640 !ruby/object:Gem::Requirement
94
+ requirement: &87803630 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *88828640
102
+ version_requirements: *87803630
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec-rails
105
- requirement: &88828340 !ruby/object:Gem::Requirement
105
+ requirement: &87803380 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 2.8.0
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *88828340
113
+ version_requirements: *87803380
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: factory_girl
116
- requirement: &88828080 !ruby/object:Gem::Requirement
116
+ requirement: &87785500 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ~>
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 1.3.2
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *88828080
124
+ version_requirements: *87785500
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: forgery
127
- requirement: &88827830 !ruby/object:Gem::Requirement
127
+ requirement: &87785270 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ~>
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: 0.4.2
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *88827830
135
+ version_requirements: *87785270
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: ci_reporter
138
- requirement: &88827590 !ruby/object:Gem::Requirement
138
+ requirement: &87785040 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ~>
@@ -143,7 +143,7 @@ dependencies:
143
143
  version: 1.6.4
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *88827590
146
+ version_requirements: *87785040
147
147
  description: Social Stream is a Ruby on Rails engine for building social network websites.
148
148
  It supports contacts, posts, file uploads, private messages and many more.
149
149
  email:
@@ -460,6 +460,7 @@ files:
460
460
  - base/app/views/avatars/update.js.erb
461
461
  - base/app/views/cheesecake/_cheesecake.html.erb
462
462
  - base/app/views/cheesecake/_index.html.erb
463
+ - base/app/views/cheesecake/_sector_form.html.erb
463
464
  - base/app/views/cheesecake/index.html.erb
464
465
  - base/app/views/cheesecake/update.js.erb
465
466
  - base/app/views/comments/_comment.html.erb
@@ -633,6 +634,7 @@ files:
633
634
  - base/app/views/users/show.xml.builder
634
635
  - base/config/locales/en.yml
635
636
  - base/config/locales/es.yml
637
+ - base/config/locales/rails.es.yml
636
638
  - base/config/routes.rb
637
639
  - base/db/migrate/20110610112023_create_social_stream.rb
638
640
  - base/db/migrate/20110705103202_empty_ties_count.rb
@@ -645,6 +647,7 @@ files:
645
647
  - base/db/migrate/20120109081509_update_notify_permissions.rb
646
648
  - base/db/migrate/20120111120920_remove_language_default.rb
647
649
  - base/db/migrate/20120111141717_activity_channels.rb
650
+ - base/db/migrate/20120201185454_singleton_single_relations.rb
648
651
  - base/lib/acts_as_taggable_on/acts_as_taggable_on/dirty.rb
649
652
  - base/lib/acts_as_taggable_on/social_stream.rb
650
653
  - base/lib/generators/social_stream/base/install_generator.rb
@@ -825,14 +828,14 @@ files:
825
828
  - documents/app/assets/images/16/zip.png
826
829
  - documents/app/assets/images/48/audio.png
827
830
  - documents/app/assets/images/48/default.png
828
- - documents/app/assets/images/48/excel.png
831
+ - documents/app/assets/images/48/doc.png
829
832
  - documents/app/assets/images/48/mpeg.png
830
833
  - documents/app/assets/images/48/pdf.png
831
834
  - documents/app/assets/images/48/ppt.png
832
835
  - documents/app/assets/images/48/rar.png
833
836
  - documents/app/assets/images/48/resource.png
834
837
  - documents/app/assets/images/48/video.png
835
- - documents/app/assets/images/48/word.png
838
+ - documents/app/assets/images/48/xls.png
836
839
  - documents/app/assets/images/48/zip.png
837
840
  - documents/app/assets/images/btn/btn_audio.png
838
841
  - documents/app/assets/images/btn/btn_document.png
@@ -1073,6 +1076,7 @@ files:
1073
1076
  - linkser/config/routes.rb
1074
1077
  - linkser/db/migrate/20111129100618_create_social_stream_linkser.rb
1075
1078
  - linkser/db/migrate/20111219122952_add_width_height_to_link.rb
1079
+ - linkser/db/migrate/20120202104549_add_links_foreign_key.rb
1076
1080
  - linkser/lib/generators/social_stream/linkser/install_generator.rb
1077
1081
  - linkser/lib/social_stream-linkser.rb
1078
1082
  - linkser/lib/social_stream/linkser/engine.rb
@@ -1191,6 +1195,7 @@ files:
1191
1195
  - presence/app/assets/javascripts/chat_audio.js
1192
1196
  - presence/app/assets/javascripts/chat_interface_manager.js.erb
1193
1197
  - presence/app/assets/javascripts/chat_parser.js
1198
+ - presence/app/assets/javascripts/chat_persistence.js
1194
1199
  - presence/app/assets/javascripts/chat_utilities.js
1195
1200
  - presence/app/assets/javascripts/chat_window_manager.js
1196
1201
  - presence/app/assets/javascripts/social_stream-presence.js