dropzonejs-rails 0.4.14 → 0.4.16
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/Rakefile +7 -1
- data/lib/dropzonejs-rails/version.rb +2 -2
- data/vendor/assets/javascripts/dropzone.js +106 -202
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 598a4d24ba4cc4ef0a8d066d4f035e7c17212097
|
4
|
+
data.tar.gz: c1ffdf5390d2e5040c2d191123afc254fc8a526e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11aae9624ec13f89b7bb706eaaed146dc10d5ba1ca55a0c87c6a92f13f2165bc95cb0e06455793683816e8b53d9aab0946cb8ebaef103e98ad57a978c210774f
|
7
|
+
data.tar.gz: c37bbcab5ed362b4268acbee6d4f8d61713ede53d1d7ab88b56111cc23e49cd148a9860e7dd71d7428c3a2c857aa8fb85ad8a33f5bee66cc83f50c2d0efe731b
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -44,10 +44,16 @@ task :check do
|
|
44
44
|
|
45
45
|
puts "A new version of dropzone (v#{latest_version}) has been found, and the source files have been accordingly updated.\nYou may now run: `rake get` to get it."
|
46
46
|
else
|
47
|
-
|
47
|
+
raise "The bundled version of dropzone (v#{DropzonejsRails::DROPZONE_VERSION}) already is the latest one."
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
desc 'Bump the dropzone js version to the latest, commit changes and perform a release'
|
52
|
+
task bump: [:check, :get] do
|
53
|
+
%x{ git add -A . && git commit -m 'rake bump: Version bump' }
|
54
|
+
Rake::Task['release'].invoke
|
55
|
+
end
|
56
|
+
|
51
57
|
def download_dropzone_file(source_file, target_file)
|
52
58
|
source = "https://raw.github.com/enyo/dropzone/v#{DropzonejsRails::DROPZONE_VERSION}/downloads/#{source_file}"
|
53
59
|
target = DropzonejsRails::Engine.root.join(target_file)
|
@@ -1,40 +1,22 @@
|
|
1
|
+
|
1
2
|
;(function(){
|
2
3
|
|
3
4
|
/**
|
4
|
-
* Require the
|
5
|
+
* Require the module at `name`.
|
5
6
|
*
|
6
|
-
* @param {String}
|
7
|
+
* @param {String} name
|
7
8
|
* @return {Object} exports
|
8
9
|
* @api public
|
9
10
|
*/
|
10
11
|
|
11
|
-
function require(
|
12
|
-
var
|
13
|
-
|
14
|
-
// lookup failed
|
15
|
-
if (null == resolved) {
|
16
|
-
orig = orig || path;
|
17
|
-
parent = parent || 'root';
|
18
|
-
var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
|
19
|
-
err.path = orig;
|
20
|
-
err.parent = parent;
|
21
|
-
err.require = true;
|
22
|
-
throw err;
|
23
|
-
}
|
12
|
+
function require(name) {
|
13
|
+
var module = require.modules[name];
|
14
|
+
if (!module) throw new Error('failed to require "' + name + '"');
|
24
15
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
// registered function
|
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;
|
16
|
+
if (!('exports' in module) && typeof module.definition === 'function') {
|
17
|
+
module.client = module.component = true;
|
18
|
+
module.definition.call(this, module.exports = {}, module);
|
19
|
+
delete module.definition;
|
38
20
|
}
|
39
21
|
|
40
22
|
return module.exports;
|
@@ -47,160 +29,33 @@ function require(path, parent, orig) {
|
|
47
29
|
require.modules = {};
|
48
30
|
|
49
31
|
/**
|
50
|
-
*
|
51
|
-
*/
|
52
|
-
|
53
|
-
require.aliases = {};
|
54
|
-
|
55
|
-
/**
|
56
|
-
* Resolve `path`.
|
57
|
-
*
|
58
|
-
* Lookup:
|
59
|
-
*
|
60
|
-
* - PATH/index.js
|
61
|
-
* - PATH.js
|
62
|
-
* - PATH
|
32
|
+
* Register module at `name` with callback `definition`.
|
63
33
|
*
|
64
|
-
* @param {String}
|
65
|
-
* @return {String} path or null
|
66
|
-
* @api private
|
67
|
-
*/
|
68
|
-
|
69
|
-
require.resolve = function(path) {
|
70
|
-
if (path.charAt(0) === '/') path = path.slice(1);
|
71
|
-
|
72
|
-
var paths = [
|
73
|
-
path,
|
74
|
-
path + '.js',
|
75
|
-
path + '.json',
|
76
|
-
path + '/index.js',
|
77
|
-
path + '/index.json'
|
78
|
-
];
|
79
|
-
|
80
|
-
for (var i = 0; i < paths.length; i++) {
|
81
|
-
var path = paths[i];
|
82
|
-
if (require.modules.hasOwnProperty(path)) return path;
|
83
|
-
if (require.aliases.hasOwnProperty(path)) return require.aliases[path];
|
84
|
-
}
|
85
|
-
};
|
86
|
-
|
87
|
-
/**
|
88
|
-
* Normalize `path` relative to the current path.
|
89
|
-
*
|
90
|
-
* @param {String} curr
|
91
|
-
* @param {String} path
|
92
|
-
* @return {String}
|
93
|
-
* @api private
|
94
|
-
*/
|
95
|
-
|
96
|
-
require.normalize = function(curr, path) {
|
97
|
-
var segs = [];
|
98
|
-
|
99
|
-
if ('.' != path.charAt(0)) return path;
|
100
|
-
|
101
|
-
curr = curr.split('/');
|
102
|
-
path = path.split('/');
|
103
|
-
|
104
|
-
for (var i = 0; i < path.length; ++i) {
|
105
|
-
if ('..' == path[i]) {
|
106
|
-
curr.pop();
|
107
|
-
} else if ('.' != path[i] && '' != path[i]) {
|
108
|
-
segs.push(path[i]);
|
109
|
-
}
|
110
|
-
}
|
111
|
-
|
112
|
-
return curr.concat(segs).join('/');
|
113
|
-
};
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Register module at `path` with callback `definition`.
|
117
|
-
*
|
118
|
-
* @param {String} path
|
34
|
+
* @param {String} name
|
119
35
|
* @param {Function} definition
|
120
36
|
* @api private
|
121
37
|
*/
|
122
38
|
|
123
|
-
require.register = function(
|
124
|
-
require.modules[
|
125
|
-
|
126
|
-
|
127
|
-
/**
|
128
|
-
* Alias a module definition.
|
129
|
-
*
|
130
|
-
* @param {String} from
|
131
|
-
* @param {String} to
|
132
|
-
* @api private
|
133
|
-
*/
|
134
|
-
|
135
|
-
require.alias = function(from, to) {
|
136
|
-
if (!require.modules.hasOwnProperty(from)) {
|
137
|
-
throw new Error('Failed to alias "' + from + '", it does not exist');
|
138
|
-
}
|
139
|
-
require.aliases[to] = from;
|
39
|
+
require.register = function (name, definition) {
|
40
|
+
require.modules[name] = {
|
41
|
+
definition: definition
|
42
|
+
};
|
140
43
|
};
|
141
44
|
|
142
45
|
/**
|
143
|
-
*
|
46
|
+
* Define a module's exports immediately with `exports`.
|
144
47
|
*
|
145
|
-
* @param {String}
|
146
|
-
* @
|
48
|
+
* @param {String} name
|
49
|
+
* @param {Generic} exports
|
147
50
|
* @api private
|
148
51
|
*/
|
149
52
|
|
150
|
-
require.
|
151
|
-
|
152
|
-
|
153
|
-
/**
|
154
|
-
* lastIndexOf helper.
|
155
|
-
*/
|
156
|
-
|
157
|
-
function lastIndexOf(arr, obj) {
|
158
|
-
var i = arr.length;
|
159
|
-
while (i--) {
|
160
|
-
if (arr[i] === obj) return i;
|
161
|
-
}
|
162
|
-
return -1;
|
163
|
-
}
|
164
|
-
|
165
|
-
/**
|
166
|
-
* The relative require() itself.
|
167
|
-
*/
|
168
|
-
|
169
|
-
function localRequire(path) {
|
170
|
-
var resolved = localRequire.resolve(path);
|
171
|
-
return require(resolved, parent, path);
|
172
|
-
}
|
173
|
-
|
174
|
-
/**
|
175
|
-
* Resolve relative to the parent.
|
176
|
-
*/
|
177
|
-
|
178
|
-
localRequire.resolve = function(path) {
|
179
|
-
var c = path.charAt(0);
|
180
|
-
if ('/' == c) return path.slice(1);
|
181
|
-
if ('.' == c) return require.normalize(p, path);
|
182
|
-
|
183
|
-
// resolve deps by returning
|
184
|
-
// the dep in the nearest "deps"
|
185
|
-
// directory
|
186
|
-
var segs = parent.split('/');
|
187
|
-
var i = lastIndexOf(segs, 'deps') + 1;
|
188
|
-
if (!i) i = 0;
|
189
|
-
path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
|
190
|
-
return path;
|
53
|
+
require.define = function (name, exports) {
|
54
|
+
require.modules[name] = {
|
55
|
+
exports: exports
|
191
56
|
};
|
192
|
-
|
193
|
-
/**
|
194
|
-
* Check if module is defined at `path`.
|
195
|
-
*/
|
196
|
-
|
197
|
-
localRequire.exists = function(path) {
|
198
|
-
return require.modules.hasOwnProperty(localRequire.resolve(path));
|
199
|
-
};
|
200
|
-
|
201
|
-
return localRequire;
|
202
57
|
};
|
203
|
-
require.register("component
|
58
|
+
require.register("component~emitter@1.1.2", function (exports, module) {
|
204
59
|
|
205
60
|
/**
|
206
61
|
* Expose `Emitter`.
|
@@ -242,7 +97,8 @@ function mixin(obj) {
|
|
242
97
|
* @api public
|
243
98
|
*/
|
244
99
|
|
245
|
-
Emitter.prototype.on =
|
100
|
+
Emitter.prototype.on =
|
101
|
+
Emitter.prototype.addEventListener = function(event, fn){
|
246
102
|
this._callbacks = this._callbacks || {};
|
247
103
|
(this._callbacks[event] = this._callbacks[event] || [])
|
248
104
|
.push(fn);
|
@@ -268,7 +124,7 @@ Emitter.prototype.once = function(event, fn){
|
|
268
124
|
fn.apply(this, arguments);
|
269
125
|
}
|
270
126
|
|
271
|
-
fn
|
127
|
+
on.fn = fn;
|
272
128
|
this.on(event, on);
|
273
129
|
return this;
|
274
130
|
};
|
@@ -285,8 +141,17 @@ Emitter.prototype.once = function(event, fn){
|
|
285
141
|
|
286
142
|
Emitter.prototype.off =
|
287
143
|
Emitter.prototype.removeListener =
|
288
|
-
Emitter.prototype.removeAllListeners =
|
144
|
+
Emitter.prototype.removeAllListeners =
|
145
|
+
Emitter.prototype.removeEventListener = function(event, fn){
|
289
146
|
this._callbacks = this._callbacks || {};
|
147
|
+
|
148
|
+
// all
|
149
|
+
if (0 == arguments.length) {
|
150
|
+
this._callbacks = {};
|
151
|
+
return this;
|
152
|
+
}
|
153
|
+
|
154
|
+
// specific event
|
290
155
|
var callbacks = this._callbacks[event];
|
291
156
|
if (!callbacks) return this;
|
292
157
|
|
@@ -297,8 +162,14 @@ Emitter.prototype.removeAllListeners = function(event, fn){
|
|
297
162
|
}
|
298
163
|
|
299
164
|
// remove specific handler
|
300
|
-
var
|
301
|
-
|
165
|
+
var cb;
|
166
|
+
for (var i = 0; i < callbacks.length; i++) {
|
167
|
+
cb = callbacks[i];
|
168
|
+
if (cb === fn || cb.fn === fn) {
|
169
|
+
callbacks.splice(i, 1);
|
170
|
+
break;
|
171
|
+
}
|
172
|
+
}
|
302
173
|
return this;
|
303
174
|
};
|
304
175
|
|
@@ -351,16 +222,18 @@ Emitter.prototype.hasListeners = function(event){
|
|
351
222
|
};
|
352
223
|
|
353
224
|
});
|
354
|
-
|
225
|
+
|
226
|
+
require.register("dropzone", function (exports, module) {
|
355
227
|
|
356
228
|
|
357
229
|
/**
|
358
230
|
* Exposing dropzone
|
359
231
|
*/
|
360
|
-
module.exports = require("
|
232
|
+
module.exports = require("dropzone/lib/dropzone.js");
|
361
233
|
|
362
234
|
});
|
363
|
-
|
235
|
+
|
236
|
+
require.register("dropzone/lib/dropzone.js", function (exports, module) {
|
364
237
|
/*
|
365
238
|
#
|
366
239
|
# More info at [www.dropzonejs.com](http://www.dropzonejs.com)
|
@@ -394,7 +267,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
394
267
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
395
268
|
__slice = [].slice;
|
396
269
|
|
397
|
-
Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("emitter");
|
270
|
+
Em = typeof Emitter !== "undefined" && Emitter !== null ? Emitter : require("component~emitter@1.1.2");
|
398
271
|
|
399
272
|
noop = function() {};
|
400
273
|
|
@@ -433,6 +306,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
433
306
|
acceptedFiles: null,
|
434
307
|
acceptedMimeTypes: null,
|
435
308
|
autoProcessQueue: true,
|
309
|
+
autoQueue: true,
|
436
310
|
addRemoveLinks: false,
|
437
311
|
previewsContainer: null,
|
438
312
|
dictDefaultMessage: "Drop files here to upload",
|
@@ -484,8 +358,20 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
484
358
|
srcHeight: file.height
|
485
359
|
};
|
486
360
|
srcRatio = file.width / file.height;
|
487
|
-
|
488
|
-
|
361
|
+
info.optWidth = this.options.thumbnailWidth;
|
362
|
+
info.optHeight = this.options.thumbnailHeight;
|
363
|
+
if (!((info.optWidth != null) && (info.optHeigh != null))) {
|
364
|
+
if ((info.optWidth == null) && (info.optHeight == null)) {
|
365
|
+
info.optWidth = info.srcWidth;
|
366
|
+
info.optHeight = info.srcHeight;
|
367
|
+
} else if (info.optWidth == null) {
|
368
|
+
info.optWidth = srcRatio * info.optHeight;
|
369
|
+
} else if (info.optHeight == null) {
|
370
|
+
info.optHeight = (1 / srcRatio) * info.optWidth;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
trgRatio = info.optWidth / info.optHeight;
|
374
|
+
if (file.height < info.optHeight || file.width < info.optWidth) {
|
489
375
|
info.trgHeight = info.srcHeight;
|
490
376
|
info.trgWidth = info.srcWidth;
|
491
377
|
} else {
|
@@ -747,26 +633,34 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
747
633
|
return _results;
|
748
634
|
};
|
749
635
|
|
750
|
-
Dropzone.prototype.
|
636
|
+
Dropzone.prototype.getFilesWithStatus = function(status) {
|
751
637
|
var file, _i, _len, _ref, _results;
|
752
638
|
_ref = this.files;
|
753
639
|
_results = [];
|
754
640
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
755
641
|
file = _ref[_i];
|
756
|
-
if (file.status ===
|
642
|
+
if (file.status === status) {
|
757
643
|
_results.push(file);
|
758
644
|
}
|
759
645
|
}
|
760
646
|
return _results;
|
761
647
|
};
|
762
648
|
|
649
|
+
Dropzone.prototype.getQueuedFiles = function() {
|
650
|
+
return this.getFilesWithStatus(Dropzone.QUEUED);
|
651
|
+
};
|
652
|
+
|
763
653
|
Dropzone.prototype.getUploadingFiles = function() {
|
654
|
+
return this.getFilesWithStatus(Dropzone.UPLOADING);
|
655
|
+
};
|
656
|
+
|
657
|
+
Dropzone.prototype.getActiveFiles = function() {
|
764
658
|
var file, _i, _len, _ref, _results;
|
765
659
|
_ref = this.files;
|
766
660
|
_results = [];
|
767
661
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
768
662
|
file = _ref[_i];
|
769
|
-
if (file.status === Dropzone.UPLOADING) {
|
663
|
+
if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {
|
770
664
|
_results.push(file);
|
771
665
|
}
|
772
666
|
}
|
@@ -792,6 +686,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
792
686
|
if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
|
793
687
|
_this.hiddenFileInput.setAttribute("multiple", "multiple");
|
794
688
|
}
|
689
|
+
_this.hiddenFileInput.className = "dz-hidden-input";
|
795
690
|
if (_this.options.acceptedFiles != null) {
|
796
691
|
_this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
|
797
692
|
}
|
@@ -908,12 +803,12 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
908
803
|
};
|
909
804
|
|
910
805
|
Dropzone.prototype.updateTotalUploadProgress = function() {
|
911
|
-
var
|
806
|
+
var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;
|
912
807
|
totalBytesSent = 0;
|
913
808
|
totalBytes = 0;
|
914
|
-
|
915
|
-
if (
|
916
|
-
_ref = this.
|
809
|
+
activeFiles = this.getActiveFiles();
|
810
|
+
if (activeFiles.length) {
|
811
|
+
_ref = this.getActiveFiles();
|
917
812
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
918
813
|
file = _ref[_i];
|
919
814
|
totalBytesSent += file.upload.bytesSent;
|
@@ -926,6 +821,14 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
926
821
|
return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
|
927
822
|
};
|
928
823
|
|
824
|
+
Dropzone.prototype._getParamName = function(n) {
|
825
|
+
if (typeof this.options.paramName === "function") {
|
826
|
+
return this.options.paramName(n);
|
827
|
+
} else {
|
828
|
+
return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");
|
829
|
+
}
|
830
|
+
};
|
831
|
+
|
929
832
|
Dropzone.prototype.getFallbackForm = function() {
|
930
833
|
var existingFallback, fields, fieldsString, form;
|
931
834
|
if (existingFallback = this.getExistingFallback()) {
|
@@ -935,7 +838,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
935
838
|
if (this.options.dictFallbackText) {
|
936
839
|
fieldsString += "<p>" + this.options.dictFallbackText + "</p>";
|
937
840
|
}
|
938
|
-
fieldsString += "<input type=\"file\" name=\"" + this.
|
841
|
+
fieldsString += "<input type=\"file\" name=\"" + (this._getParamName(0)) + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><input type=\"submit\" value=\"Upload!\"></div>";
|
939
842
|
fields = Dropzone.createElement(fieldsString);
|
940
843
|
if (this.element.tagName !== "FORM") {
|
941
844
|
form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>");
|
@@ -1181,7 +1084,10 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1181
1084
|
file.accepted = false;
|
1182
1085
|
_this._errorProcessing([file], error);
|
1183
1086
|
} else {
|
1184
|
-
|
1087
|
+
file.accepted = true;
|
1088
|
+
if (_this.options.autoQueue) {
|
1089
|
+
_this.enqueueFile(file);
|
1090
|
+
}
|
1185
1091
|
}
|
1186
1092
|
return _this._updateMaxFilesReachedClass();
|
1187
1093
|
});
|
@@ -1198,8 +1104,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1198
1104
|
|
1199
1105
|
Dropzone.prototype.enqueueFile = function(file) {
|
1200
1106
|
var _this = this;
|
1201
|
-
file.accepted
|
1202
|
-
if (file.status === Dropzone.ADDED) {
|
1107
|
+
if (file.status === Dropzone.ADDED && file.accepted === true) {
|
1203
1108
|
file.status = Dropzone.QUEUED;
|
1204
1109
|
if (this.options.autoProcessQueue) {
|
1205
1110
|
return setTimeout((function() {
|
@@ -1276,10 +1181,10 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1276
1181
|
file.height = img.height;
|
1277
1182
|
resizeInfo = _this.options.resize.call(_this, file);
|
1278
1183
|
if (resizeInfo.trgWidth == null) {
|
1279
|
-
resizeInfo.trgWidth =
|
1184
|
+
resizeInfo.trgWidth = resizeInfo.optWidth;
|
1280
1185
|
}
|
1281
1186
|
if (resizeInfo.trgHeight == null) {
|
1282
|
-
resizeInfo.trgHeight =
|
1187
|
+
resizeInfo.trgHeight = resizeInfo.optHeight;
|
1283
1188
|
}
|
1284
1189
|
canvas = document.createElement("canvas");
|
1285
1190
|
ctx = canvas.getContext("2d");
|
@@ -1389,7 +1294,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1389
1294
|
};
|
1390
1295
|
|
1391
1296
|
Dropzone.prototype.uploadFiles = function(files) {
|
1392
|
-
var file, formData, handleError, headerName, headerValue, headers, input, inputName, inputType, key, option, progressObj, response, updateProgress, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3,
|
1297
|
+
var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, option, progressObj, response, updateProgress, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5,
|
1393
1298
|
_this = this;
|
1394
1299
|
xhr = new XMLHttpRequest();
|
1395
1300
|
for (_i = 0, _len = files.length; _i < _len; _i++) {
|
@@ -1520,9 +1425,8 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1520
1425
|
}
|
1521
1426
|
}
|
1522
1427
|
}
|
1523
|
-
for (_m = 0,
|
1524
|
-
|
1525
|
-
formData.append("" + this.options.paramName + (this.options.uploadMultiple ? "[]" : ""), file, file.name);
|
1428
|
+
for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {
|
1429
|
+
formData.append(this._getParamName(i), files[i], files[i].name);
|
1526
1430
|
}
|
1527
1431
|
return xhr.send(formData);
|
1528
1432
|
};
|
@@ -1565,7 +1469,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1565
1469
|
|
1566
1470
|
})(Em);
|
1567
1471
|
|
1568
|
-
Dropzone.version = "3.
|
1472
|
+
Dropzone.version = "3.9.0";
|
1569
1473
|
|
1570
1474
|
Dropzone.options = {};
|
1571
1475
|
|
@@ -1663,7 +1567,7 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1663
1567
|
|
1664
1568
|
camelize = function(str) {
|
1665
1569
|
return str.replace(/[\-_](\w)/g, function(match) {
|
1666
|
-
return match
|
1570
|
+
return match.charAt(1).toUpperCase();
|
1667
1571
|
});
|
1668
1572
|
};
|
1669
1573
|
|
@@ -1908,12 +1812,12 @@ require.register("dropzone/lib/dropzone.js", function(exports, require, module){
|
|
1908
1812
|
}).call(this);
|
1909
1813
|
|
1910
1814
|
});
|
1911
|
-
|
1912
|
-
require.alias("component-emitter/index.js", "emitter/index.js");
|
1815
|
+
|
1913
1816
|
if (typeof exports == "object") {
|
1914
1817
|
module.exports = require("dropzone");
|
1915
1818
|
} else if (typeof define == "function" && define.amd) {
|
1916
|
-
define(function(){ return require("dropzone"); });
|
1819
|
+
define([], function(){ return require("dropzone"); });
|
1917
1820
|
} else {
|
1918
1821
|
this["Dropzone"] = require("dropzone");
|
1919
|
-
}
|
1822
|
+
}
|
1823
|
+
})()
|
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.16
|
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: 2014-
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|