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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8568d3d2c736a125d68969748994d8dc0ab24880
4
- data.tar.gz: 602f2f76290dc012d7d037fe648b379fa61a5979
3
+ metadata.gz: 8d5568e8e6ea8c27fd4ada9de391bb4bba57d11f
4
+ data.tar.gz: d323a653e464ee0e26c2f4a9f5fd0481103c03fc
5
5
  SHA512:
6
- metadata.gz: 072dec6f09394891a0618b46bbc1098da87dacee668ec1f1d6c53674a626129e2b12a29c1bf2c30d147a3d41018d3e5f5a68f49bdc3e6fbbf86ff59191299b04
7
- data.tar.gz: a761a093b9d586c53b36d2725beffc938c8076041b622dfee8091bfaaea9548f636949a652f16955dd731bcb8651b9654ccd6dbc95891a08021238b0b0490038
6
+ metadata.gz: 5b201fa9ad4d719b187bfa6ecc8fed00d10ed1d68277b646169a3b0c90d6f228dda14e692d4e5f596a5c671a8a7cae23263b06ec5fe7eab6e4979d352b97ad84
7
+ data.tar.gz: 6c5ab3e7087fca90c99b850e05b40643ffb9affedbd4a876c834a603b14b0e47141e5ed66b91d2fc745fa670df96a091b1a22636d38ca2dcdb1ef262f15e6f8b
@@ -5,20 +5,20 @@ SocialStream.Audio = (function(SS, $, undefined){
5
5
 
6
6
  var initJplayer = function(){
7
7
  $(".jp-audio .jp-jplayer").each(function() {
8
+ var container = $(this).closest('.audio-container');
9
+
8
10
  $(this).jPlayer({
9
11
  ready: function () {
10
12
  $(this).jPlayer("setMedia", {
11
- webma: $(this).closest(".audio").find(".audio-webma").attr("href"), // Defines the webm url
13
+ webma: container.attr("data-url-webma")
12
14
  });
13
15
  },
14
16
  preload: "none",
15
17
  supplied: "webma",
16
- swfPath: "<%= asset_path "" %>",
17
- cssSelectorAncestor: "#" + $(this).closest(".audio-full").attr("id")
18
+ swfPath: container.attr('data-url-swfplayer'),
19
+ cssSelectorAncestor: "#" + container.attr("id")
18
20
  })
19
21
  });
20
-
21
- $(".format-links").hide();
22
22
  }
23
23
 
24
24
  callback.register('show', initJplayer);
@@ -2,10 +2,28 @@
2
2
  //= require social_stream/audio
3
3
  //= require social_stream/video
4
4
 
5
- SocialStream.Timeline.callbackRegister('show',
6
- SocialStream.Audio.show,
7
- SocialStream.Video.show);
5
+ SocialStream.Documents.Timeline = (function(SS, $, undefined) {
6
+ var initVideos = function() {
7
+ $(".video-container").hide();
8
8
 
9
- SocialStream.Timeline.callbackRegister('update',
10
- SocialStream.Audio.show,
11
- SocialStream.Video.show);
9
+ $(".video .play_over").click(function(){
10
+ var video = $(this).closest(".video");
11
+
12
+ video.find(".thumb").hide();
13
+ video.find(".text").hide();
14
+ video.find(".jp-video-play").hide();
15
+ video.find(".video-container").show();
16
+ video.find(".jp-jplayer").jPlayer("play", 0);
17
+ });
18
+ };
19
+
20
+ SocialStream.Timeline.callbackRegister('show',
21
+ SocialStream.Audio.show,
22
+ SocialStream.Video.show,
23
+ initVideos);
24
+
25
+ SocialStream.Timeline.callbackRegister('update',
26
+ SocialStream.Audio.show,
27
+ SocialStream.Video.show,
28
+ initVideos);
29
+ })(SocialStream, jQuery);
@@ -1,48 +1,53 @@
1
1
  //= require social_stream/wall
2
2
 
3
- SocialStream.Wall.callbackRegister('show', function(){
4
- $('.wall_input button.new_document').click(function(event){
5
- event.preventDefault();
6
-
7
- $(this).addClass("selected");
8
-
9
- // build document form
10
- if ($('.wall_input input[name^=document]').length === 0) {
11
- $('<label/>', {
12
- "for": 'document_title',
13
- text: I18n.t('activerecord.attributes.document.title')
14
- }).insertBefore($('#post_text'));
15
-
16
- $('<textarea/>', {
17
- name: 'document[description]',
18
- 'class': 'document_description',
19
- placeholder: I18n.t('document.description.input')
20
- }).insertAfter($('#post_text'));
21
-
22
- $('.wall_input textarea.document_description').val($('#post_text').val());
3
+ SocialStream.Documents.Wall = (function(SS, $, undefined) {
4
+ var initWall = function() {
5
+ $('<label/>', {
6
+ "for": 'new_document_title',
7
+ style: 'display: none;',
8
+ text: I18n.t('activerecord.attributes.document.title')
9
+ }).insertBefore($('#post_text'));
10
+
11
+ $('<textarea/>', {
12
+ name: 'document[description]',
13
+ id: 'new_document_description',
14
+ 'class': 'document_description',
15
+ style: 'display: none;',
16
+ placeholder: I18n.t('document.description.input')
17
+ }).insertAfter($('#post_text'));
18
+
19
+ $('.wall_input form').
20
+ attr('enctype', 'multipart/form-data'); // this is ignored if done after creating the file input
21
+
22
+ $('<input>', {
23
+ name: 'document[file]',
24
+ type: 'file',
25
+ style: 'visibility: hidden; position: absolute'
26
+ }).insertAfter('.wall_input textarea.document_description');
27
+
28
+ $('.wall_input button.new_document').click(function(event){
29
+ event.preventDefault();
30
+
31
+ $('label[for="new_document_title"]').show();
23
32
 
24
33
  $('#post_text').
25
34
  attr('name', 'document[title]').
26
35
  attr('placeholder', I18n.t('document.title.input'));
27
36
 
28
- $('<input>', {
29
- name: 'document[file]',
30
- type: 'file',
31
- style: 'display: none;'
32
- }).insertAfter('.wall_input textarea.document_description');
37
+ $('#new_document_description').show().val($('#post_text').val());
33
38
 
34
39
  SocialStream.Wall.changeAction($(this).attr('data-path'));
35
- $('.wall_input form').
36
- attr('enctype', 'multipart/form-data'); // this is ignored if done after creating the file input
37
40
 
38
- $('.wall_input input[name="post[owner_id]"]').attr('name', 'document[owner_id');
41
+ SocialStream.Wall.changeOwner('document');
39
42
  SocialStream.Wall.changeRelationSelect('document');
40
- }
41
43
 
42
- $('.wall_input input[type=file]').trigger('click');
44
+ $('.wall_input input[type=file]').trigger('click');
45
+ });
43
46
 
44
47
  $('.wall_input input[type=file]').change(function(){
45
48
  $("#post_text").val($(this).val().replace(/C:\\fakepath\\/i, ''));
46
49
  });
47
- });
48
- });
50
+ };
51
+
52
+ SS.Wall.callbackRegister('show', initWall);
53
+ })(SocialStream, jQuery);
@@ -0,0 +1,33 @@
1
+ //= require social_stream/callback
2
+
3
+ SocialStream.Video = (function(SS, $, undefined){
4
+ var callback = new SS.Callback();
5
+
6
+ var initJplayer = function(){
7
+ $(".jp-video .jp-jplayer").each(function() {
8
+ var container = $(this).closest('.video-container');
9
+
10
+ $(this).jPlayer({
11
+ ready: function () {
12
+ $(this).jPlayer("setMedia", {
13
+ webmv: container.attr("data-url-webm"),
14
+ flv: container.attr("data-url-flv"),
15
+ mp4: container.attr("data-url-mp4"),
16
+ poster: container.attr("data-url-poster")
17
+ });
18
+ },
19
+ solution:"flash, html",
20
+ preload: "none",
21
+ supplied: "webmv, flv, mp4",
22
+ swfPath: container.attr('data-url-swfplayer'),
23
+ cssSelectorAncestor: "#" + container.attr("id")
24
+ })
25
+ });
26
+ }
27
+
28
+ callback.register('show', initJplayer);
29
+
30
+ return callback.extend({
31
+ });
32
+
33
+ })(SocialStream, jQuery);
@@ -2,6 +2,9 @@
2
2
  .modal-body
3
3
  max-height: 520px
4
4
  padding: 0 15px 15px 15px
5
+ .tags
6
+ .select2-container
7
+ width: 98.5%
5
8
  form.new_site_client
6
9
  margin-left: 0px
7
10
  width: 100%
@@ -14,18 +14,17 @@ section.repository
14
14
  display: inline
15
15
  input
16
16
  &[type="text"]
17
- width: 22% !important
17
+ width: 24% !important
18
18
  display: inline
19
- margin-top: 3px
20
- float: right
19
+ margin-top: 20px
20
+ float: left
21
+ margin-left: 20px
21
22
 
22
23
  .btn
23
- @include btn-secundary
24
24
  float: right
25
- width: 90px
25
+ width: auto
26
26
  display: inline-block
27
- margin: 3px 16px 0 -14px
28
- padding: 5px 12px
27
+ margin: 23px 16px 0 -14px
29
28
  .tab-content
30
29
  @include grid-core-span(10, $fluidGridColumnWidth, $fluidGridGutterWidth)
31
30
  padding-bottom: 100px
@@ -54,3 +53,9 @@ section.repository
54
53
 
55
54
  .documents
56
55
  clear: both
56
+ #new_document-modal
57
+ .modal-body
58
+ input
59
+ &[type="text"]
60
+ width: 94% !important
61
+ float: none
@@ -23,4 +23,11 @@
23
23
  #documents
24
24
  .details
25
25
  .tab-content
26
- margin-top: -1px
26
+ margin-top: -1px
27
+
28
+ #repository
29
+ .counters
30
+ font-size: 14px
31
+ .event
32
+ .frequency
33
+ line-height: 20px
@@ -4,13 +4,23 @@
4
4
 
5
5
 
6
6
  @media (max-width: 767px)
7
- #user
7
+ #user,
8
+ #home,
9
+ #groups
8
10
  .activities
9
11
  .wall_input
10
12
  #new_post
11
13
  .document_description
12
14
  width: 96%
13
-
15
+ .timeline
16
+ .objects
17
+ .thumb
18
+ float: none
19
+ .text
20
+ h6
21
+ clear: both
22
+ font-size: 13px
23
+ @include ellipsis
14
24
  .picture,
15
25
  .audio,
16
26
  .video,
@@ -21,6 +31,7 @@
21
31
  .central
22
32
  width: 100% !important
23
33
  margin-left: 0px !important
34
+ margin-top: 20px
24
35
  .comments
25
36
  .avatar
26
37
  float: left
@@ -54,5 +65,19 @@
54
65
 
55
66
  @media (max-width: 480px)
56
67
 
68
+ #user,
69
+ #home,
70
+ #groups
71
+ .activities
72
+ .timeline
73
+ .comments
74
+ .child
75
+ .avatar
76
+ margin-right: 5px
77
+ .media-object
78
+ a
79
+ img
80
+ width: 40px
81
+
57
82
 
58
83
 
@@ -16,6 +16,35 @@
16
16
  @include border-radius (3px)
17
17
  border-bottom-color: #444
18
18
  background-color: rgba(50, 50, 50, 0.3)
19
+ .video
20
+ .video-container
21
+ @include centered
22
+ width: 100%
23
+ .jp-type-single
24
+ .jp-player
25
+ width: 100%
26
+ background-color: #222 !important
27
+ .jp-interface
28
+ min-height: 60px
29
+ .jp.controls
30
+ .jp-play,
31
+ .jp-pause
32
+ left: -2px !important
33
+ top: 21px !important
34
+ .jp-stop
35
+ left: 38px !important
36
+ top: 28px !important
37
+ .jp-mute,
38
+ .jp-unmute
39
+ left: 73px !important
40
+ top: 35px !important
41
+ .jp-volume-bar
42
+ left: 95px !important
43
+ top: 40px !important
44
+ .jp-current-time
45
+ left: 137px !important
46
+ top: 32px !important
47
+
19
48
  .tabbable
20
49
  .tab-content
21
50
  .media
@@ -13,6 +13,33 @@
13
13
  .actions
14
14
  width: 11%
15
15
  margin: 10px auto -7px
16
+ .video
17
+ .video-container
18
+ width: 100%
19
+ .jp-type-single
20
+ .jp-player
21
+ width: 100%
22
+ .jp-interface
23
+ min-height: 60px
24
+ .jp.controls
25
+ .jp-play,
26
+ .jp-pause
27
+ left: -2px !important
28
+ top: 21px !important
29
+ .jp-stop
30
+ left: 38px !important
31
+ top: 28px !important
32
+ .jp-mute,
33
+ .jp-unmute
34
+ left: 73px !important
35
+ top: 35px !important
36
+ .jp-volume-bar
37
+ left: 95px !important
38
+ top: 40px !important
39
+ .jp-current-time
40
+ left: 137px !important
41
+ top: 32px !important
42
+
16
43
 
17
44
  .tabbable
18
45
  margin-top: 10px
@@ -74,6 +101,12 @@
74
101
  .autor,
75
102
  .dates
76
103
  margin-left: 10px
104
+ .tags
105
+ span
106
+ padding: 3px 3px 4px 3px
107
+ display: inline-block
108
+ &:first:child
109
+ display: inline
77
110
 
78
111
 
79
112
  #picture_description
@@ -81,6 +114,9 @@
81
114
 
82
115
  #document-edit
83
116
  margin-left: 8px
117
+ .tags
118
+ .select2-container
119
+ width: 97%
84
120
  .fcbk
85
121
  margin-bottom: 20px
86
122
  input
@@ -18,14 +18,14 @@ div.jp-progress
18
18
 
19
19
  div.jp-play-bar
20
20
  background: none $blue
21
- div.down
22
- div.jp-current-time
23
- width: 123px !important
24
- background-color: rgba(0, 0, 0, .1)
25
- @include border-radius(8px)
26
- color: rgba(245, 245, 245, 0.3)
27
- padding: 0 3px
28
- border-top: 1px solid #333
21
+
22
+ div.jp-current-time
23
+ width: 123px !important
24
+ background-color: rgba(0, 0, 0, .1)
25
+ @include border-radius(8px)
26
+ color: rgba(245, 245, 245, 0.3)
27
+ padding: 0 3px
28
+ border-top: 1px solid #333
29
29
 
30
30
  div.jp-interface
31
31
  border: none !important
@@ -48,13 +48,28 @@ div.jp.controls
48
48
  div.jp.volume-bar
49
49
  margin-left: 6px
50
50
  margin-top: 5px
51
+ background: url("jplayer.blue.monday.png") 0 -250 repeat-x
52
+
51
53
 
54
+ div.jp-volume-bar-value
55
+ background: url("jplayer.blue.monday.png") 0 -256 repeat-x
56
+
52
57
  .play_over
53
- z-index: 600
54
- position: relative
58
+ margin-top: 16px
59
+ z-index: 30
60
+ position: absolute
61
+ width: 170px
55
62
  min-height: 96px
56
- background: rgba (250, 250, 250, .1) url('jplayer.blue.monday.video.play.png') no-repeat center center
63
+ background: url('jplayer.blue.monday.video.play.png') no-repeat center center
57
64
  &:hover
58
- background: rgba (250, 250, 250, .1) url('jplayer.blue.monday.video.play.hover.png') no-repeat center center
65
+ background: url('jplayer.blue.monday.video.play.hover.png') no-repeat center center
59
66
 
60
67
 
68
+ a.jp-play
69
+ background: url("jplayer.blue.monday.png") 0 0 no-repeat
70
+ a.jp-pause
71
+ background: url("jplayer.blue.monday.png") 0 -42 no-repeat
72
+ a.jp-mute
73
+ background: url("jplayer.blue.monday.png") 0 -186 no-repeat
74
+ a.jp-unmute
75
+ background: url("jplayer.blue.monday.png") 0 -170 no-repeat