glebtv-rails-uploader 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc01b1665f8104d387e9a876868b7b050e46631b
4
- data.tar.gz: 2a7244d5d4a2f106620987d6198f3b2e0b5ccea7
3
+ metadata.gz: 98baab0f496d6f111968381e63cd2c9928b40a16
4
+ data.tar.gz: 729810bccdd200b8acde963b8b607a111539521e
5
5
  SHA512:
6
- metadata.gz: 50fe8cfaed4b7f1b6bf0e94f31a96364492e4e923154fd7236053ff18e14fa2f9daf4330e460f2b95d26b82daf1138352df6883009d53c1a7d5cbd4589581409
7
- data.tar.gz: 8dc102effe957f45af0aa4111bcabbb7d483cfca3821ed4e17825cc372f855e32a4daa9f4b644c0ffdf4e3267e29d00e9750f3d726f525c7f06101b11928295b
6
+ metadata.gz: b9ecf424db6fa7b7a4c5da4003e4e80ddd429f93dd3a6379e87e348c2cc8b3f5b8c7d778665f2350487b8e0fac5c50c45dca9d7bce815ef5248eb1691fcc654f
7
+ data.tar.gz: d631af11a18b881ab56a3d32d82bee3ea4bba19b9c864a4e6a15557cc4660894b3c16173f159bac1068bbbfd8c97e2676340d36606775b8f6cc3708d17694d94
@@ -3,26 +3,26 @@
3
3
 
4
4
  <div class="uploader-files"></div>
5
5
 
6
- <div class="uploader-dnd-hints">
7
- <span class="uploader-button gray fileinput-button">
6
+ <div class="uploader-dnd-hints">
7
+ <span class="uploader-button gray fileinput-button">
8
8
  <span><%= I18n.t('uploader.button') %></span>
9
9
  <%= fields_for field.object do |f| -%>
10
- <%= f.fields_for field.method_name, field.klass.new do |m| -%>
10
+ <%= f.fields_for field.method_name, field.klass.new do |m| -%>
11
11
  <%= m.file_field(:data, field.input_html) %>
12
- <% end -%>
13
- <% end -%>
12
+ <% end -%>
13
+ <% end -%>
14
14
  </span>
15
15
 
16
- <div class="uploader-dnd-hint">
17
- <%= I18n.t('uploader.or') %><span><%= I18n.t('uploader.drop') %></span>
18
- </div>
19
- </div>
20
-
21
- <%= render :partial => "uploader/#{field.theme}/upload", :locals => {:field => field} %>
16
+ <div class="uploader-dnd-hint">
17
+ <%= I18n.t('uploader.or') %><span><%= I18n.t('uploader.drop') %></span>
18
+ </div>
19
+ </div>
20
+
21
+ <%= render :partial => "uploader/#{field.theme}/upload", :locals => {:field => field} %>
22
22
  <%= render :partial => "uploader/#{field.theme}/download", :locals => {:field => field} %>
23
23
  <%= render :partial => "uploader/#{field.theme}/sortable", :locals => {:field => field} if field.sortable? %>
24
24
 
25
- <script type="text/javascript">
25
+ <script type="text/javascript">
26
26
  $(function() {
27
27
  var uploader, container;
28
28
  container = $("#<%= field.id %> div.uploader-files");
@@ -43,7 +43,7 @@
43
43
  <% if field.exists? -%>
44
44
  uploader = ($(this).data('blueimp-fileupload') || $(this).data('fileupload'));
45
45
  uploader
46
- ._renderDownload(<%=raw field.values.sort_by {|s| s.sort }.map(&:to_jq_upload).to_json %>)
46
+ ._renderDownload(<%=raw field.values.sort_by {|s| s.sort.nil? ? 0 : s.sort }.map(&:to_jq_upload).to_json %>)
47
47
  .appendTo(container);
48
48
  <% end -%>
49
49
  });
@@ -1,3 +1,3 @@
1
1
  module Uploader
2
- VERSION = "0.6.0".freeze
2
+ VERSION = "0.6.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-rails-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Galeta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-06 00:00:00.000000000 Z
13
+ date: 2014-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jquery-ui-rails