social_stream-documents 2.0.0.beta2 → 2.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/social_stream/audio.js.erb +5 -5
  3. data/app/assets/javascripts/social_stream/documents.timeline.js +24 -6
  4. data/app/assets/javascripts/social_stream/documents.wall.js +37 -32
  5. data/app/assets/javascripts/social_stream/video.js +33 -0
  6. data/app/assets/stylesheets/social_stream/documents/create/layout/_new.css.sass +3 -0
  7. data/app/assets/stylesheets/social_stream/documents/documents/layout/_documents.css.sass +12 -7
  8. data/app/assets/stylesheets/social_stream/documents/responsive/_responsive-1200px-min.css.sass +8 -1
  9. data/app/assets/stylesheets/social_stream/documents/responsive/_responsive-767px-max.css.sass +27 -2
  10. data/app/assets/stylesheets/social_stream/documents/show/_show.css.sass +29 -0
  11. data/app/assets/stylesheets/social_stream/documents/show/layout/_show.css.sass +36 -0
  12. data/app/assets/stylesheets/social_stream/documents/timeline/_audios.css.sass +27 -12
  13. data/app/views/audios/_audio_processed.html.erb +5 -46
  14. data/app/views/audios/_audio_show.html.erb +16 -57
  15. data/app/views/audios/_player.html.erb +42 -0
  16. data/app/views/common_documents/_index.html.erb +3 -5
  17. data/app/views/videos/_player.html.erb +36 -0
  18. data/app/views/videos/_video_processed.html.erb +5 -43
  19. data/app/views/videos/_video_show.html.erb +10 -60
  20. data/config/locales/en.yml +67 -67
  21. data/config/locales/es.yml +67 -64
  22. data/config/locales/zh.yml +90 -0
  23. data/lib/generators/social_stream/documents/templates/initializer.rb +1 -1
  24. data/lib/social_stream-documents.rb +1 -1
  25. data/lib/social_stream/documents/version.rb +1 -1
  26. data/social_stream-documents.gemspec +1 -1
  27. metadata +8 -5
  28. data/app/assets/javascripts/social_stream/video.js.erb +0 -42
@@ -1,50 +1,9 @@
1
- <div class="format-links">
2
- <%= link_to "WebMA", audio_path(audio, :format => :webma), :class => "audio-webma" %>
3
- </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">
7
- </div>
8
- <div class="jp-audio">
9
- <div class="jp-type-single">
10
- <div id="jp_interface_<%= dom_id audio %>" class="jp-interface">
11
- <div class="jp-progress">
12
- <div class="jp-seek-bar">
13
- <%= image_tag document_path(audio, format: :png, style: :waveform), class: 'waveform' %>
14
- <div class="jp-play-bar"></div>
15
- </div>
16
- </div>
17
- <div class="jp-down">
18
- <div class="jp-current-time"></div>
19
-
20
- <ul class="jp-controls">
21
- <li>
22
- <a href="#" class="jp-play" tabindex="1">play</a>
23
- </li>
24
- <li>
25
- <a href="#" class="jp-pause" tabindex="1">pause</a>
26
- </li>
27
- <li>
28
- <a href="#" class="jp-mute" tabindex="1">mute</a>
29
- </li>
30
- <li>
31
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
32
- </li>
33
- </ul>
34
-
35
- <div class="jp-volume-bar">
36
- <div class="jp-volume-bar-value"></div>
37
- </div>
38
-
39
- <div class="jp-duration">
40
- </div>
41
- </div>
42
- </div>
43
- <div id="jp_playlist_<%= dom_id audio %>" class="jp-playlist"></div>
44
- </div>
45
- </div>
1
+ <%= div_for audio do %>
2
+ <%= render partial: 'audios/player',
3
+ object: audio,
4
+ as: :audio %>
46
5
 
47
6
  <%= render partial: 'objects/timeline_description',
48
7
  object: audio,
49
8
  as: :obj %>
50
- </div>
9
+ <% end %>
@@ -1,62 +1,21 @@
1
- <% content_for :javascript do %>
1
+ <%= div_for audio do %>
2
+ <div class="audio_show">
3
+ <% if audio.file_processing %>
4
+ <div class="processing_text">
5
+ <%= t('audio.processing')%>
6
+ </div>
7
+ <% else %>
8
+ <%= render partial: 'player',
9
+ object: audio,
10
+ as: :audio %>
11
+ <% end %>
12
+ </div>
13
+ <% end %>
2
14
 
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: "<%= asset_path "Jplayer.swf" %>",
12
- cssSelectorAncestor: "#jp_interface_<%=audio.id%>"
15
+ <%= javascript_tag do %>
16
+ $(function() {
17
+ SocialStream.Audio.show();
13
18
  });
14
-
15
19
  <% end %>
16
20
 
17
- <%= div_for audio, :class => 'content_size' do %>
18
- <div class="audio_show">
19
- <% if audio.file_processing %>
20
- <div class="processing_text">
21
- <%= t('audio.processing')%>
22
- </div>
23
- <% else %>
24
- <div id="jpId<%= audio.id%>" class="jpId_size0"></div>
25
- <div class="jp-audio">
26
- <div class="jp-type-single">
27
- <div id="jp_interface_<%= audio.id%>" class="jp-interface">
28
- <ul class="jp-controls">
29
- <li>
30
- <a href="#" class="jp-play" tabindex="1">play</a>
31
- </li>
32
- <li>
33
- <a href="#" class="jp-pause" tabindex="1">pause</a>
34
- </li>
35
- <li>
36
- <a href="#" class="jp-stop" tabindex="1">stop</a>
37
- </li>
38
- <li>
39
- <a href="#" class="jp-mute" tabindex="1">mute</a>
40
- </li>
41
- <li>
42
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
43
- </li>
44
- </ul>
45
- <div class="jp-progress">
46
- <div class="jp-seek-bar">
47
- <div class="jp-play-bar"></div>
48
- </div>
49
- </div>
50
- <div class="jp-volume-bar">
51
- <div class="jp-volume-bar-value"></div>
52
- </div>
53
- <div class="jp-current-time"></div>
54
- <div class="jp-duration"></div>
55
- </div>
56
- <div id="jp_playlist_<%= audio.id%>" class="jp-playlist"></div>
57
- </div>
58
- </div>
59
- </div>
60
- <% end %>
61
21
 
62
- <% end %>
@@ -0,0 +1,42 @@
1
+ <div id="full_audio_<%= dom_id audio %>" class="audio-container jp-audio" data-url-webma="<%= audio_path(audio, :format => :webma) %>" data-url-swfplayer="<%= asset_path('Jplayer.swf') %>">
2
+ <div id="jpId<%= dom_id audio %>" class="jpId_size0 jp-jplayer">
3
+ </div>
4
+ <div class="jp-audio">
5
+ <div class="jp-type-single">
6
+ <div id="jp_interface_<%= dom_id audio %>" class="jp-interface">
7
+ <div class="jp-progress">
8
+ <div class="jp-seek-bar">
9
+ <%= image_tag document_path(audio, format: :png, style: :waveform), class: 'waveform' %>
10
+ <div class="jp-play-bar"></div>
11
+ </div>
12
+ </div>
13
+ <div class="jp-down">
14
+ <div class="jp-current-time"></div>
15
+
16
+ <ul class="jp-controls">
17
+ <li>
18
+ <a href="#" class="jp-play" tabindex="1">play</a>
19
+ </li>
20
+ <li>
21
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
22
+ </li>
23
+ <li>
24
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
25
+ </li>
26
+ <li>
27
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
28
+ </li>
29
+ </ul>
30
+
31
+ <div class="jp-volume-bar">
32
+ <div class="jp-volume-bar-value"></div>
33
+ </div>
34
+
35
+ <div class="jp-duration">
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <div id="jp_playlist_<%= dom_id audio %>" class="jp-playlist"></div>
40
+ </div>
41
+ </div>
42
+ </div>
@@ -1,15 +1,13 @@
1
1
  <% content_for :title do %>
2
- <%= "#{ profile_subject && profile_subject.name + ': ' }#{ t('repository.title') }" %>
2
+ <%= "#{ profile_or_current_subject.name } : #{ t('repository.title') }" %>
3
3
  <% end %>
4
4
 
5
- <% if profile_or_current_subject %>
6
- <%= render partial: 'toolbar/profile', locals: { :subject => profile_or_current_subject } %>
7
- <% end %>
5
+ <%= render partial: 'toolbar/profile', locals: { :subject => profile_or_current_subject } %>
8
6
 
9
7
  <%= render partial: 'common_documents/filter' %>
10
8
 
11
9
  <%= render partial: 'common_documents/new_button',
12
- locals: { owner: profile_subject } %>
10
+ locals: { owner: profile_or_current_subject } %>
13
11
 
14
12
  <section class="documents">
15
13
  <%= render partial: 'common_documents/list',
@@ -0,0 +1,36 @@
1
+ <div id="full_video_<%= dom_id video %>" class="video-container jp-video jp-video-270p" data-url-webm="<%= video_path(video, :format => :webm) %>" data-url-flv="<%= video_path(video, :format => :flv) %>" data-url-mp4="<%= video_path(video, :format => :mp4) %>" data-url-poster="<%= video_path(video, :format => :png, :style => '170x127#') %>" data-url-swfplayer="<%= asset_path('Jplayer.swf') %>">
2
+ <div class="jp-type-single">
3
+ <div id="jpId<%= dom_id video %>" class="jp-jplayer"></div>
4
+ <div id="jp_interface_<%= dom_id video %>" class="jp-interface">
5
+ <div class="jp-video-play"></div>
6
+ <ul class="jp-controls">
7
+ <li>
8
+ <a href="#" class="jp-play" tabindex="1">play</a>
9
+ </li>
10
+ <li>
11
+ <a href="#" class="jp-pause" tabindex="1">pause</a>
12
+ </li>
13
+ <li>
14
+ <a href="#" class="jp-stop" tabindex="1">stop</a>
15
+ </li>
16
+ <li>
17
+ <a href="#" class="jp-mute" tabindex="1">mute</a>
18
+ </li>
19
+ <li>
20
+ <a href="#" class="jp-unmute" tabindex="1">unmute</a>
21
+ </li>
22
+ </ul>
23
+ <div class="jp-progress">
24
+ <div class="jp-seek-bar">
25
+ <div class="jp-play-bar"></div>
26
+ </div>
27
+ </div>
28
+ <div class="jp-volume-bar">
29
+ <div class="jp-volume-bar-value"></div>
30
+ </div>
31
+ <div class="jp-current-time"></div>
32
+ <div class="jp-duration"></div>
33
+ </div>
34
+ <div id="jp_playlist_<%= dom_id video %>" class="jp-playlist"></div>
35
+ </div>
36
+ </div>
@@ -1,4 +1,4 @@
1
- <div class="thumb">
1
+ <div class="thumb thumb-play">
2
2
  <%= image_tag(video_path(video, :format => :png, :style => '170x127#'))%>
3
3
  <div class="play_over">
4
4
  </div>
@@ -13,48 +13,10 @@
13
13
  object: video,
14
14
  as: :obj %>
15
15
 
16
- <div class="format-links">
17
- <%= link_to "WebM", video_path(video, :format => :webm), :class => "video-webm" %>
18
- <%= link_to "FLV", video_path(video, :format => :flv), :class => "video-flv" %>
19
- <%= link_to "MP4", video_path(video, :format => :mp4), :class => "video-mp4" %>
20
- </div>
21
16
  </div>
22
17
 
23
- <div class="clearfloat"></div>
18
+ <%= render partial: 'videos/player',
19
+ object: video,
20
+ as: :video %>
24
21
 
25
- <div id="full_video_<%= dom_id video %>" class="video-full jp-video jp-video-270p">
26
- <div class="jp-type-single">
27
- <div id="jpId<%= dom_id video %>" class="jp-jplayer"></div>
28
- <div id="jp_interface_<%= dom_id video %>" class="jp-interface">
29
- <div class="jp-video-play"></div>
30
- <ul class="jp-controls">
31
- <li>
32
- <a href="#" class="jp-play" tabindex="1">play</a>
33
- </li>
34
- <li>
35
- <a href="#" class="jp-pause" tabindex="1">pause</a>
36
- </li>
37
- <li>
38
- <a href="#" class="jp-stop" tabindex="1">stop</a>
39
- </li>
40
- <li>
41
- <a href="#" class="jp-mute" tabindex="1">mute</a>
42
- </li>
43
- <li>
44
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
45
- </li>
46
- </ul>
47
- <div class="jp-progress">
48
- <div class="jp-seek-bar">
49
- <div class="jp-play-bar"></div>
50
- </div>
51
- </div>
52
- <div class="jp-volume-bar">
53
- <div class="jp-volume-bar-value"></div>
54
- </div>
55
- <div class="jp-current-time"></div>
56
- <div class="jp-duration"></div>
57
- </div>
58
- <div id="jp_playlist_<%= dom_id video %>" class="jp-playlist"></div>
59
- </div>
60
- </div>
22
+ <div class="clearfloat"></div>
@@ -1,69 +1,19 @@
1
- <%= div_for video, :class => 'content_size' do %>
2
- <div class="video_show">
1
+ <%= div_for video do %>
3
2
  <% if video.file_processing %>
4
- <div class="processing_text">
5
- <%= t('video.processing')%>
6
- </div>
7
- <% else %>
8
- <div id="full_video_<%= video.id%>" class="jp-video jp-video-270p">
9
- <div class="jp-type-single">
10
- <div id="jpId<%= video.id%>" class="jp-jplayer"></div>
11
- <div id="jp_interface_<%= video.id%>" class="jp-interface">
12
- <div class="jp-video-play"></div>
13
- <ul class="jp-controls">
14
- <li>
15
- <a href="#" class="jp-play" tabindex="1">play</a>
16
- </li>
17
- <li>
18
- <a href="#" class="jp-pause" tabindex="1">pause</a>
19
- </li>
20
- <li>
21
- <a href="#" class="jp-stop" tabindex="1">stop</a>
22
- </li>
23
- <li>
24
- <a href="#" class="jp-mute" tabindex="1">mute</a>
25
- </li>
26
- <li>
27
- <a href="#" class="jp-unmute" tabindex="1">unmute</a>
28
- </li>
29
- </ul>
30
- <div class="jp-progress">
31
- <div class="jp-seek-bar">
32
- <div class="jp-play-bar"></div>
33
- </div>
34
- </div>
35
- <div class="jp-volume-bar">
36
- <div class="jp-volume-bar-value"></div>
37
- </div>
38
- <div class="jp-current-time"></div>
39
- <div class="jp-duration"></div>
40
- </div>
41
- <div id="jp_playlist_<%= video.id%>" class="jp-playlist"></div>
3
+ <div class="processing_text">
4
+ <%= t('video.processing')%>
42
5
  </div>
43
- <div id="inspector"></div>
44
- </div>
6
+ <% else %>
7
+ <%= render partial: 'player',
8
+ object: video,
9
+ as: :video %>
45
10
  <% end %>
46
- </div>
47
11
  <% end %>
48
12
 
49
13
  <%= javascript_tag do %>
50
14
  $(function() {
51
- <% unless video.file_processing %>
52
- $("#jpId<%=video.id%>").jPlayer( {
53
- ready: function () {
54
- $(this).jPlayer("setMedia", {
55
- webmv: "<%= video_url(video, :format => 'webm' ) %>", // Defines the webm url
56
- flv: "<%= video_url(video, :format => 'flv') %>",
57
- mp4: "<%= video_url(video, :format => 'mp4') %>"
58
- });
59
- },
60
- solution:"flash, html",
61
- preload: "none",
62
- supplied: "webmv, flv, mp4",
63
- swfPath: "<%= asset_path('Jplayer.swf') %>",
64
- cssSelectorAncestor: "#jp_interface_<%=video.id%>"
65
- });
66
- <% end %>
15
+ <% unless video.file_processing %>
16
+ SocialStream.Video.show();
17
+ <% end %>
67
18
  });
68
19
  <% end %>
69
-
@@ -1,90 +1,90 @@
1
+ ---
1
2
  en:
2
3
  activerecord:
3
4
  attributes:
4
5
  document:
5
- title: "Title"
6
+ title: Title
6
7
  models:
7
- document: "File"
8
+ document: File
8
9
  audio:
9
- confirm_delete: "Delete audio?"
10
- title: "Audios"
11
- mine: "My audios"
12
- name: "audio"
13
- not_mine: "Audios"
14
- one: "an audio"
15
- other: "audios"
16
- processing: "Processing audio clip. Please wait..."
10
+ confirm_delete: Delete audio?
17
11
  title:
18
- one: "Audio"
19
- other: "Audios"
12
+ one: Audio
13
+ other: Audios
14
+ mine: My audios
15
+ name: audio
16
+ not_mine: Audios
17
+ one: an audio
18
+ other: audios
19
+ processing: Processing audio clip. Please wait...
20
20
  details:
21
- msg: "See details..."
21
+ msg: See details...
22
22
  document:
23
23
  actions:
24
- delete: "Delete"
25
- details: "Details"
26
- download: "Download"
27
- edit: "Edit"
28
- all: "All files"
29
- by: "by %{author}"
30
- confirm_delete: "Delete file?"
24
+ delete: Delete
25
+ details: Details
26
+ download: Download
27
+ edit: Edit
28
+ all: All files
29
+ by: by %{author}
30
+ confirm_delete: Delete file?
31
31
  description:
32
- input: "Add a description here"
33
- filter: "filter"
32
+ input: Add a description here
33
+ filter: filter
34
34
  form:
35
- title: "File"
35
+ title: File
36
36
  info:
37
- author: "Author"
37
+ author: Author
38
38
  date:
39
- created_at: "Created at"
40
- updated_at: "Updated at"
41
- description: "Description"
42
- file: "File"
43
- size: "Size"
44
- tags: "Tags"
45
- title: "Title"
46
- mine: "My files"
47
- name: "file"
39
+ created_at: Created at
40
+ updated_at: Updated at
41
+ description: Description
42
+ file: File
43
+ size: Size
44
+ tags: Tags
45
+ title: Title
46
+ mine: My files
47
+ name: file
48
48
  new:
49
- link: "Add file"
50
- title: "New file"
49
+ link: Add file
50
+ title: New file
51
51
  new_activity:
52
- attach: "Attach file"
53
- not_mine: "Files"
54
- one: "a file"
55
- other: "files"
52
+ attach: Attach file
53
+ not_mine: Files
54
+ one: a file
55
+ other: files
56
56
  scope:
57
- network: "Network"
58
- own: "Own"
59
- simple_all: "All"
57
+ network: Network
58
+ own: Own
59
+ simple_all: All
60
60
  title:
61
- input: "File title"
62
- one: "File"
63
- other: "Files"
61
+ input: File title
62
+ one: File
63
+ other: Files
64
64
  picture:
65
- confirm_delete: "Delete picture?"
66
- mine: "My pictures"
67
- name: "picture"
68
- not_mine: "Pictures"
69
- one: "a picture"
70
- other: "pictures"
65
+ confirm_delete: Delete picture?
66
+ mine: My pictures
67
+ name: picture
68
+ not_mine: Pictures
69
+ one: a picture
70
+ other: pictures
71
71
  title:
72
- one: "Picture"
73
- other: "Pictures"
72
+ one: Picture
73
+ other: Pictures
74
74
  resource:
75
- all: "All Resources"
76
- confirm_delete: "Delete resource?"
77
- title: "Resources"
78
- mine: "My resources"
79
- not_mine: "Resources"
75
+ all: All Resources
76
+ confirm_delete: Delete resource?
77
+ title: Resources
78
+ mine: My resources
79
+ not_mine: Resources
80
80
  video:
81
- confirm_delete: "Delete video?"
82
- mine: "My videos"
83
- name: "video"
84
- not_mine: "Videos"
85
- one: "a video"
86
- other: "videos"
87
- processing: "Processing video. Please, wait..."
81
+ confirm_delete: Delete video?
82
+ mine: My videos
83
+ name: video
84
+ not_mine: Videos
85
+ one: a video
86
+ other: videos
87
+ processing: Processing video. Please, wait...
88
88
  title:
89
- one: "Video"
90
- other: "Videos"
89
+ one: Video
90
+ other: Videos