social_stream 0.20.1 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,4 +3,4 @@ window.requestAnimFrame = (function(callback) {
3
3
  function(callback) {
4
4
  window.setTimeout(callback, 1000 / 60);
5
5
  };
6
- })();
6
+ })();
@@ -8,6 +8,7 @@ $success-background: #DFF2BF;
8
8
 
9
9
  /**BLUES**/
10
10
  $auxiliar-color: #879EB5;
11
+ $auxiliar-bright-color: #97AEC5;
11
12
  $input-border-color: #BDC7D8;
12
13
  $main-color: #1F4A75; /* #2A3890*/
13
14
  $secondary-color: #DEEFF8; /* #E0EEF5*/
@@ -11,6 +11,7 @@
11
11
  left: 410px;
12
12
  display: none;
13
13
  z-index: 3000;
14
+ cursor: pointer;
14
15
  }
15
16
  #edit_sector_button img {
16
17
  width: 24px;
@@ -30,8 +31,13 @@
30
31
  width: 0px;
31
32
  padding: 0px;
32
33
  margin: 0px;
34
+ overflow-y: visible;
35
+ overflow-x: hidden;
36
+ }
37
+ #sector_editor .truncate {
38
+ white-space: nowrap;
33
39
  overflow: hidden;
34
- height: 450px;
40
+ text-overflow: ellipsis;
35
41
  }
36
42
  #contacts_explorer {
37
43
  float: right;
@@ -108,7 +114,6 @@
108
114
  height: 30px;
109
115
  text-align: right;
110
116
  float: left;
111
- margin-right: 20px;
112
117
  }
113
118
  #contacts_save_form {
114
119
  overflow: visible;
@@ -127,7 +132,7 @@
127
132
  width: 130px;
128
133
  height: 25px;
129
134
  float: left;
130
- margin-top: 10px;
135
+ margin: 10px 0px 0px 20px;
131
136
  cursor: pointer;
132
137
  }
133
138
  #contacts_changes_title {
@@ -162,8 +167,7 @@
162
167
  display: none;
163
168
  width: 514px;
164
169
  height: 340px;
165
- top: 145px !important;
166
- left: 460px !important;
170
+ top: 135px !important;
167
171
  }
168
172
  .contacts_changes_tipsy_menu.tipsy .tipsy-arrow {
169
173
  display: none;
@@ -270,7 +274,6 @@
270
274
  }
271
275
  #sector_form {
272
276
  width: 300px;
273
- height: 450px;
274
277
  float: right;
275
278
  }
276
279
  #sector_form .title {
@@ -282,6 +285,8 @@
282
285
  #sector_form .title #edited_sector_name {
283
286
  font-size: 14px;
284
287
  font-weight: bold;
288
+ max-width: 150px;
289
+ display: inline-block;
285
290
  }
286
291
  #sector_form #edited_sector_color_out {
287
292
  border: 1px solid $main-color;
@@ -295,12 +300,28 @@
295
300
  width: 14px;
296
301
  height: 14px;
297
302
  }
303
+ #sector_form .form_row.less_padding {
304
+ padding: 2px 0px 2px 20px;
305
+ }
298
306
  #sector_form .subsector {
299
- border: 1px solid $input-border-color;
300
- background: $fill-color;
307
+ border: 1px solid $main-color;
308
+ background: $secondary-color;
301
309
  width: 260px;
302
310
  min-height: 20px;
303
311
  }
312
+ #sector_form .add_subsector {
313
+ border: 1px solid $main-color;
314
+ color: $main-color;
315
+ background: $auxiliar-color;
316
+ width: 260px;
317
+ height: 20px;
318
+ text-align: center;
319
+ font-size: 15px;
320
+ font-weight: bold;
321
+ }
322
+ #sector_form .add_subsector:hover {
323
+ background: $auxiliar-bright-color;
324
+ }
304
325
  #sector_form .subsector .title {
305
326
  width: 260px;
306
327
  text-align: center;
@@ -310,4 +331,30 @@
310
331
  #sector_form .subsector .title .edited_subsector_name {
311
332
  font-size: 11px;
312
333
  font-weight: bold;
334
+ max-width: 150px;
335
+ display: inline-block;
336
+ }
337
+ .permissions_explanation {
338
+
339
+ }
340
+ .permissions_explanation_tipsy_menu.tipsy {
341
+ border: 1px solid $main-color;
342
+ background: $secondary-color;
343
+ box-shadow: 0 0 5px #000000;
344
+ -webkit-box-shadow: 0 0 5px #000000;
345
+ -moz-box-shadow: 0 0 5px #000000;
346
+ overflow: hidden;
347
+ max-width: 300px;
348
+ width: 300px;
349
+ padding-top: 3px;
350
+ }
351
+ .permissions_explanation_tipsy_menu.tipsy .tipsy-arrow {
352
+ display: none;
353
+ }
354
+ .permissions_explanation_tipsy_menu.tipsy .tipsy-inner {
355
+ max-width: 300px;
356
+ text-align: left;
357
+ }
358
+ .permissions_explanation_tipsy_menu.tipsy .tipsy-inner .permission {
359
+ padding-top: 3px;
313
360
  }
@@ -20,11 +20,12 @@ class ContactsController < ApplicationController
20
20
  end
21
21
 
22
22
  def update
23
+ # Record who is manipulating the contact, mainly in groups
24
+ @contact.user_author = current_user
25
+
23
26
  # FIXME: This should be in the model
24
27
  params[:contact][:relation_ids].present? &&
25
- params[:contact][:relation_ids].delete("0")
26
-
27
- params[:contact][:user_author] = current_user
28
+ params[:contact][:relation_ids].delete("0")
28
29
 
29
30
  if @contact.update_attributes(params[:contact])
30
31
  redirect_to @contact.receiver_subject
@@ -38,11 +38,8 @@ $(function(){
38
38
  cheese.syncSectorFocusCallbacks = false;
39
39
  cheese.onSectorFocusBegin = function(cheesecake,callback){
40
40
  if((cheese.highlightedSector)&&(cheese.highlightedSector.auxiliar)){
41
- $("#contacts_explorer").animate({width: 0},500,function(){
42
- $("#contacts_explorer").hide();
43
- });
44
- $("#sector_editor").show();
45
- $("#sector_editor").animate({width: 300},500);
41
+ $("#sector_editor").data("prepare")(cheese);
42
+ $("#sector_editor").data("show")();
46
43
  }else{
47
44
  $("#contacts_grid_available").fadeOut("fast", callback);
48
45
  }
@@ -52,6 +49,7 @@ $(function(){
52
49
 
53
50
  }else{
54
51
  $("#contacts_grid_available").fadeIn("fast");
52
+ $("#edit_sector_button").on("click.edit", cheese, $("#edit_sector_button").data("edit_sector_click"));
55
53
  $("#edit_sector_button").fadeIn("fast");
56
54
  }
57
55
  };
@@ -60,19 +58,20 @@ $(function(){
60
58
 
61
59
  }else{
62
60
  $("#contacts_grid_available").fadeOut("fast", callback);
61
+ $("#edit_sector_button").off("click");
63
62
  $("#edit_sector_button").fadeOut("fast");
64
63
  }
65
64
  };
66
65
  cheese.onSectorUnfocusEnd = function(cheesecake){
67
66
  if((cheese.highlightedSector)&&(cheese.highlightedSector.auxiliar)){
68
- $("#sector_editor").animate({width: 0},500,function(){
69
- $("#sector_editor").hide();
70
- });
71
- $("#contacts_explorer").show();
72
- $("#contacts_explorer").animate({width: 300},500);
67
+
73
68
  }else{
74
69
  $("#contacts_grid_available").fadeIn("fast");
75
70
  }
71
+ if($("#sector_editor").width() > 0){
72
+ $("#edit_sector_button").html("<%= escape_javascript image_tag "btn/cheese_edit.png" %>");
73
+ $("#sector_editor").data("hide")();
74
+ }
76
75
  };
77
76
  $("#contacts_filter_input").keyup(function(){
78
77
  cheese.searchEngine.filter($("#contacts_filter_input").val());
@@ -103,33 +103,87 @@
103
103
  $("#contacts_changes_button").tipsy("hide");
104
104
  }else{
105
105
  $("#contacts_changes_button").tipsy("show");
106
- $("#contacts_changes_title").click(function(){
106
+ $(".contacts_changes_tipsy_menu").css({left: $("#cheesecake").offset().left + 132})
107
+ $(window).on("resize.contacs_changes",function(){
108
+ $(".contacts_changes_tipsy_menu").css({left: $("#cheesecake").offset().left + 132})
109
+ });
110
+ $("#contacts_changes_title").on("click",function(){
107
111
  $("#contacts_changes_button").tipsy("hide");
108
112
  });
109
113
  }
110
114
  });
111
- var edit_sector_click = function(){
115
+ $("#sector_editor").data("show", function(callback){
116
+ $("#contacts_explorer").stop().animate({width: 0},500);
117
+ $("#sector_editor").stop().animate({width: 300},500, function(){
118
+ if(callback) callback();
119
+ });
120
+ });
121
+ $("#sector_editor").data("hide", function(callback){
122
+ $("#sector_editor").stop().animate({width: 0},500, function(){
123
+ $(".add_subsector_clone").remove();
124
+ });
125
+ $("#contacts_explorer").stop().animate({width: 300},500, function(){
126
+ if(callback) callback();
127
+ });
128
+ });
129
+ $("#sector_editor").data("prepare", function(cheese){
130
+ var sector = cheese.getFocusedSector();
131
+ var subsector_count = sector.subsectors.length;
132
+ var original_add_sector_row = $("#original_add_subsector_row");
133
+ if(sector){
134
+ $("#form_sector_name").val(sector.label);
135
+ $("#edited_sector_name").html(sector.label);
136
+ $("#form_sector_name").off("keyup");
137
+ $("#form_sector_name").on("keyup",function(){
138
+ $("#edited_sector_name").html($("#form_sector_name").val());
139
+ sector.changeLabel($("#form_sector_name").val());
140
+ });
141
+ $(".add_subsector_clone").remove();
142
+ for(var i = 0; i < 4; i++){
143
+ var subsector = sector.subsectors[i];
144
+ if(subsector){
145
+ var add_subsector_clone = original_add_sector_row.clone().attr("id", "add_subsector_" + i).addClass("add_subsector_clone").show();
146
+ $("#subsector_" + i).parent().before(add_subsector_clone);
147
+ $("#form_subsector_name_" + i).val(subsector.label);
148
+ $("#edited_subsector_name_" + i).html(subsector.label);
149
+ $("#form_subsector_name_" + i).off("keyup");
150
+ $("#form_subsector_name_" + i).on("keyup", [i,subsector],function(event){
151
+ $("#edited_subsector_name_" + event.data[0]).html($("#form_subsector_name_" + event.data[0]).val());
152
+ event.data[1].changeLabel($("#form_subsector_name_" + event.data[0]).val());
153
+ });
154
+ $("#subsector_" + i).show();
155
+ }else{
156
+ if(sector.subsectors[i-1]){
157
+ var add_subsector_clone = original_add_sector_row.clone().attr("id", "add_subsector_" + i).addClass("add_subsector_clone").show();
158
+ $("#subsector_" + (i-1)).parent().after(add_subsector_clone);
159
+ }
160
+ $("#subsector_" + i).hide();
161
+ }
162
+ }
163
+ }
164
+ });
165
+ $("#edit_sector_button").data("edit_sector_click", function(event){
166
+ var cheese = event.data;
112
167
  $("#edit_sector_button").off("click.edit");
113
168
  $("#edit_sector_button").fadeOut("fast",function(){
114
169
  $("#edit_sector_button").html("<%= escape_javascript image_tag "btn/cheese_close_edit.png" %>");
115
170
  $("#edit_sector_button").fadeIn("fast");
116
171
  });
117
- $("#contacts_explorer").stop().animate({width: 0},500);
118
- $("#sector_editor").stop().animate({width: 300},500, function(){
119
- $("#edit_sector_button").on("click.close_edit",close_edit_sector_click);
172
+ $("#sector_editor").data("prepare")(cheese);
173
+ $("#sector_editor").data("show")(function(){
174
+ $("#edit_sector_button").on("click.close_edit", cheese, $("#edit_sector_button").data("close_edit_sector_click"));
120
175
  });
121
- }
122
- var close_edit_sector_click = function(){
176
+ });
177
+ $("#edit_sector_button").data("close_edit_sector_click", function(event){
178
+ var cheese = event.data;
123
179
  $("#edit_sector_button").off("click.close_edit");
124
180
  $("#edit_sector_button").fadeOut("fast",function(){
125
181
  $("#edit_sector_button").html("<%= escape_javascript image_tag "btn/cheese_edit.png" %>");
126
182
  $("#edit_sector_button").fadeIn("fast");
127
183
  });
128
- $("#sector_editor").stop().animate({width: 0},500);
129
- $("#contacts_explorer").stop().animate({width: 300},500,function(){
130
- $("#edit_sector_button").on("click.edit",edit_sector_click);
184
+ $("#sector_editor").data("hide")(function(){
185
+ $("#edit_sector_button").on("click.edit", cheese, $("#edit_sector_button").data("edit_sector_click"));
131
186
  });
132
- }
133
- $("#edit_sector_button").on("click.edit",edit_sector_click);
187
+ });
134
188
  <%= render :partial => 'cheesecake' %>
135
189
  <% end %>
@@ -1,19 +1,19 @@
1
1
  <form id="sector_form">
2
2
  <div class="title">
3
- Editing <span id="edited_sector_name">New sector</span>
3
+ <%= t('cheesecake.form.editing')%> <div id="edited_sector_name" class="truncate">New sector</div>
4
4
  </div>
5
5
  <div class="block">
6
- <div class="form_row">
6
+ <div class="form_row less_padding">
7
7
  <div class="form_label">
8
- Name:
8
+ <%= t('cheesecake.form.fields.name')%>:
9
9
  </div>
10
10
  <div class="form_field">
11
- <input type="text" class="form_tag" value="New sector">
11
+ <input type="text" id="form_sector_name" class="form_tag" value="New sector">
12
12
  </div>
13
13
  </div>
14
- <div class="form_row">
14
+ <div class="form_row less_padding">
15
15
  <div class="form_label">
16
- Color:
16
+ <%= t('cheesecake.form.fields.color')%>:
17
17
  </div>
18
18
  <div class="form_field">
19
19
  <div id="edited_sector_color_out">
@@ -21,41 +21,46 @@
21
21
  </div>
22
22
  </div>
23
23
  </div>
24
- <% for i in 1..4 do %>
25
- <div class="form_row">
26
- <div class="subsector">
24
+ <div class="form_row less_padding" id="original_add_subsector_row" style="display:none;">
25
+ <div class="add_subsector">
26
+ +
27
+ </div>
28
+ </div>
29
+ <% for i in 0..3 do %>
30
+ <div class="form_row less_padding">
31
+ <div class="subsector" id="subsector_<%= i %>">
27
32
  <div class="title">
28
- Subsector <span class="edited_subsector_name">New subsector <%= i %></span>
33
+ <%= t('cheesecake.form.fields.subsector')%> <div class="edited_subsector_name truncate" id="edited_subsector_name_<%= i %>">New subsector <%= i %></div>
29
34
  </div>
30
- <div class="content" <%= i==1 ? '' : 'style=display:none;' %>>
35
+ <div class="content" <%= i==0 ? '' : 'style=display:none;' %>>
31
36
  <div class="form_row">
32
37
  <div class="form_label">
33
- Name:
38
+ <%= t('cheesecake.form.fields.name')%>:
34
39
  </div>
35
40
  <div class="form_field">
36
- <input type="text" class="form_tag" value="New subsector <%= i %>">
41
+ <input type="text" class="form_tag" class="form_subsector_name" id="form_subsector_name_<%= i %>" value="New subsector <%= i %>">
37
42
  </div>
38
43
  </div>
39
- <div class="form_row">
44
+ <div class="form_row less_padding">
40
45
  <div class="form_label">
41
- Permissions:
46
+ <%= t('cheesecake.form.fields.permissions')%>:
42
47
  </div>
43
48
  </div>
44
- <div class="form_row">
45
- <div class="form_field">
46
- <table class="tableCheckBoxOptions">
47
- <% default_permissions.each_with_index do |p, i| %>
48
- <tr>
49
- <td>
50
- <div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
51
- <input id=<%= dom_id p %> class="permission" type="checkbox"/>
52
- <label for=<%= dom_id p %>><%= p.description(:brief) %></label>
53
- <div class="clearfloat"></div>
54
- </div></td>
55
- </tr>
56
- <% end %>
57
- </table>
49
+ <div class="form_row less_padding">
50
+ <div class="form_field permissions_field">
51
+ <% default_permissions.each_with_index do |p, i| %>
52
+ <div contain=<%= dom_id p %> class="checkboxPermissionOptionLeft">
53
+ <input class="permission <%= dom_id p %>" type="checkbox"/>
54
+ <label for=<%= dom_id p %>><%= p.description(:brief) %></label>
55
+ <div class="clearfloat"></div>
56
+ </div>
57
+ <% end %>
58
58
  </div>
59
+ <div class="permissions_explanation" style="display:none;">
60
+ <% default_permissions.each_with_index do |p, i| %>
61
+ <div class="permission <%= dom_id p %>"> <%= p.description(:detailed) %></div>
62
+ <% end %>
63
+ </div>
59
64
  </div>
60
65
  </div>
61
66
  </div>
@@ -78,4 +83,19 @@
78
83
  }
79
84
  })
80
85
  });
86
+ $(".permissions_field").each(function(){
87
+ $(this).tipsy({
88
+ delayIn: 500,
89
+ delayOut: 0,
90
+ gravity: 'e',
91
+ offset: 100,
92
+ opacity: 1,
93
+ className: 'permissions_explanation_tipsy_menu',
94
+ html: true,
95
+ hoverable: true,
96
+ title: function(){
97
+ return $(this).parent().find('.permissions_explanation').html();
98
+ }
99
+ });
100
+ });
81
101
  <% end %>
@@ -97,6 +97,13 @@ en:
97
97
  none: "No changes"
98
98
  save: "Save changes"
99
99
  saving: "Saving..."
100
+ form:
101
+ editing: "Editing"
102
+ fields:
103
+ color: "Color"
104
+ name: "Name"
105
+ permissions: "Permissions"
106
+ subsector: "Subsector"
100
107
  select:
101
108
  hint: "Select by clicking the portraits"
102
109
  comment:
@@ -106,6 +113,7 @@ en:
106
113
  one: "a comment"
107
114
  view_all: "View all comments"
108
115
  contact:
116
+ addressbook: "Addressbook"
109
117
  all_n: "All contacts (%{count})"
110
118
  confirm_delete: "Delete contact?"
111
119
  current: "Current"
@@ -96,7 +96,14 @@ es:
96
96
  details: "Cambios detallados"
97
97
  none: "Sin cambios"
98
98
  save: "Guardar cambios"
99
- saving: "Guardando..."
99
+ saving: "Guardando..."
100
+ form:
101
+ editing: "Editando"
102
+ fields:
103
+ color: "Color"
104
+ name: "Nombre"
105
+ permissions: "Permisos"
106
+ subsector: "Subsector"
100
107
  select:
101
108
  hint: "Selecciona haciendo click en los retratos"
102
109
  comment:
@@ -106,6 +113,7 @@ es:
106
113
  one: "un comentario"
107
114
  view_all: "Ver todos los comentarios"
108
115
  contact:
116
+ addressbook: "Libreta de direcciones"
109
117
  all_n: "Todos los contactos (%{count})"
110
118
  confirm_delete: "¿Borrar contacto?"
111
119
  current: "Actuales"
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Base
3
- VERSION = "0.15.1".freeze
3
+ VERSION = "0.15.2".freeze
4
4
  end
5
5
  end
@@ -1,6 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ContactsController do
4
+ include SocialStream::TestHelpers
5
+ include SocialStream::TestHelpers::Controllers
4
6
 
5
7
  render_views
6
8
 
@@ -108,4 +110,26 @@ describe ContactsController do
108
110
  response.should redirect_to(home_path)
109
111
  end
110
112
  end
113
+
114
+ context "representing a group" do
115
+ before(:all) do
116
+ @group = Factory(:member, :contact => Factory(:group_contact, :receiver => @user.actor)).sender_subject
117
+ end
118
+
119
+ before do
120
+ sign_in(@user)
121
+ represent(@group)
122
+ end
123
+
124
+ it "should add other user as member" do
125
+ other_user = Factory(:user)
126
+ contact = @group.contact_to!(other_user)
127
+
128
+ put :update, :id => contact.id, :contact => { :relation_ids => @group.relation_customs.map(&:id) }
129
+
130
+ response.should redirect_to(other_user)
131
+
132
+ @group.receivers.should include(other_user.actor)
133
+ end
134
+ end
111
135
  end
@@ -8,10 +8,10 @@
8
8
  <div class="attachment_tile" id="<%= dom_id(document)%>">
9
9
  <div class="attachment_tile_thumb">
10
10
  <%= link_to thumb_for(document,48),
11
- {:controller => "documents", :action => "show", :id => document},
12
- :type => document.type,
13
- :title => document.file_file_name,
14
- :path => document_path(document) %>
11
+ document_path(document),
12
+ :type => document.type,
13
+ :title => document.file_file_name,
14
+ :path => document_path(document) %>
15
15
  </div>
16
16
  <div class="attachment_tile_tipsy">
17
17
  <%= link_to image_tag("btn/btn_down.png"),
@@ -31,7 +31,7 @@
31
31
  </div>
32
32
  <div class="attachment_tile_text">
33
33
  <%= link_to truncate_name(document.file_file_name,:length => 15),
34
- {:controller => "documents", :action => "show", :id => document},
34
+ document_path(document),
35
35
  :alt => document.file_file_name,
36
36
  :type => document.type,
37
37
  :path => document_path(document) %>
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.10.1".freeze
3
+ VERSION = "0.10.2".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.15.1')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.15.2')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  s.add_runtime_dependency('paperclip','= 2.4.5')
18
18
  s.add_runtime_dependency('delayed_paperclip','2.4.5.1')
@@ -0,0 +1,9 @@
1
+ class AddEventsForeignKey < ActiveRecord::Migration
2
+ def up
3
+ add_foreign_key "events", "activity_objects", :name => "events_on_activity_object_id"
4
+ end
5
+
6
+ def down
7
+ remove_foreign_key "events", :name => "events_on_activity_object_id"
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Events
3
- VERSION = "0.7.0".freeze
3
+ VERSION = "0.7.1".freeze
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.files = `git ls-files`.split("\n")
13
13
 
14
14
  # Gem dependencies
15
- s.add_runtime_dependency('social_stream-base', '~> 0.15.0')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.15.2')
16
16
  s.add_runtime_dependency('rails-scheduler', '~> 0.0.6')
17
17
  s.add_runtime_dependency('coffee-rails', '>= 3.1.0')
18
18
 
@@ -1,3 +1,3 @@
1
1
  module SocialStream
2
- VERSION = "0.20.1".freeze
2
+ VERSION = "0.20.2".freeze
3
3
  end
@@ -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>
@@ -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
@@ -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.15.1')
15
- s.add_runtime_dependency('social_stream-documents', '~> 0.10.1')
16
- s.add_runtime_dependency('social_stream-events', '~> 0.7.0')
14
+ s.add_runtime_dependency('social_stream-base', '~> 0.15.2')
15
+ s.add_runtime_dependency('social_stream-documents', '~> 0.10.2')
16
+ s.add_runtime_dependency('social_stream-events', '~> 0.7.1')
17
17
  s.add_runtime_dependency('social_stream-linkser', '~> 0.5.0')
18
- s.add_runtime_dependency('social_stream-presence', '~> 0.6.1')
18
+ s.add_runtime_dependency('social_stream-presence', '~> 0.6.2')
19
19
 
20
20
  # Development Gem dependencies
21
21
  #
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.20.1
4
+ version: 0.20.2
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-06 00:00:00.000000000Z
13
+ date: 2012-02-08 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: social_stream-base
17
- requirement: &82379940 !ruby/object:Gem::Requirement
17
+ requirement: &72438540 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 0.15.1
22
+ version: 0.15.2
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *82379940
25
+ version_requirements: *72438540
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: social_stream-documents
28
- requirement: &82379690 !ruby/object:Gem::Requirement
28
+ requirement: &72438180 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 0.10.1
33
+ version: 0.10.2
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *82379690
36
+ version_requirements: *72438180
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: social_stream-events
39
- requirement: &82379420 !ruby/object:Gem::Requirement
39
+ requirement: &72437820 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 0.7.0
44
+ version: 0.7.1
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *82379420
47
+ version_requirements: *72437820
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: social_stream-linkser
50
- requirement: &82379060 !ruby/object:Gem::Requirement
50
+ requirement: &72437490 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,21 +55,21 @@ dependencies:
55
55
  version: 0.5.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *82379060
58
+ version_requirements: *72437490
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: social_stream-presence
61
- requirement: &82378730 !ruby/object:Gem::Requirement
61
+ requirement: &72437150 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
65
65
  - !ruby/object:Gem::Version
66
- version: 0.6.1
66
+ version: 0.6.2
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *82378730
69
+ version_requirements: *72437150
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: capybara
72
- requirement: &82378380 !ruby/object:Gem::Requirement
72
+ requirement: &72436790 !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: *82378380
80
+ version_requirements: *72436790
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: sqlite3
83
- requirement: &82356550 !ruby/object:Gem::Requirement
83
+ requirement: &72436500 !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: *82356550
91
+ version_requirements: *72436500
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: ruby-debug19
94
- requirement: &82356300 !ruby/object:Gem::Requirement
94
+ requirement: &72436120 !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: *82356300
102
+ version_requirements: *72436120
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec-rails
105
- requirement: &82356030 !ruby/object:Gem::Requirement
105
+ requirement: &72435750 !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: *82356030
113
+ version_requirements: *72435750
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: factory_girl
116
- requirement: &82355770 !ruby/object:Gem::Requirement
116
+ requirement: &72435360 !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: *82355770
124
+ version_requirements: *72435360
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: forgery
127
- requirement: &82355450 !ruby/object:Gem::Requirement
127
+ requirement: &72435030 !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: *82355450
135
+ version_requirements: *72435030
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: ci_reporter
138
- requirement: &82355150 !ruby/object:Gem::Requirement
138
+ requirement: &72434680 !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: *82355150
146
+ version_requirements: *72434680
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:
@@ -1021,6 +1021,7 @@ files:
1021
1021
  - events/db/migrate/20111120104349_create_rooms.rb
1022
1022
  - events/db/migrate/20111204155637_add_scheduler.rb
1023
1023
  - events/db/migrate/20111218203314_change_scheduler.rb
1024
+ - events/db/migrate/20120208144948_add_events_foreign_key.rb
1024
1025
  - events/lib/generators/social_stream/events/install_generator.rb
1025
1026
  - events/lib/social_stream-events.rb
1026
1027
  - events/lib/social_stream/events/ability.rb
@@ -1194,7 +1195,7 @@ files:
1194
1195
  - presence/app/assets/images/status/away.png
1195
1196
  - presence/app/assets/images/status/dnd.png
1196
1197
  - presence/app/assets/images/status/offline.png
1197
- - presence/app/assets/javascripts/chat_audio.js
1198
+ - presence/app/assets/javascripts/chat_audio.js.erb
1198
1199
  - presence/app/assets/javascripts/chat_interface_manager.js.erb
1199
1200
  - presence/app/assets/javascripts/chat_parser.js
1200
1201
  - presence/app/assets/javascripts/chat_persistence.js