dropzonejs-rails 0.1.1 → 0.1.2

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDg5ZDdkNzZiNjA1YWMyODg5ZWMwMWU0MzA1NTg3NDI3ZTAyNmM2ZQ==
4
+ MjUwNTQ5OWFkN2U0MzY1MzcwMjgyZTNhYTQwNzlkNTMyNGQyODVhYQ==
5
5
  data.tar.gz: !binary |-
6
- MDliMTUyMTk0NDNhNGRiOTIxMGYwODc1NzRiNzk3YzU1OTU5ODQ5YQ==
6
+ NzFkNTM4YmJiMGYzYjc1Njk1ZDZmYzVhZTkyYTZkYTUzMzBlYTI2ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTg5ZDdhNTdjOWM5NmExMzBmNmI3YjllM2FjYTFmN2JjMTNiYWQyODNjMjUy
10
- NzUzZDNlNjNhMTQwMDJjOTQxMWE1MzIyZDJlMTBlYmZkNGI0YjQwMGZkNmIy
11
- YmFjZjY3N2EwMTA1MmMzODI4NTQ3OWIxYWZiOTU2ODU3NDM5NTM=
9
+ NTZmZjZmOGU2OTY0MjAzZDk1NmZiOTYwNmY4M2U0MDNmZTRjYWU5ODkxYjlk
10
+ NTE0Njg3YTYwNTRiOWViYWQ5ZWU2ODRlMWUxNzk4YTcxMmVjZDI4M2ZjMjBh
11
+ OTQ1M2ZmZjIyMmQ5NGYyNDZiNmZiNjllNGVkMzE2NWEzOWM0Zjc=
12
12
  data.tar.gz: !binary |-
13
- ZDYxYzc1ZmZkODk4ZWI1Nzg1ZmRlODU4YjliZmUwNGY1MDU1YmJkODRkOWEx
14
- MzZkZWJhYzFjMjNiMzA5MTFlMjY4YWVkMWFlYTZmZmMyYjkxNzg2YTUyZWEy
15
- YjIxNTZhNDcxOGRlMGVhN2VhMzU3NTExMmIwNDAyYzg5YzUxYWQ=
13
+ MjZjNDJjNjkwMjMxZTE3ODk5OTc4NDYxMDEzYjNiMTIxOTFhMTM0YWExOWE3
14
+ MjhkMDM3NmYxZDk3YTZmY2FiMzgyMmYzYWE2MjI1MTk3MDM4Njc0YjI3NGRj
15
+ NTQ2NzJlNTkwZjM0NzA1ZGZhMzk0MjIyNDAwYTE2MjhkZDllNDE=
@@ -1,4 +1,4 @@
1
1
  module DropzonejsRails
2
- VERSION = '0.1.1'
3
- DROPZONE_VERSION = '2.0.1'
2
+ VERSION = '0.1.2'
3
+ DROPZONE_VERSION = '2.0.3'
4
4
  end
@@ -411,8 +411,6 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
411
411
 
412
412
  __extends(Dropzone, _super);
413
413
 
414
- Dropzone.prototype.version = "2.0.1";
415
-
416
414
  /*
417
415
  This is a list of all available events you can register on a dropzone object.
418
416
 
@@ -452,7 +450,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
452
450
  _ref = this.element.getElementsByTagName("div");
453
451
  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
454
452
  child = _ref[_i];
455
- if (/message/.test(child.className)) {
453
+ if (/(^| )message($| )/.test(child.className)) {
456
454
  messageElement = child;
457
455
  child.className = "message";
458
456
  continue;
@@ -536,6 +534,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
536
534
  function Dropzone(element, options) {
537
535
  var elementId, elementOptions, extend, fallback, _ref;
538
536
  this.element = element;
537
+ this.version = Dropzone.version;
539
538
  this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
540
539
  if (typeof this.element === "string") {
541
540
  this.element = document.querySelector(this.element);
@@ -546,6 +545,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
546
545
  if (Dropzone.forElement(this.element)) {
547
546
  throw new Error("Dropzone already attached.");
548
547
  }
548
+ Dropzone.instances.push(this);
549
549
  elementId = this.element.id;
550
550
  elementOptions = (_ref = (elementId ? Dropzone.options[camelize(elementId)] : void 0)) != null ? _ref : {};
551
551
  extend = function() {
@@ -570,8 +570,8 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
570
570
  if (!Dropzone.isBrowserSupported()) {
571
571
  return this.options.fallback.call(this);
572
572
  }
573
- if (fallback = this.getExistingFallback()) {
574
- fallback.remove();
573
+ if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
574
+ fallback.parentNode.removeChild(fallback);
575
575
  }
576
576
  this.previewsContainer = this.options.previewsContainer ? createElement(this.options.previewsContainer) : this.element;
577
577
  this.init();
@@ -681,7 +681,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
681
681
  var el, _i, _len;
682
682
  for (_i = 0, _len = elements.length; _i < _len; _i++) {
683
683
  el = elements[_i];
684
- if (/fallback/.test(el.className)) {
684
+ if (/(^| )fallback($| )/.test(el.className)) {
685
685
  return el;
686
686
  }
687
687
  }
@@ -961,6 +961,8 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
961
961
 
962
962
  })(Em);
963
963
 
964
+ Dropzone.version = "2.0.3";
965
+
964
966
  Dropzone.options = {};
965
967
 
966
968
  Dropzone.instances = [];
@@ -1096,7 +1098,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
1096
1098
  _results = [];
1097
1099
  for (_i = 0, _len = elements.length; _i < _len; _i++) {
1098
1100
  el = elements[_i];
1099
- if (/dropzone/.test(el.className)) {
1101
+ if (/(^| )dropzone($| )/.test(el.className)) {
1100
1102
  _results.push(dropzones.push(el));
1101
1103
  } else {
1102
1104
  _results.push(void 0);
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.1
4
+ version: 0.1.2
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-14 00:00:00.000000000 Z
11
+ date: 2013-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails