activeadmin-dropzone 0.2.3 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bdad69cab213b8ba4f84c9d17beed68bffea71e2
4
- data.tar.gz: a6b9a034a153ad699d6853dbd6832c666a3d4c63
3
+ metadata.gz: 1e4f3d63cc2ba11eeb027f97b7b7ff0f4810e40b
4
+ data.tar.gz: 7c1d867a6e66bf15d9906205b018d6f709374947
5
5
  SHA512:
6
- metadata.gz: 82333e76922ffd284665f7c657a815b64a36a8ea4fcbe7cf17f56982a440bfd258c6a757bd77d6ed6b1e223ed185894c131e9352cedff47f21cd20e0cf4004d9
7
- data.tar.gz: 3f0a3a2f52c83b40580cd5fad3c18b26968c2e03ba3eaa35ce07b7a413456875d5adf3e9b85444a61286c1d6ffa455d6d8b4f2b0d945fcb627078f2e56aaff83
6
+ metadata.gz: 463d6a0d4bd629b8bdf901cdb2778a63e150fb154c44ab8fe5c982843884157201bf586a790cdbae17d61e9154b55e33c6779dc47201b243f076f45546a50d90
7
+ data.tar.gz: cd7a17c94a7a45caca1816adcb64da72d77de96c2a14faab65e3f788318b7f08cc672c0a4fa2d2b7ebd348948b232027cafe3281dc9207036b2b530aae78b76c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "activeadmin-dropzone"
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
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-27"
12
+ s.date = "2014-02-28"
13
13
  s.email = "contact@maximgladkov.com"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -17,7 +17,7 @@
17
17
  var mockFiles = [<%= render_mock_dropzone_files(object.send(method)) %>];
18
18
  var dropzone_id = "#dropzone_<%= method %>_<%= current_cycle(method) %>";
19
19
  var dropzone = new Dropzone(dropzone_id, {
20
- url: '<%= upload_dropzone_path(dropzonable_class: object.class, dropzone_class: object.class.send("dropzone_#{ method }_class")) %>',
20
+ url: '<%= raw upload_dropzone_path(dropzonable_class: object.class, dropzone_class: object.class.send("dropzone_#{ method }_class")) %>',
21
21
  addRemoveLinks: true,
22
22
  dictCancelUpload: '<%=t "dropzone.cancel" %>',
23
23
  dictRemoveFile: '<%=t "dropzone.remove" %>',
@@ -88,5 +88,7 @@
88
88
  generate_dropzone_position_elements();
89
89
  }
90
90
  });
91
+
92
+ window.<%= method %>_dropzone = dropzone;
91
93
  })();
92
94
  </script>
@@ -73,6 +73,12 @@ module Activeadmin
73
73
  def data_url
74
74
  #{ options[:data] }.url
75
75
  end
76
+
77
+ def as_json(options = { })
78
+ super(options).merge({
79
+ url: data_url
80
+ })
81
+ end
76
82
  )
77
83
  end
78
84
  end
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.3
4
+ version: 0.2.4
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-27 00:00:00.000000000 Z
11
+ date: 2014-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jeweler