dropzonejs-rails 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjUwNTQ5OWFkN2U0MzY1MzcwMjgyZTNhYTQwNzlkNTMyNGQyODVhYQ==
4
+ YWJiY2ExYTZlZWYwOTM0Zjc5OWJiODI3MWE2YzJlNThlYmM3Nzg4MA==
5
5
  data.tar.gz: !binary |-
6
- NzFkNTM4YmJiMGYzYjc1Njk1ZDZmYzVhZTkyYTZkYTUzMzBlYTI2ZQ==
6
+ NWFjMmRhNjcxZGMxODU0ODUxN2RlOTVmZDNiZjA3ZGQ4ODU4ZDNhMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTZmZjZmOGU2OTY0MjAzZDk1NmZiOTYwNmY4M2U0MDNmZTRjYWU5ODkxYjlk
10
- NTE0Njg3YTYwNTRiOWViYWQ5ZWU2ODRlMWUxNzk4YTcxMmVjZDI4M2ZjMjBh
11
- OTQ1M2ZmZjIyMmQ5NGYyNDZiNmZiNjllNGVkMzE2NWEzOWM0Zjc=
9
+ ZTM2NmI3ZjQ1MWUyM2JmMmIyNjA3ZThhMmU0YzQ2ODU3NWVmYTBiYTk5NmUy
10
+ OTBkOWVlZjQyYjhlYjUzY2MwY2VlYzdlY2Q4YzM3MDlkOTZkYTZjZTMyMDRi
11
+ ODJiNGIyZGE2MThlMWMzMmJiOWZlNzI0NzFjMzg1NjMzZGY2Yzg=
12
12
  data.tar.gz: !binary |-
13
- MjZjNDJjNjkwMjMxZTE3ODk5OTc4NDYxMDEzYjNiMTIxOTFhMTM0YWExOWE3
14
- MjhkMDM3NmYxZDk3YTZmY2FiMzgyMmYzYWE2MjI1MTk3MDM4Njc0YjI3NGRj
15
- NTQ2NzJlNTkwZjM0NzA1ZGZhMzk0MjIyNDAwYTE2MjhkZDllNDE=
13
+ MGFkMWE2YzYwNzI5ZTEzYTljMDg0OWZiOGM5MWMwMjZhOTA2YzVkYzc0YWRl
14
+ NDRjYzJkOGEzZTBkODhhMTQ5ZTAyOWI3NTRmMzlkMmFlZDY1ZTU1MDc0MDhl
15
+ NmFhZjNmMWVlZTQ0NGNlYWI3MTkzYTdjNjA2OWNjYTZjYjg1MmY=
@@ -1,4 +1,4 @@
1
1
  module DropzonejsRails
2
- VERSION = '0.1.2'
3
- DROPZONE_VERSION = '2.0.3'
2
+ VERSION = '0.1.3'
3
+ DROPZONE_VERSION = '2.0.4'
4
4
  end
@@ -573,7 +573,18 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
573
573
  if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
574
574
  fallback.parentNode.removeChild(fallback);
575
575
  }
576
- this.previewsContainer = this.options.previewsContainer ? createElement(this.options.previewsContainer) : this.element;
576
+ if (this.options.previewsContainer) {
577
+ if (typeof this.options.previewsContainer === "string") {
578
+ this.previewsContainer = document.querySelector(this.options.previewsContainer);
579
+ } else if (this.options.previewsContainer.nodeType != null) {
580
+ this.previewsContainer = this.options.previewsContainer;
581
+ }
582
+ if (this.previewsContainer == null) {
583
+ throw new Error("Invalid `previewsContainer` option provided. Please provide a CSS selector or a plain HTML element.");
584
+ }
585
+ } else {
586
+ this.previewsContainer = this.element;
587
+ }
577
588
  this.init();
578
589
  }
579
590
 
@@ -961,7 +972,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
961
972
 
962
973
  })(Em);
963
974
 
964
- Dropzone.version = "2.0.3";
975
+ Dropzone.version = "2.0.4";
965
976
 
966
977
  Dropzone.options = {};
967
978
 
@@ -987,7 +998,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
987
998
  Dropzone.isBrowserSupported = function() {
988
999
  var capableBrowser, regex, _i, _len, _ref;
989
1000
  capableBrowser = true;
990
- if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData) {
1001
+ if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
991
1002
  if (!("classList" in document.createElement("a"))) {
992
1003
  capableBrowser = false;
993
1004
  } else {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropzonejs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Nahuel Cuesta Luengo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-25 00:00:00.000000000 Z
11
+ date: 2013-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails