social_stream-presence 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@
3
3
  ////////////////////
4
4
 
5
5
  //Global audio variables
6
+ var audio_path = '<%=image_path("chat")%>';
6
7
  var onMessageAudio;
7
8
 
8
9
  var html5_audiotypes=[
@@ -23,7 +24,7 @@ function initSound(sound){
23
24
  var html5audio=document.createElement('audio')
24
25
 
25
26
  if (html5audio.canPlayType){
26
- path = '/assets/chat/' + sound;
27
+ path = audio_path + "/" + sound;
27
28
  window[sound] = new Audio();
28
29
 
29
30
  for(i=0; i<html5_audiotypes.length; i++){
@@ -47,7 +48,7 @@ function playSound(sound){
47
48
  window[sound].play();
48
49
  } else {
49
50
  //Fallback option: When browser doesn't support HTML5 audio
50
- $('body').append('<embed src="/' + sound + '.mp3" autostart="true" hidden="true" loop="false">');
51
+ $('body').append('<embed src="' + audio_path + '/' + sound + '.mp3" autostart="true" hidden="true" loop="false">');
51
52
  }
52
53
  }
53
54
 
@@ -220,10 +220,11 @@ function showConnectionBoxFromSlug(slug){
220
220
 
221
221
  function setUserIconStatus(slug, status){
222
222
  if (status in statusIcons) {
223
- iconName = statusIcons[status];
223
+ var iconName = statusIcons[status];
224
224
  var $img_status = $('img.presence_status');
225
+ var path = '<%=image_path("status")%>';
225
226
  connectionBox = getConnectionBoxFromSlug(slug);
226
- $(connectionBox).find($img_status).attr("src", "/assets/status/" + iconName + ".png")
227
+ $(connectionBox).find($img_status).attr("src", path + "/" + iconName + ".png")
227
228
  }
228
229
  }
229
230
 
@@ -211,7 +211,7 @@ function getVideoEmbedForSlug(slug){
211
211
  ///////////////////////////
212
212
 
213
213
  var mainChatBox;
214
- var chatSlugId="SocialStream_MainChat"
214
+ var chatSlugId="SocialStream_MainChat";
215
215
 
216
216
  function createMainChatBox(){
217
217
  if (mainChatBox==null){
@@ -258,7 +258,9 @@ function createMainChatBox(){
258
258
 
259
259
 
260
260
  function addContentToMainChatBox(content){
261
- $(mainChatBox.parent()).find("#" + chatSlugId).html(content);
261
+ if (mainChatBox != null) {
262
+ $(mainChatBox.parent()).find("#" + chatSlugId).html(content);
263
+ }
262
264
  }
263
265
 
264
266
 
@@ -274,5 +276,7 @@ function modifyChatPartialIfMainBox(chatPartial){
274
276
  }
275
277
 
276
278
  function changeMainChatBoxHeaderTitle(title){
277
- $($(mainChatBox.parent().parent()).find(".ui-chatbox-titlebar").find("span")[0]).html(title);
279
+ if (mainChatBox != null) {
280
+ $($(mainChatBox.parent().parent()).find(".ui-chatbox-titlebar").find("span")[0]).html(title);
281
+ }
278
282
  }
@@ -12,10 +12,10 @@
12
12
  <dt><a href=""><span><%=t('chat.status.choose')%></span></a></dt>
13
13
  <dd>
14
14
  <ul id="statusList">
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
- <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
- <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
- <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>
15
+ <li><a id="available" href="#" class="option"><img class="flag" src="<%=image_path("status/available.png")%>" alt=""/> <%=t('chat.status.available')%> <span class="value">available</span></a></li>
16
+ <li><a id="away" href="#" class="option"><img class="flag" src="<%=image_path("status/away.png")%>" alt=""/> <%=t('chat.status.away')%> <span class="value">away</span></a></li>
17
+ <li><a id="dnd" href="#" class="option"><img class="flag" src="<%=image_path("status/dnd.png")%>" alt=""/> <%=t('chat.status.dnd')%> <span class="value">dnd</span></a></li>
18
+ <li><a id="offline" href="#" class="option"><img class="flag" src="<%=image_path("status/offline.png")%>" alt=""/> <%=t('chat.status.offline')%> <span class="value">offline</span></a></li>
19
19
  </ul>
20
20
  </dd>
21
21
  </div>
@@ -32,8 +32,7 @@
32
32
  }
33
33
 
34
34
  initAudio();
35
- initFocusListeners();
36
-
35
+ initFocusListeners();
37
36
  });
38
37
 
39
38
  </script>
data/config/routes.rb CHANGED
@@ -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.6.1"
3
+ VERSION = "0.6.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,79 +1,83 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: social_stream-presence
3
- version: !ruby/object:Gem::Version
4
- version: 0.6.1
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.6.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Aldo Gordillo
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-06 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2012-02-06 00:00:00 +01:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
15
17
  name: social_stream-base
16
- requirement: &80060050 !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
17
20
  none: false
18
- requirements:
21
+ requirements:
19
22
  - - ~>
20
- - !ruby/object:Gem::Version
23
+ - !ruby/object:Gem::Version
21
24
  version: 0.15.1
22
25
  type: :runtime
23
- prerelease: false
24
- version_requirements: *80060050
25
- - !ruby/object:Gem::Dependency
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
26
28
  name: xmpp4r
27
- requirement: &80059820 !ruby/object:Gem::Requirement
29
+ prerelease: false
30
+ requirement: &id002 !ruby/object:Gem::Requirement
28
31
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
33
36
  type: :runtime
34
- prerelease: false
35
- version_requirements: *80059820
36
- - !ruby/object:Gem::Dependency
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
37
39
  name: net-ssh
38
- requirement: &80059590 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
39
42
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
44
47
  type: :runtime
45
- prerelease: false
46
- version_requirements: *80059590
47
- - !ruby/object:Gem::Dependency
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
48
50
  name: net-sftp
49
- requirement: &80059370 !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
50
53
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
55
58
  type: :runtime
56
- prerelease: false
57
- version_requirements: *80059370
58
- - !ruby/object:Gem::Dependency
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
59
61
  name: ruby-debug19
60
- requirement: &80059160 !ruby/object:Gem::Requirement
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
61
64
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
66
69
  type: :development
67
- prerelease: false
68
- version_requirements: *80059160
69
- description: Social Stream is a Ruby on Rails engine providing your application with
70
- social networking features and activity streams.
71
- email:
70
+ version_requirements: *id005
71
+ description: Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.
72
+ email:
72
73
  - iamchrono@gmail.com
73
74
  executables: []
75
+
74
76
  extensions: []
77
+
75
78
  extra_rdoc_files: []
76
- files:
79
+
80
+ files:
77
81
  - .gitignore
78
82
  - Gemfile
79
83
  - Rakefile
@@ -94,7 +98,7 @@ files:
94
98
  - app/assets/images/status/away.png
95
99
  - app/assets/images/status/dnd.png
96
100
  - app/assets/images/status/offline.png
97
- - app/assets/javascripts/chat_audio.js
101
+ - app/assets/javascripts/chat_audio.js.erb
98
102
  - app/assets/javascripts/chat_interface_manager.js.erb
99
103
  - app/assets/javascripts/chat_parser.js
100
104
  - app/assets/javascripts/chat_persistence.js
@@ -207,30 +211,33 @@ files:
207
211
  - vendor/assets/javascripts/jquery.ui.chatbox.js
208
212
  - vendor/assets/javascripts/strophe.js
209
213
  - vendor/assets/stylesheets/jquery.ui.chatbox.css
214
+ has_rdoc: true
210
215
  homepage: https://github.com/ging/social_stream-presence
211
216
  licenses: []
217
+
212
218
  post_install_message:
213
219
  rdoc_options: []
214
- require_paths:
220
+
221
+ require_paths:
215
222
  - lib
216
- required_ruby_version: !ruby/object:Gem::Requirement
223
+ required_ruby_version: !ruby/object:Gem::Requirement
217
224
  none: false
218
- requirements:
219
- - - ! '>='
220
- - !ruby/object:Gem::Version
221
- version: '0'
222
- required_rubygems_version: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ version: "0"
229
+ required_rubygems_version: !ruby/object:Gem::Requirement
223
230
  none: false
224
- requirements:
225
- - - ! '>='
226
- - !ruby/object:Gem::Version
227
- version: '0'
231
+ requirements:
232
+ - - ">="
233
+ - !ruby/object:Gem::Version
234
+ version: "0"
228
235
  requirements: []
236
+
229
237
  rubyforge_project: social_stream-presence
230
- rubygems_version: 1.8.12
238
+ rubygems_version: 1.6.1
231
239
  signing_key:
232
240
  specification_version: 3
233
- summary: Presence capabilities for Social Stream, the core for building social network
234
- websites
241
+ summary: Presence capabilities for Social Stream, the core for building social network websites
235
242
  test_files: []
236
- has_rdoc:
243
+