activeadmin-dropzone 0.2.2 → 0.2.3

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: 4c583aafa8b2b98364e3138f90831e046417d4fd
4
- data.tar.gz: ea414d1d2bb97a3f7be322638dc2176758111e29
3
+ metadata.gz: bdad69cab213b8ba4f84c9d17beed68bffea71e2
4
+ data.tar.gz: a6b9a034a153ad699d6853dbd6832c666a3d4c63
5
5
  SHA512:
6
- metadata.gz: d08cb8a780afd811e74a57612d582813dc72c2e3f216050de2d76c92588a13c1a774a8a641833904def7d6d5aaece6e8b3ce3d5ff1b4e37453264dd30a653f09
7
- data.tar.gz: 8da7a876ccc550bf4db9847bc44f964720022a1f19a7f2bce88c00b85f4ae46496b43549f78460db1f29e57fb43d0374911cd96bf0118b3d3993f2eec1802d76
6
+ metadata.gz: 82333e76922ffd284665f7c657a815b64a36a8ea4fcbe7cf17f56982a440bfd258c6a757bd77d6ed6b1e223ed185894c131e9352cedff47f21cd20e0cf4004d9
7
+ data.tar.gz: 3f0a3a2f52c83b40580cd5fad3c18b26968c2e03ba3eaa35ce07b7a413456875d5adf3e9b85444a61286c1d6ffa455d6d8b4f2b0d945fcb627078f2e56aaff83
data/.DS_Store CHANGED
Binary file
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "activeadmin-dropzone"
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Maxim Gladkov"]
12
- s.date = "2014-02-25"
12
+ s.date = "2014-02-27"
13
13
  s.email = "contact@maximgladkov.com"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
data/app/.DS_Store CHANGED
Binary file
data/app/assets/.DS_Store CHANGED
Binary file
@@ -26,14 +26,15 @@
26
26
  xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').prop('content'));
27
27
  },
28
28
  success: function(file, data) {
29
- $(dropzone_id).append('<input type="hidden" name="<%= object.class.model_name.singular %>[<%= method %>_attributes][' + data.id + '][<%= object.class.send("dropzone_#{ method }_field", :title) %>]" value="" />');
29
+ $(dropzone_id).append('<input type="hidden" name="<%= object.class.model_name.singular %>[<%= method %>_attributes][' + data.id + '][<%= object.class.send("dropzone_#{ method }_field", :title) %>]" value="' + data.title + '" />');
30
30
  $(file.previewElement).attr('data-id', data.id);
31
31
  $(file.previewElement).attr('data-url', data.url);
32
+ $(file.previewElement).find('.dz-filename span').text(data.title);
32
33
  return file.previewElement.classList.add("dz-success");
33
34
  },
34
35
  removedfile: function(file) {
35
- $(dropzone_id + ' input[name="<%= object.class.model_name.singular %>[images_attributes][' + file.id + '][<%= object.class.send("dropzone_#{ method }_field", :title) %>]"]').remove();
36
- $(dropzone_id + ' input[name="<%= object.class.model_name.singular %>[images_attributes][' + file.id + '][<%= object.class.send("dropzone_#{ method }_field", :position) %>]"]').remove();
36
+ $(dropzone_id + ' input[name="<%= object.class.model_name.singular %>[<%= method %>_attributes][' + file.id + '][<%= object.class.send("dropzone_#{ method }_field", :title) %>]"]').remove();
37
+ $(dropzone_id + ' input[name="<%= object.class.model_name.singular %>[<%= method %>_attributes][' + file.id + '][<%= object.class.send("dropzone_#{ method }_field", :position) %>]"]').remove();
37
38
  $(file.previewElement).remove();
38
39
  $(dropzone_id).sortable('refresh');
39
40
  }
data/lib/.DS_Store CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-dropzone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Gladkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2014-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeweler