social_stream-documents 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,14 +49,18 @@ showAllDocumentComments = function(id){
49
49
  $("#"+id).children(".hide_show_comments").hide();
50
50
  };
51
51
 
52
- toggleDocumentEdit = function(){
53
- if($("#document_edit").css("display")=="none"){
54
- $("#document_edit").show("slow");
55
- $("#document_edit_action").addClass("selected");
56
-
57
- }else{
58
- $("#document_edit").hide("slow");
59
- $("#document_edit_action").removeClass("selected");
52
+
53
+ toggleDocumentMenu = function(name){
54
+ $(".document_menu").each(function(){
55
+ console.log($(this));
56
+ if($(this).css("display")!="none"){
57
+ $(this).slideToggle("slow");
58
+ $("#" + $(this).attr('id') + "_action").removeClass("selected");
59
+ }
60
+ });
61
+ if($("#document_" + name).css("display")=="none"){
62
+ $("#document_" + name).slideToggle("slow");
63
+ $("#document_" + name + "_action").addClass("selected");
60
64
  }
61
65
  }
62
66
 
@@ -35,6 +35,7 @@
35
35
  #document_info .right{
36
36
  float: right;
37
37
  margin-right: 30px;
38
+ text-align: right;
38
39
  }
39
40
  #document_info .left{
40
41
  float: left;
@@ -56,8 +57,10 @@
56
57
  width: 16px;
57
58
  height: 16px;
58
59
  }
59
-
60
- #document_edit {
60
+ #document_details {
61
+ padding: 10px 0px;
62
+ }
63
+ #document_edit, #document_details {
61
64
  margin: 5px 5px 0px 5px;
62
65
  border: thin solid $separation-color;
63
66
  background: $secondary-color;
@@ -1,37 +1,43 @@
1
1
  <div id="document_info">
2
- <div class="left">
3
- <div id="date_labels">
4
- <div class="details">
5
- <%= t('document.info.date.created_at') %>
6
- </div>
7
- <div class="details">
8
- <%= t('document.info.date.updated_at') %>
9
- </div>
10
- </div>
11
- <div id="dates">
12
- <div class="date">
13
- <%= I18n.localize document.created_at, :format => :long %>
14
- </div>
15
- <div class="date">
16
- <%= I18n.localize document.updated_at, :format => :long %>
17
- </div>
18
- </div>
19
- </div>
20
- <div class="right">
21
- <div id="like_count">
22
- <%= document.like_count %> <span class="details">likes</span>
23
- </div>
24
- </div>
25
- <br class="clearfloat" />
26
2
  <div id="actions">
3
+ <%= link_to content_tag(:span,image_tag("btn/btn_write.png") + t('document.actions.details'), :class => :action, :id => :document_details_action), "javascript:toggleDocumentMenu('details');" %>
27
4
  <%= link_to content_tag(:span,image_tag("btn/download.png") + t('document.actions.download'), :class => :action), download_document_path(document) %>
28
5
  <% if document.post_activity.edit_object_by?(current_subject) %>
29
- <%= link_to content_tag(:span,image_tag("btn/edit.png") + t('document.actions.edit'), :class => :action, :id => :document_edit_action), "javascript:toggleDocumentEdit();" %>
6
+ <%= link_to content_tag(:span,image_tag("btn/edit.png") + t('document.actions.edit'), :class => :action, :id => :document_edit_action), "javascript:toggleDocumentMenu('edit');" %>
30
7
  <% end %>
31
8
  <% if document.post_activity.delete_object_by?(current_subject) %>
32
- <%= 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',
33
- :scope => document.post_activity.direct_object.class.to_s.underscore), :method => :delete %>
9
+ <%= 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',
10
+ :scope => document.post_activity.direct_object.class.to_s.underscore), :method => :delete %>
34
11
  <% end %>
35
12
  </div>
13
+ <div id="document_details" class="document_menu" style="display:none;">
14
+ <div class="left">
15
+ <div id="date_labels">
16
+ <div class="details">
17
+ <%= t('document.info.date.created_at') %>
18
+ </div>
19
+ <div class="details">
20
+ <%= t('document.info.date.updated_at') %>
21
+ </div>
22
+ </div>
23
+ <div id="dates">
24
+ <div class="date">
25
+ <%= I18n.localize document.created_at, :format => :long %>
26
+ </div>
27
+ <div class="date">
28
+ <%= I18n.localize document.updated_at, :format => :long %>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <div class="right">
33
+ <div id="like_count">
34
+ <%= document.like_count %> <span class="details">likes</span>
35
+ </div>
36
+ <div id="file_size">
37
+ <span class="details">Size </span> <%= number_to_human_size document.file_file_size %>
38
+ </div>
39
+ </div>
40
+ <br class="clearfloat" />
41
+ </div>
36
42
  </div>
37
- <%= render :partial => "common/edit_form", :locals => {:document => document} %>
43
+ <%= render :partial => "common/edit_form", :locals => {:document => document} %>
@@ -1,4 +1,4 @@
1
- <div class="block" id="document_edit" style="display:none;">
1
+ <div class="block document_menu" id="document_edit" style="display:none;">
2
2
  <%= form_for(document, :html => { :method => :put }) do |f| %>
3
3
  <% if document and document.errors.any? %>
4
4
  <%= javascript_tag do %>
@@ -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
- toggleDocumentEdit();
54
+ toggleDocumentMenu('edit');
55
55
  });
56
56
  <% end %>
57
57
  <% end %>
@@ -4,11 +4,14 @@ en:
4
4
  title: "Audios"
5
5
  mine: "My audios"
6
6
  msg: "Uploaded an audio:"
7
+ name: "audio"
7
8
  not_mine: "Audios"
9
+ one: "an audio"
8
10
  processing: "Processing audio clip"
9
11
  document:
10
12
  actions:
11
13
  delete: "Delete"
14
+ details: "Details"
12
15
  download: "Download"
13
16
  edit: "Edit"
14
17
  all: "All documents"
@@ -27,7 +30,9 @@ en:
27
30
  title: "Title"
28
31
  mine: "My documents"
29
32
  msg: "Uploaded a document:"
33
+ name: "file"
30
34
  not_mine: "Documents"
35
+ one: "a file"
31
36
  simple_all: "All"
32
37
  title: "Documents"
33
38
  picture:
@@ -35,9 +40,11 @@ en:
35
40
  title: "Pictures"
36
41
  mine: "My pictures"
37
42
  msg: "Uploaded a picture:"
43
+ name: "picture"
38
44
  not_mine: "Pictures"
45
+ one: "a picture"
39
46
  repository:
40
- title: "Repository"
47
+ title: "Files"
41
48
  order:
42
49
  by: "Order by"
43
50
  last_modified: "Last modified"
@@ -45,7 +52,7 @@ en:
45
52
  resource:
46
53
  all: "All Resources"
47
54
  confirm_delete: "Delete resource?"
48
- title: "Repository"
55
+ title: "Files"
49
56
  mine: "My resources"
50
57
  msg: "Uploaded a resource:"
51
58
  not_mine: "Resources"
@@ -53,6 +60,8 @@ en:
53
60
  confirm_delete: "Delete video?"
54
61
  title: "Videos"
55
62
  mine: "My videos"
56
- msg: "Uploaded a video:"
63
+ msg: "Uploaded a video:"
64
+ name: "video"
57
65
  not_mine: "Videos"
66
+ one: "a video"
58
67
  processing: "Processing video"
@@ -4,11 +4,14 @@ es:
4
4
  title: "Audios"
5
5
  mine: "Mis audios"
6
6
  msg: "Subió un audio:"
7
+ name: "archivo de audio"
7
8
  not_mine: "Audios"
9
+ one: "un archivo de audio"
8
10
  processing: "Procesando fichero de audio..."
9
11
  document:
10
12
  actions:
11
13
  delete: "Borrar"
14
+ details: "Detalles"
12
15
  download: "Descargar"
13
16
  edit: "Editar"
14
17
  all: "Todos los documentos"
@@ -27,7 +30,9 @@ es:
27
30
  title: "Título"
28
31
  mine: "Mis documentos"
29
32
  msg: "Subió un documento:"
33
+ name: "documento"
30
34
  not_mine: "Documentos"
35
+ one: "un documento"
31
36
  simple_all: "Todos"
32
37
  title: "Documentos"
33
38
  picture:
@@ -35,9 +40,11 @@ es:
35
40
  title: "Imágenes"
36
41
  mine: "Mis imágenes"
37
42
  msg: "Subió una imagen:"
43
+ name: "imagen"
38
44
  not_mine: "Imágenes"
45
+ one: "una imagen"
39
46
  repository:
40
- title: "Repositorio"
47
+ title: "Archivos"
41
48
  order:
42
49
  by: "Ordenar por"
43
50
  last_modified: "Última modificación"
@@ -45,7 +52,7 @@ es:
45
52
  resource:
46
53
  all: "Todos los recursos"
47
54
  confirm_delete: "¿Borrar recursos?"
48
- title: "Repositorio"
55
+ title: "Archivos"
49
56
  mine: "Mis recursos"
50
57
  msg: "Subió un recurso:"
51
58
  not_mine: "Recursos"
@@ -54,5 +61,7 @@ es:
54
61
  title: "Vídeos"
55
62
  mine: "Mis vídeos"
56
63
  msg: "Subió un vídeo:"
64
+ name: "vídeo"
57
65
  not_mine: "Vídeos"
66
+ one: "un vídeo"
58
67
  processing: "Procesando vídeo..."
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Documents
3
- VERSION = "0.4.3".freeze
3
+ VERSION = "0.4.4".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.9.27')
15
+ s.add_runtime_dependency('social_stream-base', '~> 0.9.28')
16
16
  s.add_runtime_dependency('paperclip-ffmpeg', '~> 0.7.0')
17
17
  s.add_runtime_dependency('paperclip','2.3.11')
18
18
  s.add_runtime_dependency('delayed_paperclip','>= 0.7.2')
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-documents
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "V\xC3\xADctor S\xC3\xA1nchez Belmar"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-11-08 00:00:00 +01:00
19
+ date: 2011-11-15 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- hash: 13
30
+ hash: 3
31
31
  segments:
32
32
  - 0
33
33
  - 9
34
- - 27
35
- version: 0.9.27
34
+ - 28
35
+ version: 0.9.28
36
36
  type: :runtime
37
37
  version_requirements: *id001
38
38
  - !ruby/object:Gem::Dependency