effective_assets 1.7.5 → 1.7.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cfabc4658b643c537914a121472095835c0dc91
|
4
|
+
data.tar.gz: 205f869212cbe97777d3e683e8ba29d7ecbbe7d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a34cca24b6fece00eee80334454e3e65e201b0652858248133977e480f89d87be94700415dc3ce904a8af3391c21467499c5655a82109e9e947db641825ba3b
|
7
|
+
data.tar.gz: 6e9ab6abf8bd5d54d9d32424450df28e18ede59ae40c36dc68cc09c65634eb9c31d42b925eb682d98dc0eb4717061b2a8038102011bbd422658eeb1583bfc8ac
|
@@ -34,6 +34,8 @@ $.fn.S3Uploader = (options) ->
|
|
34
34
|
$uploadForms = $('.asset-box-uploader')
|
35
35
|
return false if $uploadForms.index($uploadForm) == -1
|
36
36
|
|
37
|
+
$uploadForms.find("input[type='file']").removeAttr('required')
|
38
|
+
|
37
39
|
# Make sure the user isn't over the upload limit
|
38
40
|
$asset_box = $uploadForm.closest('.asset-box-input')
|
39
41
|
limit = $asset_box.data('limit')
|
@@ -91,6 +91,7 @@ module Inputs
|
|
91
91
|
:uid => @options[:uid],
|
92
92
|
:limit => @options[:limit],
|
93
93
|
:disabled => @options[:disabled],
|
94
|
+
:required => (@options[:required] == true && attachments.length == 0),
|
94
95
|
:file_types => @options[:file_types],
|
95
96
|
:progress_bar_partial => @options[:progress_bar_partial],
|
96
97
|
:drop_files => @options[:uploader_drop_files],
|
@@ -9,9 +9,15 @@
|
|
9
9
|
%i.glyphicon.glyphicon-upload
|
10
10
|
%span= btn_label
|
11
11
|
- if limit > 1
|
12
|
-
|
12
|
+
- if required
|
13
|
+
%input.asset-box-uploader-fileinput{type: 'file', name: 'file', id: uid, multiple: 'multiple', disabled: disabled, required: true}
|
14
|
+
- else
|
15
|
+
%input.asset-box-uploader-fileinput{type: 'file', name: 'file', id: uid, multiple: 'multiple', disabled: disabled}
|
13
16
|
- else
|
14
|
-
|
17
|
+
- if required
|
18
|
+
%input.asset-box-uploader-fileinput{type: 'file', name: 'file', id: uid, disabled: disabled, required: true}
|
19
|
+
- else
|
20
|
+
%input.asset-box-uploader-fileinput{type: 'file', name: 'file', id: uid, disabled: disabled}
|
15
21
|
|
16
22
|
= render :partial => progress_bar_partial
|
17
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|