dropzonejs-rails 0.2.1 → 0.3.0
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
|
-
|
4
|
+
NzNjNTNmODFmNmVjOTJkNzNlMTVlY2E5YzhlMTJhMDdlNTE1ZGEwNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTIyM2U3YjFiZTg1NDlkZTY3OWIyZmJkMWNlZTIyOTYxNjQ5M2RjMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWM3NmI5YjJlNTdkZjMyZDZhMmZlNmNlNzdkMWViZjMwOTgxNThhZDMyYmMw
|
10
|
+
MmVjZWUzZDg1MWJjYjBmYmE2OTFhODM5MGVmY2RlY2JmNmU2MjdjNWM4Nzdi
|
11
|
+
NWU5Yzc2OTlkNGMyZDU4YjNmYWRkY2I4MTcyODM3MWI3ZjNhMDk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjI2MDk3MjFkYWMwNTg3ODgzZTkwYzBmNWJjZWZkNDBkODYxMTE0OTM5ODk2
|
14
|
+
MzI5MmQ5MGQxNGNkODM1ZDkwMDFlYjdlMzlmNDQ2YjY5MzY0ZTYwNDQwZmRl
|
15
|
+
NTk2MzcyY2RkZjA4YjRhMjZhOGJmODhhYmM0OTQ2MDZiNTA4Mjc=
|
data/README.md
CHANGED
@@ -427,7 +427,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
427
427
|
maxFilesize: 256,
|
428
428
|
paramName: "file",
|
429
429
|
createImageThumbnails: true,
|
430
|
-
maxThumbnailFilesize:
|
430
|
+
maxThumbnailFilesize: 10,
|
431
431
|
thumbnailWidth: 100,
|
432
432
|
thumbnailHeight: 100,
|
433
433
|
params: {},
|
@@ -439,12 +439,10 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
439
439
|
dictDefaultMessage: "Drop files here to upload",
|
440
440
|
dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
|
441
441
|
dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
|
442
|
+
dictFileTooBig: "File is too big ({{filesize}}MB). Max filesize: {{maxFilesize}}MB.",
|
442
443
|
dictInvalidFileType: "You can't upload files of this type.",
|
443
444
|
dictResponseError: "Server responded with {{statusCode}} code.",
|
444
445
|
accept: function(file, done) {
|
445
|
-
if (!Dropzone.isValidMimeType(file.type, this.options.acceptedMimeTypes)) {
|
446
|
-
return done(this.options.dictInvalidFileType);
|
447
|
-
}
|
448
446
|
return done();
|
449
447
|
},
|
450
448
|
init: function() {
|
@@ -454,18 +452,18 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
454
452
|
fallback: function() {
|
455
453
|
var child, messageElement, span, _i, _len, _ref;
|
456
454
|
|
457
|
-
this.element.className = "" + this.element.className + " browser-not-supported";
|
455
|
+
this.element.className = "" + this.element.className + " dz-browser-not-supported";
|
458
456
|
_ref = this.element.getElementsByTagName("div");
|
459
457
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
460
458
|
child = _ref[_i];
|
461
459
|
if (/(^| )message($| )/.test(child.className)) {
|
462
460
|
messageElement = child;
|
463
|
-
child.className = "message";
|
461
|
+
child.className = "dz-message";
|
464
462
|
continue;
|
465
463
|
}
|
466
464
|
}
|
467
465
|
if (!messageElement) {
|
468
|
-
messageElement = Dropzone.createElement("<div class=\"message\"><span></span></div>");
|
466
|
+
messageElement = Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");
|
469
467
|
this.element.appendChild(messageElement);
|
470
468
|
}
|
471
469
|
span = messageElement.getElementsByTagName("span")[0];
|
@@ -484,60 +482,64 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
484
482
|
*/
|
485
483
|
|
486
484
|
drop: function(e) {
|
487
|
-
return this.element.classList.remove("drag-hover");
|
485
|
+
return this.element.classList.remove("dz-drag-hover");
|
488
486
|
},
|
489
487
|
dragstart: noop,
|
490
488
|
dragend: function(e) {
|
491
|
-
return this.element.classList.remove("drag-hover");
|
489
|
+
return this.element.classList.remove("dz-drag-hover");
|
492
490
|
},
|
493
491
|
dragenter: function(e) {
|
494
|
-
return this.element.classList.add("drag-hover");
|
492
|
+
return this.element.classList.add("dz-drag-hover");
|
495
493
|
},
|
496
494
|
dragover: function(e) {
|
497
|
-
return this.element.classList.add("drag-hover");
|
495
|
+
return this.element.classList.add("dz-drag-hover");
|
498
496
|
},
|
499
497
|
dragleave: function(e) {
|
500
|
-
return this.element.classList.remove("drag-hover");
|
498
|
+
return this.element.classList.remove("dz-drag-hover");
|
501
499
|
},
|
502
500
|
selectedfiles: function(files) {
|
503
501
|
if (this.element === this.previewsContainer) {
|
504
|
-
return this.element.classList.add("started");
|
502
|
+
return this.element.classList.add("dz-started");
|
505
503
|
}
|
506
504
|
},
|
507
505
|
reset: function() {
|
508
|
-
return this.element.classList.remove("started");
|
506
|
+
return this.element.classList.remove("dz-started");
|
509
507
|
},
|
510
508
|
addedfile: function(file) {
|
511
509
|
file.previewElement = Dropzone.createElement(this.options.previewTemplate);
|
512
510
|
file.previewTemplate = file.previewElement;
|
513
511
|
this.previewsContainer.appendChild(file.previewElement);
|
514
|
-
file.previewElement.querySelector("
|
515
|
-
return file.previewElement.querySelector("
|
512
|
+
file.previewElement.querySelector("[data-dz-name]").textContent = file.name;
|
513
|
+
return file.previewElement.querySelector("[data-dz-size]").innerHTML = this.filesize(file.size);
|
516
514
|
},
|
517
515
|
removedfile: function(file) {
|
518
516
|
return file.previewElement.parentNode.removeChild(file.previewElement);
|
519
517
|
},
|
520
518
|
thumbnail: function(file, dataUrl) {
|
521
|
-
|
522
|
-
|
523
|
-
|
519
|
+
var thumbnailElement;
|
520
|
+
|
521
|
+
file.previewElement.classList.remove("dz-file-preview");
|
522
|
+
file.previewElement.classList.add("dz-image-preview");
|
523
|
+
thumbnailElement = file.previewElement.querySelector("[data-dz-thumbnail]");
|
524
|
+
thumbnailElement.alt = file.name;
|
525
|
+
return thumbnailElement.src = dataUrl;
|
524
526
|
},
|
525
527
|
error: function(file, message) {
|
526
|
-
file.previewElement.classList.add("error");
|
527
|
-
return file.previewElement.querySelector("
|
528
|
+
file.previewElement.classList.add("dz-error");
|
529
|
+
return file.previewElement.querySelector("[data-dz-errormessage]").textContent = message;
|
528
530
|
},
|
529
531
|
processingfile: function(file) {
|
530
|
-
return file.previewElement.classList.add("processing");
|
532
|
+
return file.previewElement.classList.add("dz-processing");
|
531
533
|
},
|
532
534
|
uploadprogress: function(file, progress, bytesSent) {
|
533
|
-
return file.previewElement.querySelector("
|
535
|
+
return file.previewElement.querySelector("[data-dz-uploadprogress]").style.width = "" + progress + "%";
|
534
536
|
},
|
535
537
|
sending: noop,
|
536
538
|
success: function(file) {
|
537
|
-
return file.previewElement.classList.add("success");
|
539
|
+
return file.previewElement.classList.add("dz-success");
|
538
540
|
},
|
539
541
|
complete: noop,
|
540
|
-
previewTemplate: "<div class=\"preview file-preview\">\n <div class=\"details\">\n
|
542
|
+
previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-success-mark\"><span>✔</span></div>\n <div class=\"dz-error-mark\"><span>✘</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>"
|
541
543
|
};
|
542
544
|
|
543
545
|
function Dropzone(element, options) {
|
@@ -622,8 +624,8 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
622
624
|
if (this.element.tagName === "form") {
|
623
625
|
this.element.setAttribute("enctype", "multipart/form-data");
|
624
626
|
}
|
625
|
-
if (this.element.classList.contains("dropzone") && !this.element.querySelector("
|
626
|
-
this.element.appendChild(Dropzone.createElement("<div class=\"default message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));
|
627
|
+
if (this.element.classList.contains("dropzone") && !this.element.querySelector("[data-dz-message]")) {
|
628
|
+
this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\" data-dz-message><span>" + this.options.dictDefaultMessage + "</span></div>"));
|
627
629
|
}
|
628
630
|
if (this.clickableElement) {
|
629
631
|
setupHiddenFileInput = function() {
|
@@ -640,6 +642,9 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
640
642
|
_this.hiddenFileInput.setAttribute("accept", _this.options.acceptParameter);
|
641
643
|
}
|
642
644
|
_this.hiddenFileInput.style.visibility = "hidden";
|
645
|
+
_this.hiddenFileInput.style.position = "absolute";
|
646
|
+
_this.hiddenFileInput.style.top = "0";
|
647
|
+
_this.hiddenFileInput.style.left = "0";
|
643
648
|
_this.hiddenFileInput.style.height = "0";
|
644
649
|
_this.hiddenFileInput.style.width = "0";
|
645
650
|
document.body.appendChild(_this.hiddenFileInput);
|
@@ -707,7 +712,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
707
712
|
element: this.clickableElement,
|
708
713
|
events: {
|
709
714
|
"click": function(evt) {
|
710
|
-
if ((_this.clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".message")))) {
|
715
|
+
if ((_this.clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
|
711
716
|
return _this.hiddenFileInput.click();
|
712
717
|
}
|
713
718
|
}
|
@@ -724,7 +729,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
724
729
|
if (existingFallback = this.getExistingFallback()) {
|
725
730
|
return existingFallback;
|
726
731
|
}
|
727
|
-
fieldsString = "<div class=\"fallback\">";
|
732
|
+
fieldsString = "<div class=\"dz-fallback\">";
|
728
733
|
if (this.options.dictFallbackText) {
|
729
734
|
fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
|
730
735
|
}
|
@@ -808,7 +813,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
808
813
|
|
809
814
|
Dropzone.prototype.disable = function() {
|
810
815
|
if (this.clickableElement === this.element) {
|
811
|
-
this.element.classList.remove("clickable");
|
816
|
+
this.element.classList.remove("dz-clickable");
|
812
817
|
}
|
813
818
|
this.removeEventListeners();
|
814
819
|
this.filesProcessing = [];
|
@@ -817,7 +822,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
817
822
|
|
818
823
|
Dropzone.prototype.enable = function() {
|
819
824
|
if (this.clickableElement === this.element) {
|
820
|
-
this.element.classList.add("clickable");
|
825
|
+
this.element.classList.add("dz-clickable");
|
821
826
|
}
|
822
827
|
return this.setupEventListeners();
|
823
828
|
};
|
@@ -870,7 +875,9 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
870
875
|
|
871
876
|
Dropzone.prototype.accept = function(file, done) {
|
872
877
|
if (file.size > this.options.maxFilesize * 1024 * 1024) {
|
873
|
-
return done(
|
878
|
+
return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
|
879
|
+
} else if (!Dropzone.isValidMimeType(file.type, this.options.acceptedMimeTypes)) {
|
880
|
+
return done(this.options.dictInvalidFileType);
|
874
881
|
} else {
|
875
882
|
return this.options.accept.call(this, file, done);
|
876
883
|
}
|
@@ -995,25 +1002,31 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
995
1002
|
};
|
996
1003
|
|
997
1004
|
Dropzone.prototype.uploadFile = function(file) {
|
998
|
-
var formData, handleError, input, inputName, inputType, key, progressObj, value, xhr, _i, _len, _ref, _ref1, _ref2,
|
1005
|
+
var formData, handleError, input, inputName, inputType, key, progressObj, response, value, xhr, _i, _len, _ref, _ref1, _ref2,
|
999
1006
|
_this = this;
|
1000
1007
|
|
1001
1008
|
xhr = new XMLHttpRequest();
|
1002
1009
|
xhr.open(this.options.method, this.options.url, true);
|
1010
|
+
response = null;
|
1003
1011
|
handleError = function() {
|
1004
|
-
return _this.errorProcessing(file,
|
1012
|
+
return _this.errorProcessing(file, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
|
1005
1013
|
};
|
1006
1014
|
xhr.onload = function(e) {
|
1007
|
-
var
|
1015
|
+
var _ref;
|
1008
1016
|
|
1017
|
+
response = xhr.responseText;
|
1018
|
+
if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
|
1019
|
+
try {
|
1020
|
+
response = JSON.parse(response);
|
1021
|
+
} catch (_error) {
|
1022
|
+
e = _error;
|
1023
|
+
response = "Invalid JSON response from server.";
|
1024
|
+
}
|
1025
|
+
}
|
1009
1026
|
if (!((200 <= (_ref = xhr.status) && _ref < 300))) {
|
1010
1027
|
return handleError();
|
1011
1028
|
} else {
|
1012
1029
|
_this.emit("uploadprogress", file, 100, file.size);
|
1013
|
-
response = xhr.responseText;
|
1014
|
-
if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
|
1015
|
-
response = JSON.parse(response);
|
1016
|
-
}
|
1017
1030
|
return _this.finished(file, response, e);
|
1018
1031
|
}
|
1019
1032
|
};
|
@@ -1073,7 +1086,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1073
1086
|
|
1074
1087
|
})(Em);
|
1075
1088
|
|
1076
|
-
Dropzone.version = "
|
1089
|
+
Dropzone.version = "3.0.1";
|
1077
1090
|
|
1078
1091
|
Dropzone.options = {};
|
1079
1092
|
|
@@ -13,30 +13,30 @@
|
|
13
13
|
background: rgba(0,0,0,0.02);
|
14
14
|
padding: 1em;
|
15
15
|
}
|
16
|
-
.dropzone.clickable {
|
16
|
+
.dropzone.dz-clickable {
|
17
17
|
cursor: pointer;
|
18
18
|
}
|
19
|
-
.dropzone.clickable .message,
|
20
|
-
.dropzone.clickable .message span {
|
19
|
+
.dropzone.dz-clickable .dz-message,
|
20
|
+
.dropzone.dz-clickable .dz-message span {
|
21
21
|
cursor: pointer;
|
22
22
|
}
|
23
|
-
.dropzone.clickable * {
|
23
|
+
.dropzone.dz-clickable * {
|
24
24
|
cursor: default;
|
25
25
|
}
|
26
|
-
.dropzone .message {
|
26
|
+
.dropzone .dz-message {
|
27
27
|
opacity: 1;
|
28
28
|
-ms-filter: none;
|
29
29
|
filter: none;
|
30
30
|
}
|
31
|
-
.dropzone.drag-hover {
|
31
|
+
.dropzone.dz-drag-hover {
|
32
32
|
border-color: rgba(0,0,0,0.15);
|
33
33
|
background: rgba(0,0,0,0.04);
|
34
34
|
}
|
35
|
-
.dropzone.started .message {
|
35
|
+
.dropzone.dz-started .dz-message {
|
36
36
|
display: none;
|
37
37
|
}
|
38
|
-
.dropzone .preview,
|
39
|
-
.dropzone-previews .preview {
|
38
|
+
.dropzone .dz-preview,
|
39
|
+
.dropzone-previews .dz-preview {
|
40
40
|
background: rgba(255,255,255,0.8);
|
41
41
|
position: relative;
|
42
42
|
display: inline-block;
|
@@ -45,8 +45,12 @@
|
|
45
45
|
border: 1px solid #acacac;
|
46
46
|
padding: 6px 6px 6px 6px;
|
47
47
|
}
|
48
|
-
.dropzone .preview
|
49
|
-
.dropzone-previews .preview
|
48
|
+
.dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
|
49
|
+
.dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
|
50
|
+
display: none;
|
51
|
+
}
|
52
|
+
.dropzone .dz-preview .dz-details,
|
53
|
+
.dropzone-previews .dz-preview .dz-details {
|
50
54
|
width: 100px;
|
51
55
|
height: 100px;
|
52
56
|
position: relative;
|
@@ -54,49 +58,43 @@
|
|
54
58
|
padding: 5px;
|
55
59
|
margin-bottom: 22px;
|
56
60
|
}
|
57
|
-
.dropzone .preview .details .filename,
|
58
|
-
.dropzone-previews .preview .details .filename {
|
61
|
+
.dropzone .dz-preview .dz-details .dz-filename,
|
62
|
+
.dropzone-previews .dz-preview .dz-details .dz-filename {
|
59
63
|
overflow: hidden;
|
60
64
|
height: 100%;
|
61
65
|
}
|
62
|
-
.dropzone .preview .details img,
|
63
|
-
.dropzone-previews .preview .details img {
|
66
|
+
.dropzone .dz-preview .dz-details img,
|
67
|
+
.dropzone-previews .dz-preview .dz-details img {
|
64
68
|
position: absolute;
|
65
69
|
top: 0;
|
66
70
|
left: 0;
|
67
71
|
width: 100px;
|
68
72
|
height: 100px;
|
69
73
|
}
|
70
|
-
.dropzone .preview .details .size,
|
71
|
-
.dropzone-previews .preview .details .size {
|
74
|
+
.dropzone .dz-preview .dz-details .dz-size,
|
75
|
+
.dropzone-previews .dz-preview .dz-details .dz-size {
|
72
76
|
position: absolute;
|
73
77
|
bottom: -28px;
|
74
78
|
left: 3px;
|
75
79
|
height: 28px;
|
76
80
|
line-height: 28px;
|
77
81
|
}
|
78
|
-
.dropzone .preview.error .error-mark,
|
79
|
-
.dropzone-previews .preview.error .error-mark {
|
82
|
+
.dropzone .dz-preview.dz-error .dz-error-mark,
|
83
|
+
.dropzone-previews .dz-preview.dz-error .dz-error-mark {
|
80
84
|
display: block;
|
81
85
|
}
|
82
|
-
.dropzone .preview.success .success-mark,
|
83
|
-
.dropzone-previews .preview.success .success-mark {
|
86
|
+
.dropzone .dz-preview.dz-success .dz-success-mark,
|
87
|
+
.dropzone-previews .dz-preview.dz-success .dz-success-mark {
|
84
88
|
display: block;
|
85
89
|
}
|
86
|
-
.dropzone .preview:hover .details img,
|
87
|
-
.dropzone-previews .preview:hover .details img {
|
88
|
-
display: none;
|
89
|
-
}
|
90
|
-
.dropzone .preview:hover .success-mark,
|
91
|
-
.dropzone-previews .preview:hover .success-mark,
|
92
|
-
.dropzone .preview:hover .error-mark,
|
93
|
-
.dropzone-previews .preview:hover .error-mark {
|
90
|
+
.dropzone .dz-preview:hover .dz-details img,
|
91
|
+
.dropzone-previews .dz-preview:hover .dz-details img {
|
94
92
|
display: none;
|
95
93
|
}
|
96
|
-
.dropzone .preview .success-mark,
|
97
|
-
.dropzone-previews .preview .success-mark,
|
98
|
-
.dropzone .preview .error-mark,
|
99
|
-
.dropzone-previews .preview .error-mark {
|
94
|
+
.dropzone .dz-preview .dz-success-mark,
|
95
|
+
.dropzone-previews .dz-preview .dz-success-mark,
|
96
|
+
.dropzone .dz-preview .dz-error-mark,
|
97
|
+
.dropzone-previews .dz-preview .dz-error-mark {
|
100
98
|
display: none;
|
101
99
|
position: absolute;
|
102
100
|
width: 40px;
|
@@ -106,16 +104,16 @@
|
|
106
104
|
right: -10px;
|
107
105
|
top: -10px;
|
108
106
|
}
|
109
|
-
.dropzone .preview .success-mark,
|
110
|
-
.dropzone-previews .preview .success-mark {
|
107
|
+
.dropzone .dz-preview .dz-success-mark,
|
108
|
+
.dropzone-previews .dz-preview .dz-success-mark {
|
111
109
|
color: #8cc657;
|
112
110
|
}
|
113
|
-
.dropzone .preview .error-mark,
|
114
|
-
.dropzone-previews .preview .error-mark {
|
111
|
+
.dropzone .dz-preview .dz-error-mark,
|
112
|
+
.dropzone-previews .dz-preview .dz-error-mark {
|
115
113
|
color: #ee162d;
|
116
114
|
}
|
117
|
-
.dropzone .preview .progress,
|
118
|
-
.dropzone-previews .preview .progress {
|
115
|
+
.dropzone .dz-preview .dz-progress,
|
116
|
+
.dropzone-previews .dz-preview .dz-progress {
|
119
117
|
position: absolute;
|
120
118
|
top: 100px;
|
121
119
|
left: 6px;
|
@@ -124,8 +122,8 @@
|
|
124
122
|
background: #d7d7d7;
|
125
123
|
display: none;
|
126
124
|
}
|
127
|
-
.dropzone .preview .progress .upload,
|
128
|
-
.dropzone-previews .preview .progress .upload {
|
125
|
+
.dropzone .dz-preview .dz-progress .dz-upload,
|
126
|
+
.dropzone-previews .dz-preview .dz-progress .dz-upload {
|
129
127
|
position: absolute;
|
130
128
|
top: 0;
|
131
129
|
bottom: 0;
|
@@ -133,12 +131,12 @@
|
|
133
131
|
width: 0%;
|
134
132
|
background-color: #8cc657;
|
135
133
|
}
|
136
|
-
.dropzone .preview.processing .progress,
|
137
|
-
.dropzone-previews .preview.processing .progress {
|
134
|
+
.dropzone .dz-preview.dz-processing .dz-progress,
|
135
|
+
.dropzone-previews .dz-preview.dz-processing .dz-progress {
|
138
136
|
display: block;
|
139
137
|
}
|
140
|
-
.dropzone .preview .error-message,
|
141
|
-
.dropzone-previews .preview .error-message {
|
138
|
+
.dropzone .dz-preview .dz-error-message,
|
139
|
+
.dropzone-previews .dz-preview .dz-error-message {
|
142
140
|
display: none;
|
143
141
|
position: absolute;
|
144
142
|
top: -5px;
|
@@ -150,7 +148,7 @@
|
|
150
148
|
max-width: 500px;
|
151
149
|
z-index: 500;
|
152
150
|
}
|
153
|
-
.dropzone .preview:hover.error .error-message,
|
154
|
-
.dropzone-previews .preview:hover.error .error-message {
|
151
|
+
.dropzone .dz-preview:hover.dz-error .dz-error-message,
|
152
|
+
.dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
|
155
153
|
display: block;
|
156
154
|
}
|
@@ -13,30 +13,30 @@
|
|
13
13
|
background: rgba(0,0,0,0.02);
|
14
14
|
padding: 1em;
|
15
15
|
}
|
16
|
-
.dropzone.clickable {
|
16
|
+
.dropzone.dz-clickable {
|
17
17
|
cursor: pointer;
|
18
18
|
}
|
19
|
-
.dropzone.clickable .message,
|
20
|
-
.dropzone.clickable .message span {
|
19
|
+
.dropzone.dz-clickable .dz-message,
|
20
|
+
.dropzone.dz-clickable .dz-message span {
|
21
21
|
cursor: pointer;
|
22
22
|
}
|
23
|
-
.dropzone.clickable * {
|
23
|
+
.dropzone.dz-clickable * {
|
24
24
|
cursor: default;
|
25
25
|
}
|
26
|
-
.dropzone .message {
|
26
|
+
.dropzone .dz-message {
|
27
27
|
opacity: 1;
|
28
28
|
-ms-filter: none;
|
29
29
|
filter: none;
|
30
30
|
}
|
31
|
-
.dropzone.drag-hover {
|
31
|
+
.dropzone.dz-drag-hover {
|
32
32
|
border-color: rgba(0,0,0,0.15);
|
33
33
|
background: rgba(0,0,0,0.04);
|
34
34
|
}
|
35
|
-
.dropzone.started .message {
|
35
|
+
.dropzone.dz-started .dz-message {
|
36
36
|
display: none;
|
37
37
|
}
|
38
|
-
.dropzone .preview,
|
39
|
-
.dropzone-previews .preview {
|
38
|
+
.dropzone .dz-preview,
|
39
|
+
.dropzone-previews .dz-preview {
|
40
40
|
background: rgba(255,255,255,0.8);
|
41
41
|
position: relative;
|
42
42
|
display: inline-block;
|
@@ -45,8 +45,12 @@
|
|
45
45
|
border: 1px solid #acacac;
|
46
46
|
padding: 6px 6px 6px 6px;
|
47
47
|
}
|
48
|
-
.dropzone .preview
|
49
|
-
.dropzone-previews .preview
|
48
|
+
.dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
|
49
|
+
.dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
|
50
|
+
display: none;
|
51
|
+
}
|
52
|
+
.dropzone .dz-preview .dz-details,
|
53
|
+
.dropzone-previews .dz-preview .dz-details {
|
50
54
|
width: 100px;
|
51
55
|
height: 100px;
|
52
56
|
position: relative;
|
@@ -54,49 +58,43 @@
|
|
54
58
|
padding: 5px;
|
55
59
|
margin-bottom: 22px;
|
56
60
|
}
|
57
|
-
.dropzone .preview .details .filename,
|
58
|
-
.dropzone-previews .preview .details .filename {
|
61
|
+
.dropzone .dz-preview .dz-details .dz-filename,
|
62
|
+
.dropzone-previews .dz-preview .dz-details .dz-filename {
|
59
63
|
overflow: hidden;
|
60
64
|
height: 100%;
|
61
65
|
}
|
62
|
-
.dropzone .preview .details img,
|
63
|
-
.dropzone-previews .preview .details img {
|
66
|
+
.dropzone .dz-preview .dz-details img,
|
67
|
+
.dropzone-previews .dz-preview .dz-details img {
|
64
68
|
position: absolute;
|
65
69
|
top: 0;
|
66
70
|
left: 0;
|
67
71
|
width: 100px;
|
68
72
|
height: 100px;
|
69
73
|
}
|
70
|
-
.dropzone .preview .details .size,
|
71
|
-
.dropzone-previews .preview .details .size {
|
74
|
+
.dropzone .dz-preview .dz-details .dz-size,
|
75
|
+
.dropzone-previews .dz-preview .dz-details .dz-size {
|
72
76
|
position: absolute;
|
73
77
|
bottom: -28px;
|
74
78
|
left: 3px;
|
75
79
|
height: 28px;
|
76
80
|
line-height: 28px;
|
77
81
|
}
|
78
|
-
.dropzone .preview.error .error-mark,
|
79
|
-
.dropzone-previews .preview.error .error-mark {
|
82
|
+
.dropzone .dz-preview.dz-error .dz-error-mark,
|
83
|
+
.dropzone-previews .dz-preview.dz-error .dz-error-mark {
|
80
84
|
display: block;
|
81
85
|
}
|
82
|
-
.dropzone .preview.success .success-mark,
|
83
|
-
.dropzone-previews .preview.success .success-mark {
|
86
|
+
.dropzone .dz-preview.dz-success .dz-success-mark,
|
87
|
+
.dropzone-previews .dz-preview.dz-success .dz-success-mark {
|
84
88
|
display: block;
|
85
89
|
}
|
86
|
-
.dropzone .preview:hover .details img,
|
87
|
-
.dropzone-previews .preview:hover .details img {
|
88
|
-
display: none;
|
89
|
-
}
|
90
|
-
.dropzone .preview:hover .success-mark,
|
91
|
-
.dropzone-previews .preview:hover .success-mark,
|
92
|
-
.dropzone .preview:hover .error-mark,
|
93
|
-
.dropzone-previews .preview:hover .error-mark {
|
90
|
+
.dropzone .dz-preview:hover .dz-details img,
|
91
|
+
.dropzone-previews .dz-preview:hover .dz-details img {
|
94
92
|
display: none;
|
95
93
|
}
|
96
|
-
.dropzone .preview .success-mark,
|
97
|
-
.dropzone-previews .preview .success-mark,
|
98
|
-
.dropzone .preview .error-mark,
|
99
|
-
.dropzone-previews .preview .error-mark {
|
94
|
+
.dropzone .dz-preview .dz-success-mark,
|
95
|
+
.dropzone-previews .dz-preview .dz-success-mark,
|
96
|
+
.dropzone .dz-preview .dz-error-mark,
|
97
|
+
.dropzone-previews .dz-preview .dz-error-mark {
|
100
98
|
display: none;
|
101
99
|
position: absolute;
|
102
100
|
width: 40px;
|
@@ -106,16 +104,16 @@
|
|
106
104
|
right: -10px;
|
107
105
|
top: -10px;
|
108
106
|
}
|
109
|
-
.dropzone .preview .success-mark,
|
110
|
-
.dropzone-previews .preview .success-mark {
|
107
|
+
.dropzone .dz-preview .dz-success-mark,
|
108
|
+
.dropzone-previews .dz-preview .dz-success-mark {
|
111
109
|
color: #8cc657;
|
112
110
|
}
|
113
|
-
.dropzone .preview .error-mark,
|
114
|
-
.dropzone-previews .preview .error-mark {
|
111
|
+
.dropzone .dz-preview .dz-error-mark,
|
112
|
+
.dropzone-previews .dz-preview .dz-error-mark {
|
115
113
|
color: #ee162d;
|
116
114
|
}
|
117
|
-
.dropzone .preview .progress,
|
118
|
-
.dropzone-previews .preview .progress {
|
115
|
+
.dropzone .dz-preview .dz-progress,
|
116
|
+
.dropzone-previews .dz-preview .dz-progress {
|
119
117
|
position: absolute;
|
120
118
|
top: 100px;
|
121
119
|
left: 6px;
|
@@ -124,8 +122,8 @@
|
|
124
122
|
background: #d7d7d7;
|
125
123
|
display: none;
|
126
124
|
}
|
127
|
-
.dropzone .preview .progress .upload,
|
128
|
-
.dropzone-previews .preview .progress .upload {
|
125
|
+
.dropzone .dz-preview .dz-progress .dz-upload,
|
126
|
+
.dropzone-previews .dz-preview .dz-progress .dz-upload {
|
129
127
|
position: absolute;
|
130
128
|
top: 0;
|
131
129
|
bottom: 0;
|
@@ -133,12 +131,12 @@
|
|
133
131
|
width: 0%;
|
134
132
|
background-color: #8cc657;
|
135
133
|
}
|
136
|
-
.dropzone .preview.processing .progress,
|
137
|
-
.dropzone-previews .preview.processing .progress {
|
134
|
+
.dropzone .dz-preview.dz-processing .dz-progress,
|
135
|
+
.dropzone-previews .dz-preview.dz-processing .dz-progress {
|
138
136
|
display: block;
|
139
137
|
}
|
140
|
-
.dropzone .preview .error-message,
|
141
|
-
.dropzone-previews .preview .error-message {
|
138
|
+
.dropzone .dz-preview .dz-error-message,
|
139
|
+
.dropzone-previews .dz-preview .dz-error-message {
|
142
140
|
display: none;
|
143
141
|
position: absolute;
|
144
142
|
top: -5px;
|
@@ -150,8 +148,8 @@
|
|
150
148
|
max-width: 500px;
|
151
149
|
z-index: 500;
|
152
150
|
}
|
153
|
-
.dropzone .preview:hover.error .error-message,
|
154
|
-
.dropzone-previews .preview:hover.error .error-message {
|
151
|
+
.dropzone .dz-preview:hover.dz-error .dz-error-message,
|
152
|
+
.dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
|
155
153
|
display: block;
|
156
154
|
}
|
157
155
|
.dropzone {
|
@@ -162,7 +160,7 @@
|
|
162
160
|
background: rgba(0,0,0,0.03);
|
163
161
|
padding: 23px;
|
164
162
|
}
|
165
|
-
.dropzone .default.message {
|
163
|
+
.dropzone .dz-default.dz-message {
|
166
164
|
opacity: 1;
|
167
165
|
-ms-filter: none;
|
168
166
|
filter: none;
|
@@ -183,72 +181,72 @@
|
|
183
181
|
left: 50%;
|
184
182
|
}
|
185
183
|
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
|
186
|
-
.dropzone .default.message {
|
184
|
+
.dropzone .dz-default.dz-message {
|
187
185
|
background-image: image-path("dropzone/spritemap@2x.png");
|
188
186
|
-webkit-background-size: 428px 406px;
|
189
187
|
-moz-background-size: 428px 406px;
|
190
188
|
background-size: 428px 406px;
|
191
189
|
}
|
192
190
|
}
|
193
|
-
.dropzone .default.message span {
|
191
|
+
.dropzone .dz-default.dz-message span {
|
194
192
|
display: none;
|
195
193
|
}
|
196
|
-
.dropzone.square .default.message {
|
194
|
+
.dropzone.dz-square .dz-default.dz-message {
|
197
195
|
background-position: 0 -123px;
|
198
196
|
width: 268px;
|
199
197
|
margin-left: -134px;
|
200
198
|
height: 174px;
|
201
199
|
margin-top: -87px;
|
202
200
|
}
|
203
|
-
.dropzone.drag-hover .message {
|
201
|
+
.dropzone.dz-drag-hover .dz-message {
|
204
202
|
opacity: 0.15;
|
205
203
|
filter: alpha(opacity=15);
|
206
204
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=15)";
|
207
205
|
}
|
208
|
-
.dropzone.started .message {
|
206
|
+
.dropzone.dz-started .dz-message {
|
209
207
|
display: block;
|
210
208
|
opacity: 0;
|
211
209
|
filter: alpha(opacity=0);
|
212
210
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
213
211
|
}
|
214
|
-
.dropzone .preview,
|
215
|
-
.dropzone-previews .preview {
|
212
|
+
.dropzone .dz-preview,
|
213
|
+
.dropzone-previews .dz-preview {
|
216
214
|
-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
|
217
215
|
box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
|
218
216
|
font-size: 14px;
|
219
217
|
}
|
220
|
-
.dropzone .preview .details img,
|
221
|
-
.dropzone-previews .preview .details img {
|
218
|
+
.dropzone .dz-preview .dz-details img,
|
219
|
+
.dropzone-previews .dz-preview .dz-details img {
|
222
220
|
width: 100px;
|
223
221
|
height: 100px;
|
224
222
|
}
|
225
|
-
.dropzone .preview.image-preview:hover .details img,
|
226
|
-
.dropzone-previews .preview.image-preview:hover .details img {
|
223
|
+
.dropzone .dz-preview.dz-image-preview:hover .dz-details img,
|
224
|
+
.dropzone-previews .dz-preview.dz-image-preview:hover .dz-details img {
|
227
225
|
display: block;
|
228
226
|
opacity: 0.1;
|
229
227
|
filter: alpha(opacity=10);
|
230
228
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
|
231
229
|
}
|
232
|
-
.dropzone .preview.success .success-mark,
|
233
|
-
.dropzone-previews .preview.success .success-mark {
|
230
|
+
.dropzone .dz-preview.dz-success .dz-success-mark,
|
231
|
+
.dropzone-previews .dz-preview.dz-success .dz-success-mark {
|
234
232
|
opacity: 1;
|
235
233
|
-ms-filter: none;
|
236
234
|
filter: none;
|
237
235
|
}
|
238
|
-
.dropzone .preview.error .error-mark,
|
239
|
-
.dropzone-previews .preview.error .error-mark {
|
236
|
+
.dropzone .dz-preview.dz-error .dz-error-mark,
|
237
|
+
.dropzone-previews .dz-preview.dz-error .dz-error-mark {
|
240
238
|
opacity: 1;
|
241
239
|
-ms-filter: none;
|
242
240
|
filter: none;
|
243
241
|
}
|
244
|
-
.dropzone .preview.error .progress .upload,
|
245
|
-
.dropzone-previews .preview.error .progress .upload {
|
242
|
+
.dropzone .dz-preview.dz-error .dz-progress .dz-upload,
|
243
|
+
.dropzone-previews .dz-preview.dz-error .dz-progress .dz-upload {
|
246
244
|
background: #ee1e2d;
|
247
245
|
}
|
248
|
-
.dropzone .preview .error-mark,
|
249
|
-
.dropzone-previews .preview .error-mark,
|
250
|
-
.dropzone .preview .success-mark,
|
251
|
-
.dropzone-previews .preview .success-mark {
|
246
|
+
.dropzone .dz-preview .dz-error-mark,
|
247
|
+
.dropzone-previews .dz-preview .dz-error-mark,
|
248
|
+
.dropzone .dz-preview .dz-success-mark,
|
249
|
+
.dropzone-previews .dz-preview .dz-success-mark {
|
252
250
|
display: block;
|
253
251
|
opacity: 0;
|
254
252
|
filter: alpha(opacity=0);
|
@@ -262,32 +260,32 @@
|
|
262
260
|
background-repeat: no-repeat;
|
263
261
|
}
|
264
262
|
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
|
265
|
-
.dropzone .preview .error-mark,
|
266
|
-
.dropzone-previews .preview .error-mark,
|
267
|
-
.dropzone .preview .success-mark,
|
268
|
-
.dropzone-previews .preview .success-mark {
|
263
|
+
.dropzone .dz-preview .dz-error-mark,
|
264
|
+
.dropzone-previews .dz-preview .dz-error-mark,
|
265
|
+
.dropzone .dz-preview .dz-success-mark,
|
266
|
+
.dropzone-previews .dz-preview .dz-success-mark {
|
269
267
|
background-image: image-path("dropzone/spritemap@2x.png");
|
270
268
|
-webkit-background-size: 428px 406px;
|
271
269
|
-moz-background-size: 428px 406px;
|
272
270
|
background-size: 428px 406px;
|
273
271
|
}
|
274
272
|
}
|
275
|
-
.dropzone .preview .error-mark span,
|
276
|
-
.dropzone-previews .preview .error-mark span,
|
277
|
-
.dropzone .preview .success-mark span,
|
278
|
-
.dropzone-previews .preview .success-mark span {
|
273
|
+
.dropzone .dz-preview .dz-error-mark span,
|
274
|
+
.dropzone-previews .dz-preview .dz-error-mark span,
|
275
|
+
.dropzone .dz-preview .dz-success-mark span,
|
276
|
+
.dropzone-previews .dz-preview .dz-success-mark span {
|
279
277
|
display: none;
|
280
278
|
}
|
281
|
-
.dropzone .preview .error-mark,
|
282
|
-
.dropzone-previews .preview .error-mark {
|
279
|
+
.dropzone .dz-preview .dz-error-mark,
|
280
|
+
.dropzone-previews .dz-preview .dz-error-mark {
|
283
281
|
background-position: -268px -123px;
|
284
282
|
}
|
285
|
-
.dropzone .preview .success-mark,
|
286
|
-
.dropzone-previews .preview .success-mark {
|
283
|
+
.dropzone .dz-preview .dz-success-mark,
|
284
|
+
.dropzone-previews .dz-preview .dz-success-mark {
|
287
285
|
background-position: -268px -163px;
|
288
286
|
}
|
289
|
-
.dropzone .preview .progress .upload,
|
290
|
-
.dropzone-previews .preview .progress .upload {
|
287
|
+
.dropzone .dz-preview .dz-progress .dz-upload,
|
288
|
+
.dropzone-previews .dz-preview .dz-progress .dz-upload {
|
291
289
|
-webkit-animation: loading 0.4s linear infinite;
|
292
290
|
-moz-animation: loading 0.4s linear infinite;
|
293
291
|
-o-animation: loading 0.4s linear infinite;
|
@@ -310,16 +308,16 @@
|
|
310
308
|
background-position: 0px -400px;
|
311
309
|
}
|
312
310
|
@media all and (-webkit-min-device-pixel-ratio: 1.5) {
|
313
|
-
.dropzone .preview .progress .upload,
|
314
|
-
.dropzone-previews .preview .progress .upload {
|
311
|
+
.dropzone .dz-preview .dz-progress .dz-upload,
|
312
|
+
.dropzone-previews .dz-preview .dz-progress .dz-upload {
|
315
313
|
background-image: image-path("dropzone/spritemap@2x.png");
|
316
314
|
-webkit-background-size: 428px 406px;
|
317
315
|
-moz-background-size: 428px 406px;
|
318
316
|
background-size: 428px 406px;
|
319
317
|
}
|
320
318
|
}
|
321
|
-
.dropzone .preview.success .progress,
|
322
|
-
.dropzone-previews .preview.success .progress {
|
319
|
+
.dropzone .dz-preview.dz-success .dz-progress,
|
320
|
+
.dropzone-previews .dz-preview.dz-success .dz-progress {
|
323
321
|
display: block;
|
324
322
|
opacity: 0;
|
325
323
|
filter: alpha(opacity=0);
|
@@ -330,8 +328,8 @@
|
|
330
328
|
-ms-transition: opacity 0.4s ease-in-out;
|
331
329
|
transition: opacity 0.4s ease-in-out;
|
332
330
|
}
|
333
|
-
.dropzone .preview .error-message,
|
334
|
-
.dropzone-previews .preview .error-message {
|
331
|
+
.dropzone .dz-preview .dz-error-message,
|
332
|
+
.dropzone-previews .dz-preview .dz-error-message {
|
335
333
|
display: block;
|
336
334
|
opacity: 0;
|
337
335
|
filter: alpha(opacity=0);
|
@@ -342,8 +340,8 @@
|
|
342
340
|
-ms-transition: opacity 0.3s ease-in-out;
|
343
341
|
transition: opacity 0.3s ease-in-out;
|
344
342
|
}
|
345
|
-
.dropzone .preview:hover.error .error-message,
|
346
|
-
.dropzone-previews .preview:hover.error .error-message {
|
343
|
+
.dropzone .dz-preview:hover.dz-error .dz-error-message,
|
344
|
+
.dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
|
347
345
|
opacity: 1;
|
348
346
|
-ms-filter: none;
|
349
347
|
filter: none;
|
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
|
+
version: 0.3.0
|
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-05-
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|