social_stream 0.23.2 → 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/base/app/assets/javascripts/layouts.js +0 -1
  2. data/base/app/assets/javascripts/social_stream.comments.js +10 -3
  3. data/base/app/assets/javascripts/social_stream.search.js.erb +3 -1
  4. data/base/app/assets/javascripts/social_stream.wall.js.erb +8 -1
  5. data/base/app/assets/stylesheets/{activities.css.scss → activities.css.scss.erb} +1 -1
  6. data/base/app/models/relation.rb +4 -0
  7. data/base/app/models/tie.rb +5 -0
  8. data/base/app/views/cheesecake/_index.html.erb +2 -2
  9. data/base/app/views/layouts/_search.html.erb +2 -2
  10. data/base/app/views/posts/_new_activity_fields.erb +0 -6
  11. data/base/lib/generators/social_stream/base/templates/relations.yml +4 -4
  12. data/base/lib/social_stream/base/version.rb +1 -1
  13. data/base/lib/tasks/db/populate.rake +2 -2
  14. data/base/spec/dummy/config/relations.yml +4 -4
  15. data/base/vendor/assets/javascripts/jquery.watermark.js +563 -0
  16. data/documents/app/assets/javascripts/social_stream.audio.js.erb +25 -0
  17. data/documents/app/assets/javascripts/social_stream.repository.js.erb +27 -0
  18. data/documents/app/assets/javascripts/social_stream.video.js.erb +38 -0
  19. data/documents/app/assets/stylesheets/documents.css.scss +11 -14
  20. data/documents/app/views/audios/_audio.html.erb +0 -18
  21. data/documents/app/views/audios/_audio_processed.html.erb +35 -39
  22. data/documents/app/views/common_documents/_document_info.html.erb +2 -2
  23. data/documents/app/views/common_documents/_edit_form.html.erb +1 -1
  24. data/documents/app/views/common_documents/_headers.html.erb +1 -1
  25. data/documents/app/views/common_documents/_index.html.erb +3 -0
  26. data/documents/app/views/pictures/_picture.html.erb +3 -1
  27. data/documents/app/views/videos/_video.html.erb +0 -20
  28. data/documents/app/views/videos/_video_processed.html.erb +56 -43
  29. data/documents/config/locales/en.yml +1 -1
  30. data/documents/config/locales/es.yml +1 -1
  31. data/documents/lib/social_stream/documents/version.rb +1 -1
  32. data/documents/social_stream-documents.gemspec +1 -1
  33. data/documents/vendor/assets/javascripts/jquery.jplayer.js +87 -68
  34. data/documents/vendor/assets/swf/Jplayer.swf +0 -0
  35. data/events/app/assets/javascripts/social_stream-events.js +2 -0
  36. data/events/app/assets/javascripts/social_stream.calendar.js.erb +98 -0
  37. data/events/app/assets/javascripts/social_stream.event.js +17 -0
  38. data/events/app/assets/javascripts/social_stream.events.poster.js +1 -0
  39. data/events/app/assets/javascripts/{events.js.coffee → social_stream.events.tools.js.coffee} +0 -16
  40. data/events/app/assets/stylesheets/events.css.scss +33 -0
  41. data/events/app/controllers/events_controller.rb +19 -9
  42. data/events/app/views/events/_event.html.erb +5 -0
  43. data/events/app/views/events/_sidebar_calendar.html.erb +6 -28
  44. data/events/app/views/events/index.js.erb +3 -0
  45. data/events/app/views/rooms/_form.html.erb +1 -1
  46. data/events/app/views/rooms/create.js.erb +1 -1
  47. data/events/lib/social_stream/events/version.rb +1 -1
  48. data/events/social_stream-events.gemspec +1 -1
  49. data/lib/social_stream/version.rb +1 -1
  50. data/presence/app/assets/javascripts/jquery.ui.chatbox.sstreampresence.js +1 -1
  51. data/presence/app/assets/javascripts/presence.js.erb +16 -1
  52. data/presence/app/assets/javascripts/presence_XmppClient.js.erb +10 -3
  53. data/presence/app/assets/javascripts/presence_game.js.erb +284 -49
  54. data/presence/app/assets/javascripts/presence_game_comunication.js.erb +313 -0
  55. data/presence/app/assets/javascripts/presence_game_interface.js.erb +134 -0
  56. data/presence/app/assets/javascripts/presence_game_ter.js.erb +237 -188
  57. data/presence/app/assets/javascripts/presence_persistence.js +1 -1
  58. data/presence/app/assets/javascripts/presence_uiManager.js.erb +4 -2
  59. data/presence/app/assets/javascripts/presence_utilities.js +1 -1
  60. data/presence/app/assets/javascripts/presence_videochat.js.erb +2 -3
  61. data/presence/app/assets/javascripts/presence_windowManager.js +8 -1
  62. data/presence/app/assets/stylesheets/TresEnRaya.css +57 -0
  63. data/presence/app/assets/stylesheets/chat.css.scss +22 -1
  64. data/presence/app/views/chat/_index.html.erb +15 -18
  65. data/presence/config/locales/en.yml +14 -1
  66. data/presence/config/locales/es.yml +14 -1
  67. data/presence/lib/social_stream/presence/version.rb +1 -1
  68. data/presence/lib/tasks/presence/installer.rake +2 -2
  69. data/presence/social_stream-presence.gemspec +1 -1
  70. data/presence/vendor/assets/javascripts/jquery.gamequery-0.5.1.js +1164 -0
  71. data/social_stream.gemspec +4 -4
  72. data/spec/dummy/config/relations.yml +4 -4
  73. metadata +44 -34
  74. data/base/vendor/assets/javascripts/jquery.watermarkinput.js +0 -81
  75. data/documents/app/assets/javascripts/documents.js.erb +0 -71
@@ -0,0 +1,25 @@
1
+ //= require social_stream.timeline
2
+
3
+ SocialStream.Audio = (function(SS, $, undefined){
4
+ var initJplayer = function(){
5
+ $(".jp-audio .jp-jplayer").each(function() {
6
+ $(this).jPlayer({
7
+ ready: function () {
8
+ $(this).jPlayer("setMedia", {
9
+ webma: $(this).closest(".audio").find(".audio-webma").attr("href"), // Defines the webm url
10
+ });
11
+ },
12
+ preload: "none",
13
+ supplied: "webma",
14
+ swfPath: "<%= asset_path "" %>",
15
+ cssSelectorAncestor: "#" + $(this).closest(".audio-full").attr("id")
16
+ })
17
+ });
18
+
19
+ $(".audio-format-links").hide();
20
+ }
21
+
22
+ SocialStream.Timeline.addInitCallback(initJplayer);
23
+
24
+
25
+ })(SocialStream, jQuery);
@@ -0,0 +1,27 @@
1
+ SocialStream.Repository = (function(SS, $, undefined){
2
+ var init = function(){
3
+ $("body").screw({
4
+ loadingHTML: '<img src="<%= asset_path('loading.gif') %>">'
5
+ });
6
+ }
7
+
8
+ var toggleDocumentMenu = function(name){
9
+ $(".document_menu").each(function(){
10
+ console.log($(this));
11
+ if($(this).css("display")!="none"){
12
+ $(this).slideToggle("slow");
13
+ $("#" + $(this).attr('id') + "_action").removeClass("selected");
14
+ }
15
+ });
16
+ if($("#document_" + name).css("display")=="none"){
17
+ $("#document_" + name).slideToggle("slow");
18
+ $("#document_" + name + "_action").addClass("selected");
19
+ }
20
+ }
21
+
22
+ return {
23
+ init: init,
24
+ toggleDocumentMenu: toggleDocumentMenu
25
+ }
26
+
27
+ })(SocialStream, jQuery)
@@ -0,0 +1,38 @@
1
+ //= require social_stream.timeline
2
+
3
+ SocialStream.Video = (function(SS, $, undefined){
4
+ var initJplayer = function(){
5
+ $(".jp-video .jp-jplayer").each(function() {
6
+ $(this).jPlayer({
7
+ ready: function () {
8
+ $(this).jPlayer("setMedia", {
9
+ webmv: $(this).closest(".video").find(".video-webm").attr("href"), // Defines the webm url
10
+ flv: $(this).closest(".video").find(".video-flv").attr("href") // Defines the flv url
11
+ });
12
+ },
13
+ solution:"flash, html",
14
+ preload: "none",
15
+ supplied: "webmv, flv",
16
+ swfPath: "<%= asset_path "" %>",
17
+ cssSelectorAncestor: "#" + $(this).closest(".video-full").attr("id")
18
+ })
19
+ });
20
+
21
+ $(".video-format-links").hide();
22
+ $(".video-full").hide();
23
+
24
+ $(".video_thumbnail_play_over").click(function(){
25
+ var video = $(this).closest(".video")
26
+ video.find(".video-thumb").hide();
27
+ video.find(".video-details").hide();
28
+ video.find(".jp-video-play").hide();
29
+ video.find(".video-full").show();
30
+ video.find(".jp-jplayer").jPlayer("play", 0);
31
+ });
32
+
33
+ }
34
+
35
+ SocialStream.Timeline.addInitCallback(initJplayer);
36
+
37
+
38
+ })(SocialStream, jQuery);
@@ -238,39 +238,36 @@
238
238
  width: 0px;
239
239
  }
240
240
 
241
- .video_thumbnail_class {
242
- width: 180px;
243
- height: 135px;
241
+ .video_thumbnail_show {
242
+ width: 130px;
243
+ height: 97px;
244
+ padding: 10px;
245
+ float: left;
244
246
  }
245
247
 
246
248
  .video_thumbnail_image{
247
249
  position: relative;
248
250
  top:0px;
249
- width: 180px;
251
+ width: 130px;
250
252
  z-index:1;
251
- width: 180px;
252
- height: 135px;
253
- overflow: hidden;
253
+ height: 97px;
254
+ overflow: hidden;
254
255
  }
255
256
 
256
257
  .video_thumbnail_play_over {
257
258
  background: transparent url("jplayer.blue.monday.video.play.png") no-repeat center;
258
- /* position: relative; */
259
259
  position: relative;
260
260
  cursor:pointer;
261
261
  z-index:2;
262
+ top:-97px;
263
+ width:130px;
264
+ height:97px;
262
265
  }
263
266
 
264
267
  .video_thumbnail_play_over:hover {
265
268
  background: transparent url("jplayer.blue.monday.video.play.hover.png") no-repeat center;
266
269
  }
267
270
 
268
- .video_thumbnail_play_over {
269
- top:-135px;
270
- width:180px;
271
- height:135px;
272
- }
273
-
274
271
  /* needed to hide the flash element when used */
275
272
  .jpId_size0{
276
273
  width: 0px;
@@ -1,29 +1,11 @@
1
- <% content_for :javascript do %>
2
-
3
- $("#jpId<%=audio.id%>").jPlayer( {
4
- ready: function () {
5
- $(this).jPlayer("setMedia", {
6
- webma: "<%= audio_url(audio, :format => 'webma') %>" // Defines the webma url
7
- });
8
- },
9
- supplied: "webma",
10
- preload: "none",
11
- swfPath: "assets",
12
- cssSelectorAncestor: "#jp_interface_<%=audio.id%>"
13
- });
14
-
15
- <% end %>
16
-
17
1
  <%= div_for audio, :class => 'content_size' do %>
18
2
 
19
-
20
3
  <% if audio.file_processing %>
21
4
  <%= render :partial => 'audios/audio_processing', :locals => {:audio => audio}%>
22
5
  <% else %>
23
6
  <%= render :partial => 'audios/audio_processed', :locals => {:audio => audio}%>
24
7
  <% end %>
25
8
 
26
-
27
9
  <% end %>
28
10
 
29
11
  <div class="clearfloat"></div>
@@ -1,45 +1,41 @@
1
- <div class="attachment_thumb">
2
- <%= link_to thumb_for(audio, 16),
3
- audio_path(audio),
4
- :class => "" %>
1
+ <div class="audio-format-links">
2
+ <%= link_to "WebMA", audio_path(audio, :format => :webma), :class => "audio-webma" %>
5
3
  </div>
6
- <div class="attachment_text">
7
- <%= t('audio.msg') %><%= link_to "\""+audio.title+"\"",
8
- audio_path(audio),
9
- :class => "attachment_text_link" %>
10
- </div>
11
- <div id="jpId<%= audio.id%>" class="jpId_size0"></div>
12
- <div class="jp-audio">
13
- <div class="jp-type-single">
14
- <div id="jp_interface_<%= audio.id%>" class="jp-interface">
15
- <ul class="jp-controls">
16
- <li>
17
- <a href="#" class="jp-play" tabindex="1">play</a>
18
- </li>
19
- <li>
20
- <a href="#" class="jp-pause" tabindex="1">pause</a>
21
- </li>
22
- <li>
23
- <a href="#" class="jp-stop" tabindex="1">stop</a>
24
- </li>
25
- <li>
26
- <a href="#" class="jp-mute" tabindex="1">mute</a>
27
- </li>
28
- <li>
29
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
30
- </li>
31
- </ul>
32
- <div class="jp-progress">
33
- <div class="jp-seek-bar">
34
- <div class="jp-play-bar"></div>
4
+
5
+ <div id="full_audio_<%= dom_id audio %>" class="audio-full jp-audio">
6
+ <div id="jpId<%= dom_id audio %>" class="jpId_size0 jp-jplayer"></div>
7
+ <div class="jp-audio">
8
+ <div class="jp-type-single">
9
+ <div id="jp_interface_<%= dom_id audio %>" class="jp-interface">
10
+ <ul class="jp-controls">
11
+ <li>
12
+ <a href="#" class="jp-play" tabindex="1">play</a>
13
+ </li>
14
+ <li>
15
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
16
+ </li>
17
+ <li>
18
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
19
+ </li>
20
+ <li>
21
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
22
+ </li>
23
+ <li>
24
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
25
+ </li>
26
+ </ul>
27
+ <div class="jp-progress">
28
+ <div class="jp-seek-bar">
29
+ <div class="jp-play-bar"></div>
30
+ </div>
35
31
  </div>
32
+ <div class="jp-volume-bar">
33
+ <div class="jp-volume-bar-value"></div>
34
+ </div>
35
+ <div class="jp-current-time"></div>
36
+ <div class="jp-duration"></div>
36
37
  </div>
37
- <div class="jp-volume-bar">
38
- <div class="jp-volume-bar-value"></div>
39
- </div>
40
- <div class="jp-current-time"></div>
41
- <div class="jp-duration"></div>
38
+ <div id="jp_playlist_<%= dom_id audio %>" class="jp-playlist"></div>
42
39
  </div>
43
- <div id="jp_playlist_<%= audio.id%>" class="jp-playlist"></div>
44
40
  </div>
45
41
  </div>
@@ -5,10 +5,10 @@
5
5
  </div>
6
6
  <% end %>
7
7
  <div id="actions">
8
- <%= link_to content_tag(:span,image_tag("btn/btn_write.png") + t('document.actions.details'), :class => :action, :id => :document_details_action), "javascript:toggleDocumentMenu('details');" %>
8
+ <%= link_to content_tag(:span,image_tag("btn/btn_write.png") + t('document.actions.details'), :class => :action, :id => :document_details_action), "javascript:SocialStream.Repository.toggleDocumentMenu('details');" %>
9
9
  <%= link_to content_tag(:span,image_tag("btn/download.png") + t('document.actions.download'), :class => :action), download_document_path(document) %>
10
10
  <% if document.post_activity.edit_object_by?(current_subject) %>
11
- <%= link_to content_tag(:span,image_tag("btn/edit.png") + t('document.actions.edit'), :class => :action, :id => :document_edit_action), "javascript:toggleDocumentMenu('edit');" %>
11
+ <%= link_to content_tag(:span,image_tag("btn/edit.png") + t('document.actions.edit'), :class => :action, :id => :document_edit_action), "javascript:SocialStream.Repository.toggleDocumentMenu('edit');" %>
12
12
  <% end %>
13
13
  <% if document.post_activity.delete_object_by?(current_subject) %>
14
14
  <%= link_to content_tag(:span,image_tag("btn/error.png") + t('document.actions.delete'), :class => :action), document.post_activity.direct_object , :confirm => t('confirm_delete',
@@ -51,7 +51,7 @@
51
51
  <% if params[:editing].present? and params[:editing].eql?"true" and document.post_activity.edit_object_by?(current_subject) %>
52
52
  <%= javascript_tag do %>
53
53
  $(document).ready(function(){
54
- toggleDocumentMenu('edit');
54
+ SocialStream.Repository.toggleDocumentMenu('edit');
55
55
  });
56
56
  <% end %>
57
57
  <% end %>
@@ -29,7 +29,7 @@ $(document).ready(function() {
29
29
  var last_search = "";
30
30
 
31
31
 
32
- $("#repository_filter_input").Watermark("<%= escape_javascript(I18n.t('search.name')) %>");
32
+ $("#repository_filter_input").watermark("<%= escape_javascript(I18n.t('search.name')) %>");
33
33
 
34
34
  $("#repository_filter_input").keyup(function() {
35
35
  var searchstring = $(this).val();
@@ -39,6 +39,9 @@
39
39
  </div>
40
40
  <%= javascript_tag do %>
41
41
  $(document).ready(function(){
42
+
43
+ SocialStream.Repository.init();
44
+
42
45
  $('#<%= dom_id(document)%> .attachment_tile_tipsy a').tipsy({
43
46
  delayIn: 0,
44
47
  delayOut: 1000,
@@ -12,7 +12,9 @@
12
12
  <div class="title">
13
13
  <%= picture.title %>
14
14
  </div>
15
- <%= picture.description %>
15
+
16
+ <%= simple_format auto_link(picture.description) %>
17
+
16
18
  <%= link_to t('picture.msg'),
17
19
  picture_path(picture),
18
20
  :alt => t('picture.msg'),
@@ -1,23 +1,3 @@
1
- <% content_for :javascript do %>
2
-
3
- $("#jpId<%=video.id%>").jPlayer( {
4
- ready: function () {
5
- $(this).jPlayer("setMedia", {
6
- webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
7
- flv: "<%= video_url(video, :format => 'flv') %>"
8
- });
9
- },
10
- solution:"flash, html",
11
- preload: "none",
12
- supplied: "webmv, flv",
13
- swfPath: "assets",
14
- cssSelectorAncestor: "#jp_interface_<%=video.id%>"
15
- });
16
-
17
- hideJplayer(<%=video.id%>);
18
-
19
- <% end %>
20
-
21
1
  <%= div_for video, :class => 'content_size' do %>
22
2
 
23
3
  <% if video.file_processing %>
@@ -1,50 +1,63 @@
1
- <div class="attachment_thumb">
2
- <%= link_to thumb_for(video, 16),
3
- video_path(video),
4
- :id => video,
5
- :class => "" %>
1
+ <div class="video-thumb video_thumbnail_show">
2
+ <%= image_tag(video_path(video, :format => :png, :style => 'thumbwall'), :class => "video_thumbnail_image", :alt => "")%>
3
+ <div class="video_thumbnail_play_over"></div>
6
4
  </div>
7
- <div class="attachment_text">
8
- <%= t('video.msg') %><%= link_to "\""+video.title+"\"",
9
- video,
10
- :class => "attachment_text_link" %>
11
- <div id="video_thumbnail_<%= video.id%>" class="video_thumbnail_class">
12
- <%= image_tag(video_path(video, :format => :png, :style => 'thumbwall'), :class => "video_thumbnail_image", :alt => "")%> <div id="<%= video.id%>" class="video_thumbnail_play_over"></div>
5
+
6
+ <div class="attachment_text video-details">
7
+ <div class="title">
8
+ <%= video.title %>
13
9
  </div>
14
- <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
15
- <div class="jp-type-single">
16
- <div id="jpId<%= video.id%>" class="jp-jplayer"></div>
17
- <div id="jp_interface_<%= video.id%>" class="jp-interface">
18
- <div class="jp-video-play"></div>
19
- <ul class="jp-controls">
20
- <li>
21
- <a href="#" class="jp-play" tabindex="1">play</a>
22
- </li>
23
- <li>
24
- <a href="#" class="jp-pause" tabindex="1">pause</a>
25
- </li>
26
- <li>
27
- <a href="#" class="jp-stop" tabindex="1">stop</a>
28
- </li>
29
- <li>
30
- <a href="#" class="jp-mute" tabindex="1">mute</a>
31
- </li>
32
- <li>
33
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
34
- </li>
35
- </ul>
36
- <div class="jp-progress">
37
- <div class="jp-seek-bar">
38
- <div class="jp-play-bar"></div>
39
- </div>
40
- </div>
41
- <div class="jp-volume-bar">
42
- <div class="jp-volume-bar-value"></div>
10
+
11
+ <%= simple_format auto_link(video.description) %>
12
+
13
+ <%= link_to t('video.msg'),
14
+ video,
15
+ :alt => t('picture.msg'),
16
+ :type => video.type,
17
+ :path => document_path(video),
18
+ :class => "attachment_text_link video_link" %>
19
+
20
+ <div class="video-format-links">
21
+ <%= link_to "WebM", video_path(video, :format => :webm), :class => "video-webm" %>
22
+ <%= link_to "FLV", video_path(video, :format => :flv), :class => "video-flv" %>
23
+ </div>
24
+ </div>
25
+
26
+ <div class="clearfloat"></div>
27
+
28
+ <div id="full_video_<%= dom_id video %>" class="video-full jp-video jp-video-270p">
29
+ <div class="jp-type-single">
30
+ <div id="jpId<%= dom_id video %>" class="jp-jplayer"></div>
31
+ <div id="jp_interface_<%= dom_id video %>" class="jp-interface">
32
+ <div class="jp-video-play"></div>
33
+ <ul class="jp-controls">
34
+ <li>
35
+ <a href="#" class="jp-play" tabindex="1">play</a>
36
+ </li>
37
+ <li>
38
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
39
+ </li>
40
+ <li>
41
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
42
+ </li>
43
+ <li>
44
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
45
+ </li>
46
+ <li>
47
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
48
+ </li>
49
+ </ul>
50
+ <div class="jp-progress">
51
+ <div class="jp-seek-bar">
52
+ <div class="jp-play-bar"></div>
43
53
  </div>
44
- <div class="jp-current-time"></div>
45
- <div class="jp-duration"></div>
46
54
  </div>
47
- <div id="jp_playlist_<%= video.id%>" class="jp-playlist"></div>
55
+ <div class="jp-volume-bar">
56
+ <div class="jp-volume-bar-value"></div>
57
+ </div>
58
+ <div class="jp-current-time"></div>
59
+ <div class="jp-duration"></div>
48
60
  </div>
61
+ <div id="jp_playlist_<%= dom_id video %>" class="jp-playlist"></div>
49
62
  </div>
50
63
  </div>