social_stream 0.20.2 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- data/base/app/assets/images/btn/permission_negative.png +0 -0
- data/base/app/assets/images/btn/permission_positive.png +0 -0
- data/base/app/assets/javascripts/activities.js.erb +2 -118
- data/base/app/assets/javascripts/social_stream-base.js +3 -0
- data/base/app/assets/javascripts/social_stream.timeline.js +42 -0
- data/base/app/assets/javascripts/social_stream.wall.js.erb +125 -0
- data/base/app/assets/stylesheets/cheesecake.css.scss +9 -1
- data/base/app/helpers/notifications_helper.rb +1 -5
- data/base/app/models/activity.rb +21 -2
- data/base/app/models/comment.rb +5 -0
- data/base/app/models/permission.rb +16 -1
- data/base/app/models/post.rb +5 -0
- data/base/app/views/activities/_new.html.erb +7 -6
- data/base/app/views/activities/_wall.html.erb +6 -0
- data/base/app/views/cheesecake/_index.html.erb +17 -0
- data/base/app/views/cheesecake/_sector_form.html.erb +15 -6
- data/base/app/views/comments/_new.html.erb +2 -2
- data/base/app/views/comments/create.js.erb +1 -3
- data/base/app/views/notifications/activities/_post.html.erb +0 -3
- data/base/app/views/permissions/_index.html.erb +2 -2
- data/base/app/views/posts/create.js.erb +1 -4
- data/base/config/locales/en.yml +33 -23
- data/base/config/locales/es.yml +53 -24
- data/base/db/migrate/20120208135718_group_title_and_description_in_activity_object.rb +52 -0
- data/base/lib/social_stream/base/version.rb +1 -1
- data/base/spec/factories/activity.rb +1 -1
- data/documents/db/migrate/20120208143721_documents_group_title_and_description_in_activity_object.rb +28 -0
- data/documents/lib/social_stream/documents/version.rb +1 -1
- data/documents/social_stream-documents.gemspec +1 -1
- data/documents/spec/factories/document.rb +1 -0
- data/documents/spec/factories/picture.rb +1 -0
- data/events/db/migrate/20120208143756_events_group_title_and_description_in_activity_object.rb +26 -0
- data/events/lib/social_stream/events/version.rb +1 -1
- data/events/social_stream-events.gemspec +1 -1
- data/lib/social_stream/version.rb +1 -1
- data/linkser/app/views/links/create.js.erb +1 -3
- data/linkser/db/migrate/20120208143739_linkser_group_title_and_description_in_activity_object.rb +30 -0
- data/linkser/lib/social_stream/linkser/version.rb +1 -1
- data/linkser/social_stream-linkser.gemspec +1 -1
- data/presence/app/assets/images/black_arrow7.png +0 -0
- data/presence/app/assets/images/black_arrow8.png +0 -0
- data/presence/app/assets/images/black_arrow9.png +0 -0
- data/presence/app/assets/javascripts/chat_interface_manager.js.erb +191 -23
- data/presence/app/assets/javascripts/chat_persistence.js +15 -6
- data/presence/app/assets/javascripts/chat_utilities.js +13 -0
- data/presence/app/assets/javascripts/chat_window_manager.js +101 -20
- data/presence/app/assets/javascripts/social_stream-presence.js +2 -0
- data/presence/app/assets/javascripts/xmpp_client_management.js.erb +6 -5
- data/presence/app/assets/stylesheets/chat.css.scss +43 -3
- data/presence/app/assets/stylesheets/social_stream-presence.css +1 -0
- data/presence/app/helpers/xmpp_helper.rb +4 -2
- data/presence/app/views/chat/_contacts.html.erb +55 -42
- data/presence/config/locales/en.yml +4 -1
- data/presence/config/locales/es.yml +3 -1
- data/presence/db/migrate/20110928135031_add_status_column_to_user.rb +1 -1
- data/presence/lib/social_stream/presence/version.rb +1 -1
- data/presence/social_stream-presence.gemspec +1 -1
- data/presence/vendor/assets/javascripts/jquery.flexselect.js +265 -0
- data/presence/vendor/assets/javascripts/jquery.tools.tooltip.js +2 -1
- data/presence/vendor/assets/javascripts/liquidmetal.js +90 -0
- data/presence/vendor/assets/stylesheets/flexselect.css +39 -0
- data/social_stream.gemspec +5 -5
- metadata +45 -32
- data/base/app/views/activities/_filter.html.erb +0 -83
@@ -64,11 +64,19 @@ function storeConversations() {
|
|
64
64
|
|
65
65
|
|
66
66
|
function storeChatConnectionParametres() {
|
67
|
-
if (sessionStorage.getItem("cookie") == null){
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
if ((sessionStorage.getItem("cookie") == null)||(sessionStorage.getItem("chat_user_name") == null)){
|
68
|
+
if ((typeof cookie != 'undefined')&&(cookie!=null)){
|
69
|
+
sessionStorage.setItem("cookie", cookie);
|
70
|
+
}
|
71
|
+
if ((typeof user_name != 'undefined') && (user_name != null)) {
|
72
|
+
sessionStorage.setItem("chat_user_name", user_name);
|
73
|
+
}
|
74
|
+
if ((typeof user_slug != 'undefined') && (user_slug != null)) {
|
75
|
+
sessionStorage.setItem("chat_user_slug", user_slug);
|
76
|
+
}
|
77
|
+
if ((typeof user_jid != 'undefined') && (user_jid != null)) {
|
78
|
+
sessionStorage.setItem("chat_user_jid", user_jid);
|
79
|
+
}
|
72
80
|
}
|
73
81
|
}
|
74
82
|
|
@@ -104,6 +112,7 @@ function getRestoreUserChatStatus(){
|
|
104
112
|
|
105
113
|
|
106
114
|
function restoreChatData(){
|
115
|
+
|
107
116
|
//Check for Session Storage support
|
108
117
|
if (! window.sessionStorage){
|
109
118
|
return
|
@@ -162,7 +171,7 @@ function restoreConversations() {
|
|
162
171
|
window[getChatVariableFromSlug(guest_slug)].parent().toggle(false);
|
163
172
|
}
|
164
173
|
if ((visibleMaxSlugs.indexOf(guest_slug)==-1)&&(visibleMinSlugs.indexOf(guest_slug)==-1)){
|
165
|
-
|
174
|
+
closeChatBox(guest_slug);
|
166
175
|
}
|
167
176
|
} else {
|
168
177
|
//Always created.
|
@@ -6,6 +6,16 @@ function log(msg) {
|
|
6
6
|
//console.log(msg)
|
7
7
|
}
|
8
8
|
|
9
|
+
function simulate_new_user_connected(slug) {
|
10
|
+
var stanza_test = '<presence xmlns="jabber:client" from="' + slug + '@localhost/27825459741328802387991286" to="demo@localhost/2517285379132880233667729">'
|
11
|
+
onPresence(stanza_test);
|
12
|
+
}
|
13
|
+
|
14
|
+
function simulate_new_user_disconnected(slug) {
|
15
|
+
var stanza_test = '<presence xmlns="jabber:client" type="unavailable" from="' + slug + '@localhost/27825459741328802387991286" to="demo@localhost/2517285379132880233667729">'
|
16
|
+
onPresence(stanza_test);
|
17
|
+
}
|
18
|
+
|
9
19
|
|
10
20
|
////////////////////
|
11
21
|
//Blink page title when focus lost on new messages
|
@@ -231,6 +241,9 @@ function getNameFromSlug(slug){
|
|
231
241
|
}
|
232
242
|
|
233
243
|
|
244
|
+
|
245
|
+
|
246
|
+
|
234
247
|
////////////////////
|
235
248
|
//Next features...
|
236
249
|
////////////////////
|
@@ -41,17 +41,7 @@ function createChatBox(guest_slug,guest_name,guest_jid,user_name,user_jid){
|
|
41
41
|
position: position,
|
42
42
|
priority: visibleChatBoxes.length+1,
|
43
43
|
boxClosed: function(id) {
|
44
|
-
|
45
|
-
position = $("#" + guest_slug).chatbox("option", "position");
|
46
|
-
|
47
|
-
for (i=position+1;i<visibleChatBoxes.length+1;i++){
|
48
|
-
visibleChatBoxes[i-1].chatbox("option", "offset", visibleChatBoxes[i-1].chatbox("option", "offset") - chatBoxSeparation);
|
49
|
-
visibleChatBoxes[i-1].chatbox("option", "position", visibleChatBoxes[i-1].chatbox("option", "position") - 1 );
|
50
|
-
}
|
51
|
-
|
52
|
-
visibleChatBoxes.splice(position-1,1);
|
53
|
-
$("#" + guest_slug).chatbox("option", "hidden", true);
|
54
|
-
nBox--;
|
44
|
+
closeChatBox(guest_slug)
|
55
45
|
},
|
56
46
|
|
57
47
|
messageSent : function(id, user, msg) {
|
@@ -111,30 +101,73 @@ function getBoxParams(){
|
|
111
101
|
}
|
112
102
|
|
113
103
|
|
104
|
+
function closeChatBox(guest_slug){
|
105
|
+
var position = $("#" + guest_slug).chatbox("option", "position");
|
106
|
+
|
107
|
+
for (i=position+1;i<visibleChatBoxes.length+1;i++){
|
108
|
+
visibleChatBoxes[i-1].chatbox("option", "offset", visibleChatBoxes[i-1].chatbox("option", "offset") - chatBoxSeparation);
|
109
|
+
visibleChatBoxes[i-1].chatbox("option", "position", visibleChatBoxes[i-1].chatbox("option", "position") - 1 );
|
110
|
+
}
|
111
|
+
|
112
|
+
visibleChatBoxes.splice(position-1,1);
|
113
|
+
$("#" + guest_slug).chatbox("option", "hidden", true);
|
114
|
+
nBox--;
|
115
|
+
}
|
116
|
+
|
117
|
+
|
114
118
|
function getChatVariableFromSlug(slug){
|
115
119
|
return "slug_" + slug;
|
116
120
|
}
|
117
121
|
|
118
|
-
|
119
122
|
function getSlugFromChatVariable(variable){
|
120
123
|
return variable.split("_")[1];
|
121
124
|
}
|
122
125
|
|
123
126
|
function getVisibleChatBoxes(){
|
124
|
-
|
125
127
|
for(i=0; i<visibleChatBoxes.length; i++){
|
126
128
|
if (visibleChatBoxes[i][0].id==chatSlugId){
|
127
129
|
visibleChatBoxes.splice(i,1)
|
128
130
|
}
|
129
131
|
}
|
130
|
-
|
131
132
|
return visibleChatBoxes
|
132
133
|
}
|
133
134
|
|
135
|
+
|
134
136
|
function getAllChatBoxes(){
|
135
137
|
return $(".chatbox").not(document.getElementById(chatSlugId))
|
136
138
|
}
|
137
139
|
|
140
|
+
function getChatBoxForSlug(slug){
|
141
|
+
if (typeof window[getChatVariableFromSlug(slug)] == 'undefined') {
|
142
|
+
return null;
|
143
|
+
} else {
|
144
|
+
return window[getChatVariableFromSlug(slug)];
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
function getAllSlugsWithChatBoxes(){
|
150
|
+
var slugsWithChatBox = [];
|
151
|
+
$.each(getAllChatBoxes(), function(index, value) {
|
152
|
+
slugsWithChatBox.push($(value).attr("id"))
|
153
|
+
});
|
154
|
+
return slugsWithChatBox;
|
155
|
+
}
|
156
|
+
|
157
|
+
function getAllDisconnectedSlugsWithChatBoxes(){
|
158
|
+
var slugsWithChatBox = getAllSlugsWithChatBoxes();
|
159
|
+
var slugsConnected = getAllConnectedSlugs();
|
160
|
+
var allDisconnectedSlugsWithChatBox = [];
|
161
|
+
|
162
|
+
$.each(slugsWithChatBox, function(index, value) {
|
163
|
+
if (slugsConnected.indexOf(value)==-1){
|
164
|
+
allDisconnectedSlugsWithChatBox.push(value);
|
165
|
+
}
|
166
|
+
});
|
167
|
+
return allDisconnectedSlugsWithChatBox;
|
168
|
+
}
|
169
|
+
|
170
|
+
|
138
171
|
////////////////////
|
139
172
|
//Box replacement
|
140
173
|
////////////////////
|
@@ -211,6 +244,14 @@ function getVideoEmbedForSlug(slug){
|
|
211
244
|
///////////////////////////
|
212
245
|
|
213
246
|
var mainChatBox;
|
247
|
+
var connectionBoxesForFile=5;
|
248
|
+
var maxConnectionChatBoxesFilesWithoutOverflow = 11;
|
249
|
+
var mainChatBoxWidth=150;
|
250
|
+
var mainChatBoxaddonsHeight=50;
|
251
|
+
var heightForConnectionBoxFile=30;
|
252
|
+
var mainChatBoxHeightWhileSearchContacts=260;
|
253
|
+
var mainChatBoxMinHeight=136;
|
254
|
+
var mainChatBoxMaxHeight= mainChatBoxaddonsHeight + heightForConnectionBoxFile*maxConnectionChatBoxesFilesWithoutOverflow;
|
214
255
|
var chatSlugId="SocialStream_MainChat";
|
215
256
|
|
216
257
|
function createMainChatBox(){
|
@@ -233,22 +274,23 @@ function createMainChatBox(){
|
|
233
274
|
$(mainChatBox.parent()).find(".ui-chatbox-input").remove();
|
234
275
|
|
235
276
|
//Set height
|
236
|
-
|
277
|
+
changeMainChatBoxHeight(getChatBoxHeightRequiredForConnectionBoxes());
|
237
278
|
|
238
279
|
//Set width
|
239
|
-
|
240
|
-
|
241
|
-
$(mainChatBox
|
242
|
-
$(mainChatBox).css( "width", windowWidth-6 );
|
280
|
+
window[getChatVariableFromSlug(chatSlugId)].parent().parent().css( "width", mainChatBoxWidth );
|
281
|
+
$(mainChatBox.parent().parent()).find(".ui-chatbox-titlebar").css( "width", mainChatBoxWidth-6 );
|
282
|
+
$(mainChatBox).css( "width", mainChatBoxWidth-6 );
|
243
283
|
|
244
284
|
|
245
285
|
//Adjust window offset
|
246
|
-
offsetForFlowBox = 235-
|
286
|
+
offsetForFlowBox = 235-mainChatBoxWidth;
|
247
287
|
|
248
288
|
//CSS Adjusts
|
249
289
|
$("#chat_partial").css("margin-top",-3)
|
250
290
|
$("#chat_partial").css("margin-left",-3)
|
251
291
|
$(".dropdown dd ul").css("min-width",147)
|
292
|
+
$(mainChatBox).css('overflow-x','hidden')
|
293
|
+
$(mainChatBox).css('overflow-y','hidden')
|
252
294
|
|
253
295
|
//Header title
|
254
296
|
updateConnectedUsersOfMainChatBox();
|
@@ -280,3 +322,42 @@ function changeMainChatBoxHeaderTitle(title){
|
|
280
322
|
$($(mainChatBox.parent().parent()).find(".ui-chatbox-titlebar").find("span")[0]).html(title);
|
281
323
|
}
|
282
324
|
}
|
325
|
+
|
326
|
+
|
327
|
+
function changeMainChatBoxHeight(height){
|
328
|
+
if (mainChatBox != null) {
|
329
|
+
|
330
|
+
if(($("#search_chat_contact_flexselect").is(":focus"))&&(! (focusSearchContactsFlag))){
|
331
|
+
return;
|
332
|
+
} else {
|
333
|
+
focusSearchContactsFlag=false;
|
334
|
+
}
|
335
|
+
|
336
|
+
if(height > mainChatBoxMaxHeight){
|
337
|
+
//overflow = true;
|
338
|
+
height = mainChatBoxMaxHeight;
|
339
|
+
$(mainChatBox).css('overflow-y','visible');
|
340
|
+
mainChatBox.chatbox("option", "offset","5px")
|
341
|
+
mainChatBox.chatbox("option", "width", mainChatBoxWidth + 5)
|
342
|
+
} else {
|
343
|
+
$(mainChatBox).css('overflow-y','hidden');
|
344
|
+
mainChatBox.chatbox("option", "offset","0px")
|
345
|
+
mainChatBox.chatbox("option", "width",mainChatBoxWidth)
|
346
|
+
height = Math.max(height,mainChatBoxMinHeight)
|
347
|
+
}
|
348
|
+
|
349
|
+
window[getChatVariableFromSlug(chatSlugId)].css("height", height);
|
350
|
+
}
|
351
|
+
}
|
352
|
+
|
353
|
+
|
354
|
+
function getChatBoxHeightRequiredForConnectionBoxes(){
|
355
|
+
if(mainChatBox!=null){
|
356
|
+
var desiredHeight = mainChatBoxaddonsHeight + Math.ceil(getAllConnectedSlugs().length/connectionBoxesForFile) * heightForConnectionBoxFile;
|
357
|
+
return desiredHeight;
|
358
|
+
} else {
|
359
|
+
return null;
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
363
|
+
|
@@ -136,7 +136,8 @@ var awayTimer;
|
|
136
136
|
var timer;
|
137
137
|
var reconnectTimer;
|
138
138
|
var disconnectionFlag = true;
|
139
|
-
var
|
139
|
+
var afterNewConnectionFlag = false;
|
140
|
+
var afterFirstConnectionFlag = true;
|
140
141
|
var requestContacts=false;
|
141
142
|
var cyclesToRefresh = (refreshMinTime/timerPeriod);
|
142
143
|
|
@@ -219,8 +220,6 @@ function onConnect(status) {
|
|
219
220
|
|
220
221
|
awayTimer = setInterval("awayTimerFunction()", awayTimerPeriod);
|
221
222
|
timer = setInterval("timerFunction()", timerPeriod);
|
222
|
-
|
223
|
-
hideAllNotifications();
|
224
223
|
}
|
225
224
|
|
226
225
|
updateChatWindow();
|
@@ -285,6 +284,8 @@ function onMessage(msg) {
|
|
285
284
|
///////
|
286
285
|
function onPresence(presence) {
|
287
286
|
|
287
|
+
log(presence)
|
288
|
+
|
288
289
|
//Check presence stanza type
|
289
290
|
ptype = $(presence).attr('type');
|
290
291
|
|
@@ -332,8 +333,8 @@ function processUnavailablePresenceStanza(presence){
|
|
332
333
|
|
333
334
|
if (slug != user_slug) {
|
334
335
|
if (getConnectionBoxFromSlug(slug)!=null){
|
335
|
-
hideConnectionBoxFromSlug(slug)
|
336
|
-
|
336
|
+
hideConnectionBoxFromSlug(slug);
|
337
|
+
showOfflineChatNotificationForSlug(slug);
|
337
338
|
updateConnectedUsersOfMainChatBox();
|
338
339
|
}
|
339
340
|
}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
@import "colors";
|
2
2
|
|
3
|
-
|
4
3
|
/* Chatbox style sheet */
|
5
4
|
|
6
5
|
.ui-widget-content{
|
@@ -208,7 +207,10 @@ input.connectChatButton{
|
|
208
207
|
padding: 2px 0 2px 0px;
|
209
208
|
}
|
210
209
|
|
211
|
-
|
210
|
+
p.zero_users_connected {
|
211
|
+
text-align: center;
|
212
|
+
margin-top: 10px;
|
213
|
+
}
|
212
214
|
|
213
215
|
|
214
216
|
/* Tooltip */
|
@@ -223,6 +225,7 @@ input.connectChatButton{
|
|
223
225
|
color: white;
|
224
226
|
background:transparent url(black_arrow3.png);
|
225
227
|
text-align: center;
|
228
|
+
z-index: 10;
|
226
229
|
}
|
227
230
|
|
228
231
|
|
@@ -283,7 +286,7 @@ input.connectChatButton{
|
|
283
286
|
width:auto;
|
284
287
|
min-width:170px;
|
285
288
|
list-style:none;
|
286
|
-
z-index:
|
289
|
+
z-index: 2;
|
287
290
|
}
|
288
291
|
|
289
292
|
.dropdown span.value {
|
@@ -350,3 +353,40 @@ a.chatLink:link, a.chatLink:visited {
|
|
350
353
|
a.chatImageLink:link, a.chatImageLink:visited {
|
351
354
|
color: $main-color;
|
352
355
|
}
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
/* Chosen stylesheet */
|
361
|
+
|
362
|
+
div.allContacts {
|
363
|
+
width: 100px;
|
364
|
+
display: block;
|
365
|
+
}
|
366
|
+
|
367
|
+
#search_chat_contact_flexselect {
|
368
|
+
background: url('btn/search_icon.png') 5px 50% no-repeat $secondary-color;
|
369
|
+
padding: 0 0px 0 0px;
|
370
|
+
font-size: 11px;
|
371
|
+
color: $main-color;
|
372
|
+
border: solid 1px $input-border-color;
|
373
|
+
height: 25px;
|
374
|
+
width: 122px;
|
375
|
+
padding: 0 3px 0 22px;
|
376
|
+
margin-bottom: 1px;
|
377
|
+
}
|
378
|
+
|
379
|
+
#search_chat_contact_flexselect_dropdown {
|
380
|
+
background: $secondary-color;
|
381
|
+
}
|
382
|
+
|
383
|
+
#search_chat_contact_flexselect_dropdown li {
|
384
|
+
background: $secondary-color;
|
385
|
+
font-size: 11px;
|
386
|
+
color: $main-color;
|
387
|
+
}
|
388
|
+
|
389
|
+
#search_chat_contact_flexselect_dropdown li:hover {
|
390
|
+
background: $separation-color;
|
391
|
+
}
|
392
|
+
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module XmppHelper
|
2
2
|
|
3
3
|
def getChatContacts
|
4
|
-
connected_users = []
|
4
|
+
connected_users = []
|
5
|
+
all_users = []
|
5
6
|
|
6
7
|
#Get bidirectional contacts
|
7
8
|
contacts = current_user.contact_actors(:type=>:user)
|
@@ -12,9 +13,10 @@ module XmppHelper
|
|
12
13
|
if contact.user.connected
|
13
14
|
connected_users << contact.user
|
14
15
|
end
|
16
|
+
all_users << contact.user
|
15
17
|
end
|
16
18
|
|
17
|
-
return connected_users
|
19
|
+
return [connected_users,all_users]
|
18
20
|
end
|
19
21
|
|
20
22
|
end
|
@@ -1,44 +1,57 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
</div>
|
1
|
+
<div>
|
2
|
+
<div class="block">
|
3
|
+
<div class="header">
|
4
|
+
<%=image_tag("btn/btn_friend.png", :class => "header_icon")%>
|
5
|
+
<div class="header_text">
|
6
|
+
<%=t('chat.title')%>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div id="status" class="dropdown">
|
11
|
+
<dt><a href=""><span><%=t('chat.status.choose')%></span></a></dt>
|
12
|
+
<dd>
|
13
|
+
<ul id="statusList">
|
14
|
+
<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>
|
15
|
+
<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>
|
16
|
+
<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>
|
17
|
+
<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>
|
18
|
+
</ul>
|
19
|
+
</dd>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
</div>
|
24
23
|
|
25
|
-
|
24
|
+
<% @contacts = getChatContacts %>
|
25
|
+
<% @online_contacts = @contacts[0] %>
|
26
|
+
<% @all_contacts = @contacts[1] %>
|
27
|
+
|
28
|
+
<div class="allContacts">
|
29
|
+
<select data-placeholder="Search Contact" id="search_chat_contact" class="flexselect">
|
30
|
+
<option value=""></option>
|
31
|
+
<% unless @all_contacts.empty? %>
|
32
|
+
<%@all_contacts.each do |contact| %>
|
33
|
+
<option value="<%=contact.slug%>"><%=contact.name%></option>
|
34
|
+
<% end %>
|
35
|
+
<% else %>
|
36
|
+
<option value="ZERO_CONTACTS"> <%=t('chat.zerocontacts')%></option>
|
37
|
+
<% end %>
|
38
|
+
</select>
|
39
|
+
</div>
|
26
40
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
<div class="users_connected">
|
42
|
+
<% if @online_contacts.empty? %>
|
43
|
+
<p class="zero_users_connected"> <%=t('chat.zerousers')%> </p>
|
44
|
+
<% else %>
|
45
|
+
<%@online_contacts.each do |contact| %>
|
46
|
+
<div class="user_presence" name='<%=contact.name%>' slug='<%=contact.slug%>'>
|
47
|
+
<a title='<%=contact.name%>' class="presence_user_link" width="28">
|
48
|
+
<%=image_tag(contact.logo.url, :alt => contact.name , :size => "28x28")%>
|
49
|
+
<% if contact.user.status %>
|
50
|
+
<%=image_tag("status/" + contact.user.status + ".png", :class => "presence_status") %></a>
|
51
|
+
<% end %>
|
52
|
+
</a>
|
53
|
+
</div>
|
54
|
+
<%end%>
|
55
|
+
<% end %>
|
56
|
+
</div>
|
57
|
+
</div>
|