rails_admin_dropzone 1.0.2 → 1.0.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: d0c59e96ddba62d12dec14782b1faabf47edd7b0
4
- data.tar.gz: ccfbfe57f279d3cb3ea98214229f16816db21769
3
+ metadata.gz: ff21ff54ba31dc4a0d8d438423ba835479ba370a
4
+ data.tar.gz: 71f82edde1b836a19cd2d8192628206d3d206a5b
5
5
  SHA512:
6
- metadata.gz: f8c1eb6f51b5c98a374886b954f23d79a6b040a2256be4d20081705d27587b07fac352b0499309d5c431733984d750715c28da2a6ae563d2880fdaecbf7d842a
7
- data.tar.gz: 14652310a78768f4a6c169a5ea5a8a5707bce802c93f7934e07aefc4018d924b936e0f78769ddf0efa4f6f99e0c6510a93fad9359c4aa181b797bf65e6261bdb
6
+ metadata.gz: e05db07b45352d7dbf51cacee290017a023ad5dd5c23fac3a41ba27955a6dffe459b52ca3494c3909ba911b938c8a732ea694cd410c87bfeadf2d83a74eb81fe
7
+ data.tar.gz: c4882f17421e6f5086e40f7886a3bd59bfcead337020c9a6f3151f672613939dda2416425598cb8ab80db3370c1b37fa7c001fe40ff20267f162f5b2860b8757
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_admin_dropzone (1.0.1)
4
+ rails_admin_dropzone (1.0.2)
5
5
  dropzonejs-rails (~> 0.4.16)
6
6
  jquery-rails (>= 3.0, < 5)
7
7
  simple_form (~> 3.2)
@@ -4,21 +4,23 @@ $(document).on('rails_admin.dom_ready', function() {
4
4
  // disable auto discover
5
5
  Dropzone.autoDiscover = true;
6
6
 
7
- var dropzone = new Dropzone (".dropzone", {
8
- maxFilesize: 256, // Set the maximum file size to 256 MB
9
- paramName: "album[second_attr][]", // Rails expects the file upload to be something like model[field_name]
10
- addRemoveLinks: true, // Don't show remove links on dropzone itself.
7
+ if ($(".dropzone").length){
8
+ var dropzone = new Dropzone (".dropzone", {
9
+ maxFilesize: 256, // Set the maximum file size to 256 MB
10
+ paramName: "album[second_attr][]", // Rails expects the file upload to be something like model[field_name]
11
+ addRemoveLinks: true, // Don't show remove links on dropzone itself.
11
12
 
12
- // Translations
13
- dictDefaultMessage: "<%= I18n.t('admin.actions.dropzone.dictDefaultMessage') %>",
14
- dictFallbackMessage: "<%= I18n.t('admin.actions.dropzone.dictFallbackMessage') %>",
15
- dictFallbackText: "<%= I18n.t('admin.actions.dropzone.dictFallbackText') %>",
16
- dictFileTooBig: "<%= I18n.t('admin.actions.dropzone.dictFileTooBig') %>",
17
- dictInvalidFileType: "<%= I18n.t('admin.actions.dropzone.dictInvalidFileType') %>",
18
- dictResponseError: "<%= I18n.t('admin.actions.dropzone.dictResponseError') %>",
19
- dictCancelUpload: "<%= I18n.t('admin.actions.dropzone.dictCancelUpload') %>",
20
- dictCancelUploadConfirmation: "<%= I18n.t('admin.actions.dropzone.dictCancelUploadConfirmation') %>",
21
- dictRemoveFile: "<%= I18n.t('admin.actions.dropzone.dictRemoveFile') %>",
22
- dictMaxFilesExceeded: "<%= I18n.t('admin.actions.dropzone.dictMaxFilesExceeded') %>"
23
- });
24
- });
13
+ // Translations
14
+ dictDefaultMessage: "<%= I18n.t('admin.actions.dropzone.dictDefaultMessage') %>",
15
+ dictFallbackMessage: "<%= I18n.t('admin.actions.dropzone.dictFallbackMessage') %>",
16
+ dictFallbackText: "<%= I18n.t('admin.actions.dropzone.dictFallbackText') %>",
17
+ dictFileTooBig: "<%= I18n.t('admin.actions.dropzone.dictFileTooBig') %>",
18
+ dictInvalidFileType: "<%= I18n.t('admin.actions.dropzone.dictInvalidFileType') %>",
19
+ dictResponseError: "<%= I18n.t('admin.actions.dropzone.dictResponseError') %>",
20
+ dictCancelUpload: "<%= I18n.t('admin.actions.dropzone.dictCancelUpload') %>",
21
+ dictCancelUploadConfirmation: "<%= I18n.t('admin.actions.dropzone.dictCancelUploadConfirmation') %>",
22
+ dictRemoveFile: "<%= I18n.t('admin.actions.dropzone.dictRemoveFile') %>",
23
+ dictMaxFilesExceeded: "<%= I18n.t('admin.actions.dropzone.dictMaxFilesExceeded') %>"
24
+ });
25
+ }
26
+ });
@@ -1,3 +1,3 @@
1
1
  module RailsAdminDropzone
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = ["luizpicolo@gmail.com"]
13
13
  s.homepage = "https://github.com/luizpicolo/rails_admin_dropzone"
14
14
  s.summary = "RailsAdmin dropzone.js"
15
- s.description = "Easy to use integration of drag&drop files upload via dropzone.js for ActiveAdmin"
15
+ s.description = "Easy to use integration of drag&drop files upload via dropzone.js for RailsAdmin"
16
16
  s.licenses = ['MIT-LICENSE']
17
17
 
18
18
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_dropzone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Picolo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_form
@@ -121,7 +121,7 @@ dependencies:
121
121
  - !ruby/object:Gem::Version
122
122
  version: '3.0'
123
123
  description: Easy to use integration of drag&drop files upload via dropzone.js for
124
- ActiveAdmin
124
+ RailsAdmin
125
125
  email:
126
126
  - luizpicolo@gmail.com
127
127
  executables: []