social_stream 0.12.8 → 0.12.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/base/app/assets/stylesheets/header.css.scss +2 -2
  2. data/base/app/controllers/conversations_controller.rb +1 -1
  3. data/base/app/views/settings/_index.html.erb +3 -0
  4. data/base/app/views/toolbar/_home.html.erb +1 -1
  5. data/base/config/locales/en.yml +2 -1
  6. data/base/config/locales/es.yml +3 -2
  7. data/base/lib/social_stream/base/version.rb +1 -1
  8. data/documents/config/locales/es.yml +1 -1
  9. data/documents/lib/social_stream/documents/version.rb +1 -1
  10. data/documents/social_stream-documents.gemspec +1 -1
  11. data/lib/social_stream/version.rb +1 -1
  12. data/presence/app/assets/javascripts/chat_audio.js +73 -0
  13. data/presence/app/assets/javascripts/chat_interface_manager.js.erb +197 -0
  14. data/presence/app/assets/javascripts/chat_parser.js +243 -0
  15. data/presence/app/assets/javascripts/chat_utilities.js +71 -0
  16. data/presence/app/assets/javascripts/chat_window_manager.js +138 -0
  17. data/presence/app/assets/javascripts/social_stream-presence.js +3 -0
  18. data/presence/app/assets/javascripts/store.js +0 -7
  19. data/presence/app/assets/javascripts/xmpp_client_management.js.erb +304 -0
  20. data/presence/app/assets/stylesheets/chat.css +40 -0
  21. data/presence/app/assets/stylesheets/social_stream-presence.css +1 -0
  22. data/presence/app/controllers/xmpp_controller.rb +43 -9
  23. data/presence/app/views/{xmpp/_chat_connecting.html.erb → chat/_connecting.html.erb} +0 -0
  24. data/presence/app/views/{xmpp/_chat_contacts.html.erb → chat/_contacts.html.erb} +0 -0
  25. data/presence/app/views/{xmpp/_chat.html.erb → chat/_index.html.erb} +3 -13
  26. data/presence/app/views/{xmpp/_chat_off.html.erb → chat/_off.html.erb} +0 -0
  27. data/presence/app/views/chat/_settings.html.erb +38 -0
  28. data/presence/config/routes.rb +1 -1
  29. data/presence/db/migrate/20111116194112_add_chat_enabled_column_to_user.rb +9 -0
  30. data/presence/{app → vendor}/assets/javascripts/jquery.tools.tooltip.js +0 -0
  31. data/presence/{app → vendor}/assets/javascripts/jquery.ui.chatbox.js +14 -12
  32. data/presence/{app → vendor}/assets/javascripts/strophe.js +0 -0
  33. data/presence/{app → vendor}/assets/stylesheets/jquery.ui.chatbox.css +0 -0
  34. data/social_stream.gemspec +2 -2
  35. metadata +26 -21
  36. data/presence/app/assets/javascripts/jquery-ui-1.8.14.custom.min.js +0 -789
  37. data/presence/app/assets/javascripts/jquery.tools.min.js +0 -17
  38. data/presence/app/assets/javascripts/xmpp_client.js.erb +0 -962
@@ -0,0 +1,38 @@
1
+ <% if current_user and current_subject and current_user==current_subject %>
2
+
3
+ <div class="block" id="chat_settings">
4
+ <div class="header">
5
+ <div class="header_text">
6
+ Chat
7
+ </div>
8
+ <div class="header_icon_right">
9
+ <%= link_to (image_tag('btn/edit.png')), "javascript:showSettings(\"chat_settings\");" %>
10
+ </div>
11
+ </div>
12
+ <div id="chat_settings_briefing" class="settings_briefing content">
13
+ <div class="form_row">
14
+ Enable and configure Social Stream Chat
15
+ </div>
16
+ </div>
17
+ <div class="content settings_content" id="chat_settings_content" style="display:none;">
18
+ <%= form_tag(:controller => "Xmpp", :action => "updateSettings", :method => "get") do %>
19
+ <ul>
20
+ <div class="settings_block">
21
+ <div class="form_row">
22
+ </div>
23
+ <div class="form_sub_row">
24
+ <% checked = current_user.chat_enabled %>
25
+ <%= check_box_tag 'enable_chat', true, checked %>
26
+ <%= label_tag(:enable_chat, "Enable or disable Social Stream Chat") %>
27
+ </div>
28
+ <div class="actions center">
29
+ <%= hidden_field_tag :settings_section, :chat %>
30
+ <%= submit_tag "Update Settings", :class => "button" %>
31
+ </div>
32
+ </div>
33
+ </ul>
34
+ <% end %>
35
+ </div>
36
+ </div>
37
+
38
+ <% end %>
@@ -11,6 +11,6 @@ Rails.application.routes.draw do
11
11
  match '/xmpp/setPresence' => "Xmpp#setPresence"
12
12
  match '/xmpp/unsetPresence' => "Xmpp#unsetPresence"
13
13
  match '/chatWindow'=> "Xmpp#chatWindow"
14
- match '/chatAuthWithCookie'=> "Xmpp#chatAuthWithCookie"
14
+ match '/xmpp/updateSettings'=> "Xmpp#updateSettings"
15
15
 
16
16
  end
@@ -0,0 +1,9 @@
1
+ class AddChatEnabledColumnToUser < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :users, :chat_enabled, :boolean, :default => true
4
+ end
5
+
6
+ def self.down
7
+ remove_column :users, :chat_enabled
8
+ end
9
+ end
@@ -43,17 +43,21 @@
43
43
  self._scrollToBottom();
44
44
 
45
45
  if(!self.elem.uiChatboxTitlebar.hasClass("ui-state-focus") && !self.highlightLock) {
46
- self.highlightLock = true;
47
- self.highlightBox();
46
+ self.highlightLock = true;
47
+ self.highlightBox();
48
48
  }
49
49
  },
50
50
  highlightBox: function() {
51
- //this.elem.uiChatbox.addClass("ui-state-highlight");
51
+ this.elem.uiChatbox.addClass("ui-state-highlight");
52
52
  var self = this;
53
- self.elem.uiChatboxTitlebar.effect("highlight", {}, 300);
53
+
54
+ //Get highlight color from css
55
+ var dummy_element = $("<p class=\"chatWindowhighlighted\"></div>");
56
+ var options = {color: $(dummy_element).css("color")};
57
+ self.elem.uiChatboxTitlebar.effect("highlight", options, 300);
54
58
  self.elem.uiChatbox.effect("bounce", {times:3}, 300, function(){
55
- self.highlightLock = false;
56
- self._scrollToBottom();
59
+ self.highlightLock = false;
60
+ self._scrollToBottom();
57
61
  });
58
62
  },
59
63
  toggleBox: function(show) {
@@ -69,7 +73,7 @@
69
73
  toggleContent: function(event) {
70
74
  this.uiChatboxContent.toggle();
71
75
  if(this.uiChatboxContent.is(":visible")) {
72
- this.uiChatboxInputBox.focus();
76
+ this.uiChatboxInputBox.focus();
73
77
  }
74
78
  },
75
79
 
@@ -91,7 +95,7 @@
91
95
  .attr('outline', 0)
92
96
  .focusin(function(){
93
97
  // ui-state-highlight is not really helpful here
94
- //self.uiChatbox.removeClass('ui-state-highlight');
98
+ self.uiChatbox.removeClass('ui-state-highlight');
95
99
  self.uiChatboxTitlebar.addClass('ui-state-focus');
96
100
  })
97
101
  .focusout(function(){
@@ -131,8 +135,7 @@
131
135
  })
132
136
  .appendTo(uiChatboxTitlebar),
133
137
  uiChatboxTitlebarCloseText = $('<span></span>')
134
- .addClass('ui-icon ' +
135
- 'ui-icon-closethick')
138
+ .addClass('ui-icon-closethick ' + 'chat-thick ' + 'chat-closethick')
136
139
  .text('close')
137
140
  .appendTo(uiChatboxTitlebarClose),
138
141
  uiChatboxTitlebarMinimize = (self.uiChatboxTitlebarMinimize = $('<a href="#"></a>'))
@@ -154,8 +157,7 @@
154
157
  })
155
158
  .appendTo(uiChatboxTitlebar),
156
159
  uiChatboxTitlebarMinimizeText = $('<span></span>')
157
- .addClass('ui-icon ' +
158
- 'ui-icon-minusthick')
160
+ .addClass('ui-icon-minusthick ' + 'chat-thick ' + ' chat-minusthick')
159
161
  .text('minimize')
160
162
  .appendTo(uiChatboxTitlebarMinimize),
161
163
  // content
@@ -11,8 +11,8 @@ 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.9.30')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.4.4')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.9.31')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.4.5')
16
16
  s.add_runtime_dependency('social_stream-events', '~> 0.0.20')
17
17
 
18
18
  # Development Gem dependencies
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 12
9
- - 8
10
- version: 0.12.8
9
+ - 9
10
+ version: 0.12.9
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-11-16 00:00:00 +01:00
19
+ date: 2011-11-17 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- hash: 7
30
+ hash: 5
31
31
  segments:
32
32
  - 0
33
33
  - 9
34
- - 30
35
- version: 0.9.30
34
+ - 31
35
+ version: 0.9.31
36
36
  type: :runtime
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency
@@ -43,12 +43,12 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- hash: 7
46
+ hash: 5
47
47
  segments:
48
48
  - 0
49
49
  - 4
50
- - 4
51
- version: 0.4.4
50
+ - 5
51
+ version: 0.4.5
52
52
  type: :runtime
53
53
  version_requirements: *id002
54
54
  - !ruby/object:Gem::Dependency
@@ -1135,23 +1135,23 @@ files:
1135
1135
  - presence/app/assets/images/status/available.png
1136
1136
  - presence/app/assets/images/status/away.png
1137
1137
  - presence/app/assets/images/status/dnd.png
1138
- - presence/app/assets/javascripts/jquery-ui-1.8.14.custom.min.js
1139
- - presence/app/assets/javascripts/jquery.tools.min.js
1140
- - presence/app/assets/javascripts/jquery.tools.tooltip.js
1141
- - presence/app/assets/javascripts/jquery.ui.chatbox.js
1138
+ - presence/app/assets/javascripts/chat_audio.js
1139
+ - presence/app/assets/javascripts/chat_interface_manager.js.erb
1140
+ - presence/app/assets/javascripts/chat_parser.js
1141
+ - presence/app/assets/javascripts/chat_utilities.js
1142
+ - presence/app/assets/javascripts/chat_window_manager.js
1142
1143
  - presence/app/assets/javascripts/social_stream-presence.js
1143
1144
  - presence/app/assets/javascripts/store.js
1144
- - presence/app/assets/javascripts/strophe.js
1145
- - presence/app/assets/javascripts/xmpp_client.js.erb
1145
+ - presence/app/assets/javascripts/xmpp_client_management.js.erb
1146
1146
  - presence/app/assets/stylesheets/chat.css
1147
- - presence/app/assets/stylesheets/jquery.ui.chatbox.css
1148
1147
  - presence/app/assets/stylesheets/social_stream-presence.css
1149
1148
  - presence/app/controllers/xmpp_controller.rb
1150
1149
  - presence/app/helpers/xmpp_helper.rb
1151
- - presence/app/views/xmpp/_chat.html.erb
1152
- - presence/app/views/xmpp/_chat_connecting.html.erb
1153
- - presence/app/views/xmpp/_chat_contacts.html.erb
1154
- - presence/app/views/xmpp/_chat_off.html.erb
1150
+ - presence/app/views/chat/_connecting.html.erb
1151
+ - presence/app/views/chat/_contacts.html.erb
1152
+ - presence/app/views/chat/_index.html.erb
1153
+ - presence/app/views/chat/_off.html.erb
1154
+ - presence/app/views/chat/_settings.html.erb
1155
1155
  - presence/app/views/xmpp/active_users.html.erb
1156
1156
  - presence/app/views/xmpp/index.html
1157
1157
  - presence/app/views/xmpp/test.html.erb
@@ -1160,6 +1160,7 @@ files:
1160
1160
  - presence/config/routes.rb
1161
1161
  - presence/db/migrate/20110711111408_add_connected_column_to_user.rb
1162
1162
  - presence/db/migrate/20110928135031_add_status_column_to_user.rb
1163
+ - presence/db/migrate/20111116194112_add_chat_enabled_column_to_user.rb
1163
1164
  - presence/ejabberd/conf/ejabberd_example.cfg
1164
1165
  - presence/ejabberd/conf/ssconfig_example.cfg
1165
1166
  - presence/ejabberd/ejabberd_scripts/authentication_script
@@ -1241,6 +1242,10 @@ files:
1241
1242
  - presence/spec/demo/vendor/plugins/.gitkeep
1242
1243
  - presence/spec/discover.rb
1243
1244
  - presence/spec/spec_helper.rb
1245
+ - presence/vendor/assets/javascripts/jquery.tools.tooltip.js
1246
+ - presence/vendor/assets/javascripts/jquery.ui.chatbox.js
1247
+ - presence/vendor/assets/javascripts/strophe.js
1248
+ - presence/vendor/assets/stylesheets/jquery.ui.chatbox.css
1244
1249
  - social_stream.gemspec
1245
1250
  - social_stream.thor
1246
1251
  - spec/controllers/frontpage_controller_spec.rb