anaconda 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +4 -0
- data/lib/anaconda/form_builder_helpers.rb +3 -3
- data/lib/anaconda/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcafa5a609c883cdcf985429b9aab24b03cae591
|
4
|
+
data.tar.gz: cbd055fbc2b06b2f600124b9eb18a8e52c8ab959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a385e5a061bd3984b987889eee017280694cc3b53c038384d6ec65986cbaecd1c11970fbe7fd50d96866246b9a19ca624f9f57df3b900a9ef8376a176dc8ab9
|
7
|
+
data.tar.gz: a2dd2c03211f869cb9ce1827ef95bf4245223f90314b4b259838a77dbfa5dabaaf358fb4f1ef7a88899186d2b95a59e3888da0cd7c9488aa2838856718c62ca3
|
data/README.markdown
CHANGED
@@ -179,6 +179,10 @@ We highly recommend the `figaro` gem [https://github.com/laserlemon/figaro](http
|
|
179
179
|
`asset_download_url` will return a signed S3 URL with content-disposition set to attachment so the file will be downloaded instead of opened in the browser.
|
180
180
|
|
181
181
|
## Changelog
|
182
|
+
* 0.12.2
|
183
|
+
* Fix bug introduced in 0.12.1
|
184
|
+
* Wrap hidden fields in the anaconda_dropzone div (to fix bug)
|
185
|
+
|
182
186
|
* 0.12.1
|
183
187
|
* Make progress bar go to 100% on upload complete
|
184
188
|
* Properly store ACL on file upload (`asset_stored_privately`)
|
@@ -7,7 +7,7 @@ module Anaconda
|
|
7
7
|
options = {}
|
8
8
|
|
9
9
|
element_id = "anaconda_file_#{anaconda_field_name}"
|
10
|
-
|
10
|
+
output += "<div class='anaconda_dropzone'>"
|
11
11
|
if self.class == SimpleForm::FormBuilder
|
12
12
|
instance = self.object
|
13
13
|
a_class = self.object.class unless self.object.kind_of? Class
|
@@ -24,9 +24,7 @@ module Anaconda
|
|
24
24
|
end
|
25
25
|
|
26
26
|
uploader = S3Uploader.new(options)
|
27
|
-
output += "<div class='anaconda_dropzone'>"
|
28
27
|
output += self.input_field "file", name: "file", id: element_id, as: :file, data: {url: uploader.url, form_data: uploader.fields.to_json, media_types: Anaconda.js_file_types}
|
29
|
-
output += "</div>"
|
30
28
|
end
|
31
29
|
|
32
30
|
output += self.hidden_field "#{anaconda_field_name}_filename".to_sym, data: {"#{instance.class.to_s.underscore}_#{anaconda_field_name}_filename" => true}
|
@@ -36,6 +34,8 @@ module Anaconda
|
|
36
34
|
output += self.hidden_field "#{anaconda_field_name}_stored_privately".to_sym, data: {"#{instance.class.to_s.underscore}_#{anaconda_field_name}_stored_privately" => true}
|
37
35
|
output += self.hidden_field "#{anaconda_field_name}_type".to_sym, data: {"#{instance.class.to_s.underscore}_#{anaconda_field_name}_type" => true}
|
38
36
|
# output += render(:template =>"anaconda/_uploader_form_for.html.haml", :locals => {resource: instance, options: options.merge(as: anaconda_field_name, form_options: form_options, element_id: element_id )}, layout: false).to_s
|
37
|
+
|
38
|
+
output += "</div>" #anaconda_dropzone
|
39
39
|
|
40
40
|
options = options.merge(as: anaconda_field_name, form_options: form_options, element_id: element_id )
|
41
41
|
output += <<-END
|
data/lib/anaconda/version.rb
CHANGED