dropzonejs-rails 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/dropzonejs-rails/version.rb +2 -2
- data/vendor/assets/images/dropzone/spritemap.png +0 -0
- data/vendor/assets/images/dropzone/spritemap@2x.png +0 -0
- data/vendor/assets/javascripts/dropzone.js +53 -19
- data/vendor/assets/stylesheets/dropzone/dropzone.css.scss +5 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe9ee50a0edeab493470c4d53733167350ac2509
|
4
|
+
data.tar.gz: 8b71aa171ac3937fa58ce8bc6502cb0d5af843dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 554d70f56bc01d1e1be06fbfc5753ad04a363ebd24cb29b4ceed271524f534e8f258796d2925c1259fa3c400881928f8d696eb97b6a9293ca1f83c8ce6df449e
|
7
|
+
data.tar.gz: c7b820d918653d23d0c7e2acd9978b55fb68f53641597862e4deae799fa888fc46406e74f3b3830b99900bde86399c12c1614b10106a754721da6ca77cd5a5b5
|
data/README.md
CHANGED
Binary file
|
Binary file
|
@@ -27,10 +27,14 @@ function require(path, parent, orig) {
|
|
27
27
|
// perform real require()
|
28
28
|
// by invoking the module's
|
29
29
|
// registered function
|
30
|
-
if (!module.exports) {
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
if (!module._resolving && !module.exports) {
|
31
|
+
var mod = {};
|
32
|
+
mod.exports = {};
|
33
|
+
mod.client = mod.component = true;
|
34
|
+
module._resolving = true;
|
35
|
+
module.call(this, mod.exports, require.relative(resolved), mod);
|
36
|
+
delete module._resolving;
|
37
|
+
module.exports = mod.exports;
|
34
38
|
}
|
35
39
|
|
36
40
|
return module.exports;
|
@@ -531,12 +535,21 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
531
535
|
return this.element.classList.remove("dz-started");
|
532
536
|
},
|
533
537
|
addedfile: function(file) {
|
534
|
-
var
|
535
|
-
|
538
|
+
var node, _i, _j, _len, _len1, _ref, _ref1,
|
539
|
+
_this = this;
|
540
|
+
file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
|
536
541
|
file.previewTemplate = file.previewElement;
|
537
542
|
this.previewsContainer.appendChild(file.previewElement);
|
538
|
-
file.previewElement.
|
539
|
-
|
543
|
+
_ref = file.previewElement.querySelectorAll("[data-dz-name]");
|
544
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
545
|
+
node = _ref[_i];
|
546
|
+
node.textContent = file.name;
|
547
|
+
}
|
548
|
+
_ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
|
549
|
+
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
550
|
+
node = _ref1[_j];
|
551
|
+
node.innerHTML = this.filesize(file.size);
|
552
|
+
}
|
540
553
|
if (this.options.addRemoveLinks) {
|
541
554
|
file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\">" + this.options.dictRemoveFile + "</a>");
|
542
555
|
file._removeLink.addEventListener("click", function(e) {
|
@@ -568,16 +581,28 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
568
581
|
return this._updateMaxFilesReachedClass();
|
569
582
|
},
|
570
583
|
thumbnail: function(file, dataUrl) {
|
571
|
-
var thumbnailElement;
|
584
|
+
var thumbnailElement, _i, _len, _ref, _results;
|
572
585
|
file.previewElement.classList.remove("dz-file-preview");
|
573
586
|
file.previewElement.classList.add("dz-image-preview");
|
574
|
-
|
575
|
-
|
576
|
-
|
587
|
+
_ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
|
588
|
+
_results = [];
|
589
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
590
|
+
thumbnailElement = _ref[_i];
|
591
|
+
thumbnailElement.alt = file.name;
|
592
|
+
_results.push(thumbnailElement.src = dataUrl);
|
593
|
+
}
|
594
|
+
return _results;
|
577
595
|
},
|
578
596
|
error: function(file, message) {
|
597
|
+
var node, _i, _len, _ref, _results;
|
579
598
|
file.previewElement.classList.add("dz-error");
|
580
|
-
|
599
|
+
_ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
|
600
|
+
_results = [];
|
601
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
602
|
+
node = _ref[_i];
|
603
|
+
_results.push(node.textContent = message);
|
604
|
+
}
|
605
|
+
return _results;
|
581
606
|
},
|
582
607
|
errormultiple: noop,
|
583
608
|
processing: function(file) {
|
@@ -588,7 +613,14 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
588
613
|
},
|
589
614
|
processingmultiple: noop,
|
590
615
|
uploadprogress: function(file, progress, bytesSent) {
|
591
|
-
|
616
|
+
var node, _i, _len, _ref, _results;
|
617
|
+
_ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");
|
618
|
+
_results = [];
|
619
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
620
|
+
node = _ref[_i];
|
621
|
+
_results.push(node.style.width = "" + progress + "%");
|
622
|
+
}
|
623
|
+
return _results;
|
592
624
|
},
|
593
625
|
totaluploadprogress: noop,
|
594
626
|
sending: noop,
|
@@ -642,7 +674,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
642
674
|
throw new Error("Dropzone already attached.");
|
643
675
|
}
|
644
676
|
Dropzone.instances.push(this);
|
645
|
-
element.dropzone = this;
|
677
|
+
this.element.dropzone = this;
|
646
678
|
elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
|
647
679
|
this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
|
648
680
|
if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
|
@@ -748,7 +780,9 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
748
780
|
}
|
749
781
|
_this.hiddenFileInput = document.createElement("input");
|
750
782
|
_this.hiddenFileInput.setAttribute("type", "file");
|
751
|
-
_this.
|
783
|
+
if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
|
784
|
+
_this.hiddenFileInput.setAttribute("multiple", "multiple");
|
785
|
+
}
|
752
786
|
if (_this.options.acceptedFiles != null) {
|
753
787
|
_this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
|
754
788
|
}
|
@@ -877,7 +911,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
877
911
|
if (this.options.dictFallbackText) {
|
878
912
|
fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
|
879
913
|
}
|
880
|
-
fieldsString += "<input type=\"file\" name=\"" + this.options.paramName + (this.options.uploadMultiple ? "[]" : "") + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><
|
914
|
+
fieldsString += "<input type=\"file\" name=\"" + this.options.paramName + (this.options.uploadMultiple ? "[]" : "") + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><input type=\"submit\" value=\"Upload!\"></div>";
|
881
915
|
fields = Dropzone.createElement(fieldsString);
|
882
916
|
if (this.element.tagName !== "FORM") {
|
883
917
|
form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");
|
@@ -1448,7 +1482,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1448
1482
|
|
1449
1483
|
})(Em);
|
1450
1484
|
|
1451
|
-
Dropzone.version = "3.7.
|
1485
|
+
Dropzone.version = "3.7.3";
|
1452
1486
|
|
1453
1487
|
Dropzone.options = {};
|
1454
1488
|
|
@@ -1631,7 +1665,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1631
1665
|
validType = acceptedFiles[_i];
|
1632
1666
|
validType = validType.trim();
|
1633
1667
|
if (validType.charAt(0) === ".") {
|
1634
|
-
if (file.name.indexOf(validType, file.name.length - validType.length) !== -1) {
|
1668
|
+
if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
|
1635
1669
|
return true;
|
1636
1670
|
}
|
1637
1671
|
} else if (/\/\*$/.test(validType)) {
|
@@ -343,12 +343,11 @@
|
|
343
343
|
}
|
344
344
|
.dropzone a.dz-remove,
|
345
345
|
.dropzone-previews a.dz-remove {
|
346
|
-
background-image: -webkit-gradient(
|
347
|
-
background-image: -
|
348
|
-
background-image: -
|
349
|
-
background-image: -
|
350
|
-
background-image:
|
351
|
-
background-image: linear-gradient(top, #fafafa 0, #eee 100%);
|
346
|
+
background-image: -webkit-linear-gradient(top, #fafafa, #eee);
|
347
|
+
background-image: -moz-linear-gradient(top, #fafafa, #eee);
|
348
|
+
background-image: -o-linear-gradient(top, #fafafa, #eee);
|
349
|
+
background-image: -ms-linear-gradient(top, #fafafa, #eee);
|
350
|
+
background-image: linear-gradient(to bottom, #fafafa, #eee);
|
352
351
|
-webkit-border-radius: 2px;
|
353
352
|
border-radius: 2px;
|
354
353
|
border: 1px solid #eee;
|
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.4.
|
4
|
+
version: 0.4.10
|
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-
|
11
|
+
date: 2013-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.1.11
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Integrates Dropzone JS File upload into Rails Asset pipeline.
|