rails-uploader 0.5.1 → 0.5.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee8765eed0acd43fa3f0298b920818c61ce98dd87489357589617c253e08b78
|
4
|
+
data.tar.gz: 700490dfe078e643704fd6c08a6bb4d619ce62eaa776493f4ad11c26ee294851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c90581ef78112caa2392c0257c200714ef64b2266f4b851ec651a0dd45d4e6c73000bc7111b160f125f27c796dd8120a6205f29b45afe5f6c0de3797c11bb0
|
7
|
+
data.tar.gz: ec0e0cc1ab8417f7930b9decd0610fde73163568a49c75e8dc3565c3ccb6dad770d5968c1780d35ff5b83cab3db4f27e434c1789c2978efdd7114bf1c705a80a
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%= content_tag(:div, id: field.id, class: 'uploader-dnd-area', data: { tpml: field.klass.to_s, exists: field.exists? }) do -%>
|
2
2
|
<%= hidden_field(field.object_name, :fileupload_guid, object: field.object) if field.object.new_record? %>
|
3
3
|
|
4
|
+
<p class='uploader-errors'></p>
|
4
5
|
<div class="uploader-files"></div>
|
5
6
|
|
6
7
|
<div class="uploader-dnd-hints">
|
data/lib/uploader/version.rb
CHANGED
@@ -173,6 +173,7 @@
|
|
173
173
|
deferred;
|
174
174
|
var options = that.options;
|
175
175
|
if (options.singular) { options.filesContainer.html(data.context || '') };
|
176
|
+
options.dropZone.find('.uploader-errors').text('');
|
176
177
|
if (data.context) {
|
177
178
|
data.context.each(function (index) {
|
178
179
|
var file = files[index] ||
|
@@ -220,6 +221,9 @@
|
|
220
221
|
$(this).data('fileupload'),
|
221
222
|
template,
|
222
223
|
deferred;
|
224
|
+
try { var errors = data._response.jqXHR.responseJSON.files[0].error || ''}
|
225
|
+
catch (e) { var errors = '' }
|
226
|
+
that.options.dropZone.find('.uploader-errors').text(errors);
|
223
227
|
if (data.context) {
|
224
228
|
data.context.each(function (index) {
|
225
229
|
if (data.errorThrown !== 'abort') {
|
@@ -239,6 +243,7 @@
|
|
239
243
|
that._trigger('failed', e, data);
|
240
244
|
that._trigger('finished', e, data);
|
241
245
|
deferred.resolve();
|
246
|
+
data.context.remove();
|
242
247
|
}
|
243
248
|
);
|
244
249
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Galeta
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-11-
|
12
|
+
date: 2020-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: carrierwave
|