social_stream-presence 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/chat_interface_manager.js.erb +167 -177
- data/app/assets/javascripts/chat_persistence.js +179 -0
- data/app/assets/javascripts/chat_utilities.js +15 -0
- data/app/assets/javascripts/chat_window_manager.js +8 -1
- data/app/assets/javascripts/xmpp_client_management.js.erb +192 -143
- data/app/assets/stylesheets/chat.css.scss +4 -5
- data/app/views/chat/_contacts.html.erb +1 -1
- data/app/views/chat/_index.html.erb +7 -13
- data/app/views/chat/_off.html.erb +2 -2
- data/lib/social_stream/presence/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.ui.chatbox.js +14 -11
- metadata +92 -64
@@ -91,11 +91,7 @@ div.ui-chatbox-notify{
|
|
91
91
|
background: $fill-color;
|
92
92
|
background-color: $fill-color;
|
93
93
|
color: black;
|
94
|
-
|
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">
|
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>
|
@@ -4,31 +4,25 @@
|
|
4
4
|
<script type="text/javascript">
|
5
5
|
|
6
6
|
//Global variables
|
7
|
-
var BOSH_SERVICE = '<%= SocialStream::Presence.bosh_service || root_url + "http-bind/" %>';
|
8
7
|
var cookie = "AuthenticationByCookie>>" + "<%=cookies[Rails.application.config.session_options[:key]]%>";
|
9
|
-
var domain = '<%=SocialStream::Presence.domain%>';
|
10
8
|
var user_name = '<%=current_user.name%>';
|
11
9
|
var user_slug = '<%=current_user.slug%>';
|
12
10
|
var user_jid = '<%=current_user.slug%>'+"@"+domain;
|
13
|
-
var sound_path = "/assets/audio/chat/onMessage";
|
14
11
|
|
15
12
|
|
16
|
-
$(document).ready(function () {
|
13
|
+
$(document).ready(function () {
|
17
14
|
|
18
|
-
if
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
if(getRestoreUserChatStatus()!="offline"){
|
16
|
+
connectToChat(user_jid,cookie,null);
|
17
|
+
//connectToChat(user_jid,null,null); //To use auth by password.
|
18
|
+
|
19
|
+
initialTimer = setTimeout("updateChatWindow()", 15000);
|
22
20
|
} else {
|
23
|
-
|
24
|
-
refreshChatWindow();
|
25
|
-
}
|
21
|
+
initialTimer = setTimeout("updateChatWindow()", 1);
|
26
22
|
}
|
27
23
|
|
28
|
-
initialTimer = setTimeout("updateChatWindow()", 15000);
|
29
24
|
initAudio();
|
30
25
|
initFocusListeners();
|
31
|
-
|
32
26
|
});
|
33
27
|
|
34
28
|
</script>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
$("#passwordFormChat").hide();
|
8
8
|
$('.connectChatButton').bind('click', function () {
|
9
9
|
if (requestConnectToChat()){
|
10
|
-
|
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
|
-
|
25
|
+
connectToChat(user_jid,null,$('#user_password').val());
|
26
26
|
}
|
27
27
|
});
|
28
28
|
|
@@ -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 ' +
|
metadata
CHANGED
@@ -1,79 +1,99 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-presence
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 5
|
8
|
+
- 2
|
9
|
+
version: 0.5.2
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Aldo Gordillo
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
|
17
|
+
date: 2012-02-03 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: social_stream-base
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
25
|
+
requirements:
|
19
26
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 14
|
31
|
+
- 0
|
21
32
|
version: 0.14.0
|
22
33
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
26
36
|
name: xmpp4r
|
27
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
33
46
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
37
49
|
name: net-ssh
|
38
|
-
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
52
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
44
59
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
60
|
+
version_requirements: *id003
|
61
|
+
- !ruby/object:Gem::Dependency
|
48
62
|
name: net-sftp
|
49
|
-
|
63
|
+
prerelease: false
|
64
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
version: "0"
|
55
72
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
73
|
+
version_requirements: *id004
|
74
|
+
- !ruby/object:Gem::Dependency
|
59
75
|
name: ruby-debug19
|
60
|
-
|
76
|
+
prerelease: false
|
77
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
78
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
66
85
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
social networking features and activity streams.
|
71
|
-
email:
|
86
|
+
version_requirements: *id005
|
87
|
+
description: Social Stream is a Ruby on Rails engine providing your application with social networking features and activity streams.
|
88
|
+
email:
|
72
89
|
- iamchrono@gmail.com
|
73
90
|
executables: []
|
91
|
+
|
74
92
|
extensions: []
|
93
|
+
|
75
94
|
extra_rdoc_files: []
|
76
|
-
|
95
|
+
|
96
|
+
files:
|
77
97
|
- .gitignore
|
78
98
|
- Gemfile
|
79
99
|
- Rakefile
|
@@ -97,6 +117,7 @@ files:
|
|
97
117
|
- app/assets/javascripts/chat_audio.js
|
98
118
|
- app/assets/javascripts/chat_interface_manager.js.erb
|
99
119
|
- app/assets/javascripts/chat_parser.js
|
120
|
+
- app/assets/javascripts/chat_persistence.js
|
100
121
|
- app/assets/javascripts/chat_utilities.js
|
101
122
|
- app/assets/javascripts/chat_window_manager.js
|
102
123
|
- app/assets/javascripts/social_stream-presence.js
|
@@ -206,30 +227,37 @@ files:
|
|
206
227
|
- vendor/assets/javascripts/jquery.ui.chatbox.js
|
207
228
|
- vendor/assets/javascripts/strophe.js
|
208
229
|
- vendor/assets/stylesheets/jquery.ui.chatbox.css
|
230
|
+
has_rdoc: true
|
209
231
|
homepage: https://github.com/ging/social_stream-presence
|
210
232
|
licenses: []
|
233
|
+
|
211
234
|
post_install_message:
|
212
235
|
rdoc_options: []
|
213
|
-
|
236
|
+
|
237
|
+
require_paths:
|
214
238
|
- lib
|
215
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
239
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
240
|
none: false
|
217
|
-
requirements:
|
218
|
-
- -
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
|
221
|
-
|
241
|
+
requirements:
|
242
|
+
- - ">="
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
segments:
|
245
|
+
- 0
|
246
|
+
version: "0"
|
247
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
248
|
none: false
|
223
|
-
requirements:
|
224
|
-
- -
|
225
|
-
- !ruby/object:Gem::Version
|
226
|
-
|
249
|
+
requirements:
|
250
|
+
- - ">="
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
segments:
|
253
|
+
- 0
|
254
|
+
version: "0"
|
227
255
|
requirements: []
|
256
|
+
|
228
257
|
rubyforge_project: social_stream-presence
|
229
|
-
rubygems_version: 1.
|
258
|
+
rubygems_version: 1.3.7
|
230
259
|
signing_key:
|
231
260
|
specification_version: 3
|
232
|
-
summary: Presence capabilities for Social Stream, the core for building social network
|
233
|
-
websites
|
261
|
+
summary: Presence capabilities for Social Stream, the core for building social network websites
|
234
262
|
test_files: []
|
235
|
-
|
263
|
+
|