6 |
office |
1 |
// Uses AMD or browser globals to create a jQuery plugin. |
|
|
2 |
(function (factory) { |
|
|
3 |
if (typeof define === 'function' && define.amd) { |
|
|
4 |
// AMD. Register as an anonymous module. |
|
|
5 |
define(['jquery'], factory); |
|
|
6 |
} else { |
|
|
7 |
// Browser globals |
|
|
8 |
factory(jQuery); |
|
|
9 |
} |
|
|
10 |
} (function (jQuery) { |
|
|
11 |
var module = { exports: { } }; // Fake component |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
/* |
|
|
15 |
* |
|
|
16 |
* More info at [www.dropzonejs.com](http://www.dropzonejs.com) |
|
|
17 |
* |
|
|
18 |
* Copyright (c) 2012, Matias Meno |
|
|
19 |
* |
|
|
20 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
|
|
21 |
* of this software and associated documentation files (the "Software"), to deal |
|
|
22 |
* in the Software without restriction, including without limitation the rights |
|
|
23 |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
|
24 |
* copies of the Software, and to permit persons to whom the Software is |
|
|
25 |
* furnished to do so, subject to the following conditions: |
|
|
26 |
* |
|
|
27 |
* The above copyright notice and this permission notice shall be included in |
|
|
28 |
* all copies or substantial portions of the Software. |
|
|
29 |
* |
|
|
30 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
|
31 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
|
32 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
|
33 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
|
34 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
|
35 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
|
36 |
* THE SOFTWARE. |
|
|
37 |
* |
|
|
38 |
*/ |
|
|
39 |
|
|
|
40 |
(function() { |
|
|
41 |
var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, |
|
|
42 |
__slice = [].slice, |
|
|
43 |
__hasProp = {}.hasOwnProperty, |
|
|
44 |
__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; }; |
|
|
45 |
|
|
|
46 |
noop = function() {}; |
|
|
47 |
|
|
|
48 |
Emitter = (function() { |
|
|
49 |
function Emitter() {} |
|
|
50 |
|
|
|
51 |
Emitter.prototype.addEventListener = Emitter.prototype.on; |
|
|
52 |
|
|
|
53 |
Emitter.prototype.on = function(event, fn) { |
|
|
54 |
this._callbacks = this._callbacks || {}; |
|
|
55 |
if (!this._callbacks[event]) { |
|
|
56 |
this._callbacks[event] = []; |
|
|
57 |
} |
|
|
58 |
this._callbacks[event].push(fn); |
|
|
59 |
return this; |
|
|
60 |
}; |
|
|
61 |
|
|
|
62 |
Emitter.prototype.emit = function() { |
|
|
63 |
var args, callback, callbacks, event, _i, _len; |
|
|
64 |
event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; |
|
|
65 |
this._callbacks = this._callbacks || {}; |
|
|
66 |
callbacks = this._callbacks[event]; |
|
|
67 |
if (callbacks) { |
|
|
68 |
for (_i = 0, _len = callbacks.length; _i < _len; _i++) { |
|
|
69 |
callback = callbacks[_i]; |
|
|
70 |
callback.apply(this, args); |
|
|
71 |
} |
|
|
72 |
} |
|
|
73 |
return this; |
|
|
74 |
}; |
|
|
75 |
|
|
|
76 |
Emitter.prototype.removeListener = Emitter.prototype.off; |
|
|
77 |
|
|
|
78 |
Emitter.prototype.removeAllListeners = Emitter.prototype.off; |
|
|
79 |
|
|
|
80 |
Emitter.prototype.removeEventListener = Emitter.prototype.off; |
|
|
81 |
|
|
|
82 |
Emitter.prototype.off = function(event, fn) { |
|
|
83 |
var callback, callbacks, i, _i, _len; |
|
|
84 |
if (!this._callbacks || arguments.length === 0) { |
|
|
85 |
this._callbacks = {}; |
|
|
86 |
return this; |
|
|
87 |
} |
|
|
88 |
callbacks = this._callbacks[event]; |
|
|
89 |
if (!callbacks) { |
|
|
90 |
return this; |
|
|
91 |
} |
|
|
92 |
if (arguments.length === 1) { |
|
|
93 |
delete this._callbacks[event]; |
|
|
94 |
return this; |
|
|
95 |
} |
|
|
96 |
for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { |
|
|
97 |
callback = callbacks[i]; |
|
|
98 |
if (callback === fn) { |
|
|
99 |
callbacks.splice(i, 1); |
|
|
100 |
break; |
|
|
101 |
} |
|
|
102 |
} |
|
|
103 |
return this; |
|
|
104 |
}; |
|
|
105 |
|
|
|
106 |
return Emitter; |
|
|
107 |
|
|
|
108 |
})(); |
|
|
109 |
|
|
|
110 |
Dropzone = (function(_super) { |
|
|
111 |
var extend, resolveOption; |
|
|
112 |
|
|
|
113 |
__extends(Dropzone, _super); |
|
|
114 |
|
|
|
115 |
Dropzone.prototype.Emitter = Emitter; |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
/* |
|
|
119 |
This is a list of all available events you can register on a dropzone object. |
|
|
120 |
|
|
|
121 |
You can register an event handler like this: |
|
|
122 |
|
|
|
123 |
dropzone.on("dragEnter", function() { }); |
|
|
124 |
*/ |
|
|
125 |
|
|
|
126 |
Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; |
|
|
127 |
|
|
|
128 |
Dropzone.prototype.defaultOptions = { |
|
|
129 |
url: null, |
|
|
130 |
method: "post", |
|
|
131 |
withCredentials: false, |
|
|
132 |
parallelUploads: 2, |
|
|
133 |
uploadMultiple: false, |
|
|
134 |
maxFilesize: 256, |
|
|
135 |
paramName: "file", |
|
|
136 |
createImageThumbnails: true, |
|
|
137 |
maxThumbnailFilesize: 10, |
|
|
138 |
thumbnailWidth: 120, |
|
|
139 |
thumbnailHeight: 120, |
|
|
140 |
filesizeBase: 1000, |
|
|
141 |
maxFiles: null, |
|
|
142 |
params: {}, |
|
|
143 |
clickable: true, |
|
|
144 |
ignoreHiddenFiles: true, |
|
|
145 |
acceptedFiles: null, |
|
|
146 |
acceptedMimeTypes: null, |
|
|
147 |
autoProcessQueue: true, |
|
|
148 |
autoQueue: true, |
|
|
149 |
addRemoveLinks: false, |
|
|
150 |
previewsContainer: null, |
|
|
151 |
hiddenInputContainer: "body", |
|
|
152 |
capture: null, |
|
|
153 |
renameFilename: null, |
|
|
154 |
dictDefaultMessage: "Drop files here to upload", |
|
|
155 |
dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", |
|
|
156 |
dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", |
|
|
157 |
dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", |
|
|
158 |
dictInvalidFileType: "You can't upload files of this type.", |
|
|
159 |
dictResponseError: "Server responded with {{statusCode}} code.", |
|
|
160 |
dictCancelUpload: "Cancel upload", |
|
|
161 |
dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", |
|
|
162 |
dictRemoveFile: "Remove file", |
|
|
163 |
dictRemoveFileConfirmation: null, |
|
|
164 |
dictMaxFilesExceeded: "You can not upload any more files.", |
|
|
165 |
accept: function(file, done) { |
|
|
166 |
return done(); |
|
|
167 |
}, |
|
|
168 |
init: function() { |
|
|
169 |
return noop; |
|
|
170 |
}, |
|
|
171 |
forceFallback: false, |
|
|
172 |
fallback: function() { |
|
|
173 |
var child, messageElement, span, _i, _len, _ref; |
|
|
174 |
this.element.className = "" + this.element.className + " dz-browser-not-supported"; |
|
|
175 |
_ref = this.element.getElementsByTagName("div"); |
|
|
176 |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { |
|
|
177 |
child = _ref[_i]; |
|
|
178 |
if (/(^| )dz-message($| )/.test(child.className)) { |
|
|
179 |
messageElement = child; |
|
|
180 |
child.className = "dz-message"; |
|
|
181 |
continue; |
|
|
182 |
} |
|
|
183 |
} |
|
|
184 |
if (!messageElement) { |
|
|
185 |
messageElement = Dropzone.createElement("<div class=\"dz-message\"><span></span></div>"); |
|
|
186 |
this.element.appendChild(messageElement); |
|
|
187 |
} |
|
|
188 |
span = messageElement.getElementsByTagName("span")[0]; |
|
|
189 |
if (span) { |
|
|
190 |
if (span.textContent != null) { |
|
|
191 |
span.textContent = this.options.dictFallbackMessage; |
|
|
192 |
} else if (span.innerText != null) { |
|
|
193 |
span.innerText = this.options.dictFallbackMessage; |
|
|
194 |
} |
|
|
195 |
} |
|
|
196 |
return this.element.appendChild(this.getFallbackForm()); |
|
|
197 |
}, |
|
|
198 |
resize: function(file) { |
|
|
199 |
var info, srcRatio, trgRatio; |
|
|
200 |
info = { |
|
|
201 |
srcX: 0, |
|
|
202 |
srcY: 0, |
|
|
203 |
srcWidth: file.width, |
|
|
204 |
srcHeight: file.height |
|
|
205 |
}; |
|
|
206 |
srcRatio = file.width / file.height; |
|
|
207 |
info.optWidth = this.options.thumbnailWidth; |
|
|
208 |
info.optHeight = this.options.thumbnailHeight; |
|
|
209 |
if ((info.optWidth == null) && (info.optHeight == null)) { |
|
|
210 |
info.optWidth = info.srcWidth; |
|
|
211 |
info.optHeight = info.srcHeight; |
|
|
212 |
} else if (info.optWidth == null) { |
|
|
213 |
info.optWidth = srcRatio * info.optHeight; |
|
|
214 |
} else if (info.optHeight == null) { |
|
|
215 |
info.optHeight = (1 / srcRatio) * info.optWidth; |
|
|
216 |
} |
|
|
217 |
trgRatio = info.optWidth / info.optHeight; |
|
|
218 |
if (file.height < info.optHeight || file.width < info.optWidth) {>> |
|
|
219 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.trgHeight = info.srcHeight;>> |
|
|
220 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.trgWidth = info.srcWidth;>> |
|
|
221 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
222 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (srcRatio > trgRatio) {>> |
|
|
223 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcHeight = file.height;>> |
|
|
224 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcWidth = info.srcHeight * trgRatio;>> |
|
|
225 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
226 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcWidth = file.width;>> |
|
|
227 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcHeight = info.srcWidth / trgRatio;>> |
|
|
228 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
229 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
230 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcX = (file.width - info.srcWidth) / 2;>> |
|
|
231 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { info.srcY = (file.height - info.srcHeight) / 2;>> |
|
|
232 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return info;>> |
|
|
233 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
234 |
|
|
|
235 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { /*>> |
|
|
236 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Those functions register themselves to the events on init and handle all>> |
|
|
237 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { the user interface specific stuff. Overwriting them won't break the upload>> |
|
|
238 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { but can break the way it's displayed.>> |
|
|
239 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { You can overwrite them if you don't like the default behavior. If you just>> |
|
|
240 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { want to add an additional event handler, register it on the dropzone object>> |
|
|
241 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { and don't overwrite those options.>> |
|
|
242 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { */>> |
|
|
243 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { drop: function(e) {>> |
|
|
244 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");>> |
|
|
245 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
246 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragstart: noop,>> |
|
|
247 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragend: function(e) {>> |
|
|
248 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");>> |
|
|
249 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
250 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragenter: function(e) {>> |
|
|
251 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.add("dz-drag-hover");>> |
|
|
252 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
253 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragover: function(e) {>> |
|
|
254 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.add("dz-drag-hover");>> |
|
|
255 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
256 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dragleave: function(e) {>> |
|
|
257 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-drag-hover");>> |
|
|
258 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
259 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { paste: noop,>> |
|
|
260 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { reset: function() {>> |
|
|
261 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-started");>> |
|
|
262 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
263 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { addedfile: function(file) {>> |
|
|
264 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;>> |
|
|
265 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element === this.previewsContainer) {>> |
|
|
266 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.classList.add("dz-started");>> |
|
|
267 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
268 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.previewsContainer) {>> |
|
|
269 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());>> |
|
|
270 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewTemplate = file.previewElement;>> |
|
|
271 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer.appendChild(file.previewElement);>> |
|
|
272 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-name]");>> |
|
|
273 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
274 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];>> |
|
|
275 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node.textContent = this._renameFilename(file.name);>> |
|
|
276 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
277 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = file.previewElement.querySelectorAll("[data-dz-size]");>> |
|
|
278 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {>> |
|
|
279 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref1[_j];>> |
|
|
280 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node.innerHTML = this.filesize(file.size);>> |
|
|
281 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
282 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.addRemoveLinks) {>> |
|
|
283 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file._removeLink = Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>" + this.options.dictRemoveFile + "</a>");>> |
|
|
284 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.appendChild(file._removeLink);>> |
|
|
285 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
286 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { removeFileEvent = (function(_this) {>> |
|
|
287 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
288 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.preventDefault();>> |
|
|
289 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.stopPropagation();>> |
|
|
290 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING) {>> |
|
|
291 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {>> |
|
|
292 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);>> |
|
|
293 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { });>> |
|
|
294 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
295 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.dictRemoveFileConfirmation) {>> |
|
|
296 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {>> |
|
|
297 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);>> |
|
|
298 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { });>> |
|
|
299 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
300 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.removeFile(file);>> |
|
|
301 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
302 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
303 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
304 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this);>> |
|
|
305 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]");>> |
|
|
306 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
307 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {>> |
|
|
308 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { removeLink = _ref2[_k];>> |
|
|
309 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(removeLink.addEventListener("click", removeFileEvent));>> |
|
|
310 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
311 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
312 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
313 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
314 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { removedfile: function(file) {>> |
|
|
315 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var _ref;>> |
|
|
316 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
317 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_ref = file.previewElement) != null) {>> |
|
|
318 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref.parentNode.removeChild(file.previewElement);>> |
|
|
319 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
320 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
321 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this._updateMaxFilesReachedClass();>> |
|
|
322 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
323 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnail: function(file, dataUrl) {>> |
|
|
324 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var thumbnailElement, _i, _len, _ref;>> |
|
|
325 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
326 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.remove("dz-file-preview");>> |
|
|
327 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");>> |
|
|
328 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
329 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement = _ref[_i];>> |
|
|
330 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement.alt = file.name;>> |
|
|
331 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnailElement.src = dataUrl;>> |
|
|
332 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
333 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout(((function(_this) {>> |
|
|
334 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {>> |
|
|
335 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-image-preview");>> |
|
|
336 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
337 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this)), 1);>> |
|
|
338 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
339 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
340 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { error: function(file, message) {>> |
|
|
341 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, _i, _len, _ref, _results;>> |
|
|
342 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
343 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.add("dz-error");>> |
|
|
344 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof message !== "String" && message.error) {>> |
|
|
345 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { message = message.error;>> |
|
|
346 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
347 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");>> |
|
|
348 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
349 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
350 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];>> |
|
|
351 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.textContent = message);>> |
|
|
352 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
353 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
354 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
355 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
356 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { errormultiple: noop,>> |
|
|
357 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { processing: function(file) {>> |
|
|
358 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
359 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.previewElement.classList.add("dz-processing");>> |
|
|
360 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file._removeLink) {>> |
|
|
361 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file._removeLink.textContent = this.options.dictCancelUpload;>> |
|
|
362 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
363 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
364 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
365 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { processingmultiple: noop,>> |
|
|
366 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { uploadprogress: function(file, progress, bytesSent) {>> |
|
|
367 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var node, _i, _len, _ref, _results;>> |
|
|
368 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
369 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");>> |
|
|
370 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
371 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
372 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { node = _ref[_i];>> |
|
|
373 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (node.nodeName === 'PROGRESS') {>> |
|
|
374 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.value = progress);>> |
|
|
375 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
376 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(node.style.width = "" + progress + "%");>> |
|
|
377 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
378 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
379 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
380 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
381 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
382 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totaluploadprogress: noop,>> |
|
|
383 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { sending: noop,>> |
|
|
384 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { sendingmultiple: noop,>> |
|
|
385 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { success: function(file) {>> |
|
|
386 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
387 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-success");>> |
|
|
388 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
389 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
390 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { successmultiple: noop,>> |
|
|
391 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canceled: function(file) {>> |
|
|
392 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("error", file, "Upload canceled.");>> |
|
|
393 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
394 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canceledmultiple: noop,>> |
|
|
395 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { complete: function(file) {>> |
|
|
396 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file._removeLink) {>> |
|
|
397 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file._removeLink.textContent = this.options.dictRemoveFile;>> |
|
|
398 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
399 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.previewElement) {>> |
|
|
400 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return file.previewElement.classList.add("dz-complete");>> |
|
|
401 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
402 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { },>> |
|
|
403 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { completemultiple: noop,>> |
|
|
404 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { maxfilesexceeded: noop,>> |
|
|
405 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { maxfilesreached: noop,>> |
|
|
406 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { queuecomplete: noop,>> |
|
|
407 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { addedfiles: noop,>> |
|
|
408 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n <div class=\"dz-details\">\n <div class=\"dz-size\"><span data-dz-size></span></div>\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n <div class=\"dz-success-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Check</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </svg>\n </div>\n <div class=\"dz-error-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Error</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>">> |
|
|
409 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
410 |
|
|
|
411 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { extend = function() {>> |
|
|
412 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var key, object, objects, target, val, _i, _len;>> |
|
|
413 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];>> |
|
|
414 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = objects.length; _i < _len; _i++) {>> |
|
|
415 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { object = objects[_i];>> |
|
|
416 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (key in object) {>> |
|
|
417 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { val = object[key];>> |
|
|
418 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { target[key] = val;>> |
|
|
419 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
420 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
421 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return target;>> |
|
|
422 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
423 |
|
|
|
424 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { function Dropzone(element, options) {>> |
|
|
425 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var elementOptions, fallback, _ref;>> |
|
|
426 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element = element;>> |
|
|
427 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.version = Dropzone.version;>> |
|
|
428 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");>> |
|
|
429 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = [];>> |
|
|
430 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.listeners = [];>> |
|
|
431 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.files = [];>> |
|
|
432 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.element === "string") {>> |
|
|
433 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element = document.querySelector(this.element);>> |
|
|
434 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
435 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!(this.element && (this.element.nodeType != null))) {>> |
|
|
436 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Invalid dropzone element.");>> |
|
|
437 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
438 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.dropzone) {>> |
|
|
439 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Dropzone already attached.");>> |
|
|
440 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
441 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.instances.push(this);>> |
|
|
442 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.dropzone = this;>> |
|
|
443 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};>> |
|
|
444 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});>> |
|
|
445 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {>> |
|
|
446 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.fallback.call(this);>> |
|
|
447 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
448 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.url == null) {>> |
|
|
449 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.url = this.element.getAttribute("action");>> |
|
|
450 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
451 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!this.options.url) {>> |
|
|
452 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("No URL provided.");>> |
|
|
453 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
454 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {>> |
|
|
455 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");>> |
|
|
456 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
457 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.acceptedMimeTypes) {>> |
|
|
458 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.acceptedFiles = this.options.acceptedMimeTypes;>> |
|
|
459 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { delete this.options.acceptedMimeTypes;>> |
|
|
460 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
461 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.options.method = this.options.method.toUpperCase();>> |
|
|
462 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((fallback = this.getExistingFallback()) && fallback.parentNode) {>> |
|
|
463 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fallback.parentNode.removeChild(fallback);>> |
|
|
464 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
465 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.previewsContainer !== false) {>> |
|
|
466 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.previewsContainer) {>> |
|
|
467 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer");>> |
|
|
468 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
469 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.previewsContainer = this.element;>> |
|
|
470 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
471 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
472 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.clickable) {>> |
|
|
473 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.clickable === true) {>> |
|
|
474 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = [this.element];>> |
|
|
475 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
476 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable");>> |
|
|
477 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
478 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
479 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.init();>> |
|
|
480 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
481 |
|
|
|
482 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getAcceptedFiles = function() {>> |
|
|
483 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;>> |
|
|
484 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;>> |
|
|
485 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
486 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
487 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];>> |
|
|
488 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.accepted) {>> |
|
|
489 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);>> |
|
|
490 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
491 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
492 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
493 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
494 |
|
|
|
495 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getRejectedFiles = function() {>> |
|
|
496 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;>> |
|
|
497 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;>> |
|
|
498 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
499 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
500 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];>> |
|
|
501 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!file.accepted) {>> |
|
|
502 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);>> |
|
|
503 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
504 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
505 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
506 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
507 |
|
|
|
508 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getFilesWithStatus = function(status) {>> |
|
|
509 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;>> |
|
|
510 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;>> |
|
|
511 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
512 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
513 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];>> |
|
|
514 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === status) {>> |
|
|
515 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);>> |
|
|
516 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
517 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
518 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
519 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
520 |
|
|
|
521 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getQueuedFiles = function() {>> |
|
|
522 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.QUEUED);>> |
|
|
523 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
524 |
|
|
|
525 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getUploadingFiles = function() {>> |
|
|
526 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.UPLOADING);>> |
|
|
527 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
528 |
|
|
|
529 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getAddedFiles = function() {>> |
|
|
530 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.getFilesWithStatus(Dropzone.ADDED);>> |
|
|
531 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
532 |
|
|
|
533 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getActiveFiles = function() {>> |
|
|
534 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results;>> |
|
|
535 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files;>> |
|
|
536 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results = [];>> |
|
|
537 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
538 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];>> |
|
|
539 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {>> |
|
|
540 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(file);>> |
|
|
541 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
542 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
543 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _results;>> |
|
|
544 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
545 |
|
|
|
546 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.init = function() {>> |
|
|
547 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;>> |
|
|
548 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.tagName === "form") {>> |
|
|
549 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.setAttribute("enctype", "multipart/form-data");>> |
|
|
550 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
551 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {>> |
|
|
552 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>" + this.options.dictDefaultMessage + "</span></div>"));>> |
|
|
553 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
554 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.clickableElements.length) {>> |
|
|
555 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { setupHiddenFileInput = (function(_this) {>> |
|
|
556 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {>> |
|
|
557 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.hiddenFileInput) {>> |
|
|
558 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);>> |
|
|
559 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
560 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput = document.createElement("input");>> |
|
|
561 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("type", "file");>> |
|
|
562 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {>> |
|
|
563 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("multiple", "multiple");>> |
|
|
564 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
565 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.className = "dz-hidden-input";>> |
|
|
566 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.acceptedFiles != null) {>> |
|
|
567 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);>> |
|
|
568 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
569 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.capture != null) {>> |
|
|
570 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.setAttribute("capture", _this.options.capture);>> |
|
|
571 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
572 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.visibility = "hidden";>> |
|
|
573 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.position = "absolute";>> |
|
|
574 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.top = "0";>> |
|
|
575 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.left = "0";>> |
|
|
576 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.height = "0";>> |
|
|
577 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.style.width = "0";>> |
|
|
578 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);>> |
|
|
579 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.hiddenFileInput.addEventListener("change", function() {>> |
|
|
580 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, files, _i, _len;>> |
|
|
581 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { files = _this.hiddenFileInput.files;>> |
|
|
582 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (files.length) {>> |
|
|
583 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) {>> |
|
|
584 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = files[_i];>> |
|
|
585 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.addFile(file);>> |
|
|
586 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
587 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
588 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.emit("addedfiles", files);>> |
|
|
589 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setupHiddenFileInput();>> |
|
|
590 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { });>> |
|
|
591 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
592 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this);>> |
|
|
593 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { setupHiddenFileInput();>> |
|
|
594 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
595 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;>> |
|
|
596 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = this.events;>> |
|
|
597 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref1.length; _i < _len; _i++) {>> |
|
|
598 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { eventName = _ref1[_i];>> |
|
|
599 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on(eventName, this.options[eventName]);>> |
|
|
600 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
601 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("uploadprogress", (function(_this) {>> |
|
|
602 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {>> |
|
|
603 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.updateTotalUploadProgress();>> |
|
|
604 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
605 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));>> |
|
|
606 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("removedfile", (function(_this) {>> |
|
|
607 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function() {>> |
|
|
608 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.updateTotalUploadProgress();>> |
|
|
609 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
610 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));>> |
|
|
611 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("canceled", (function(_this) {>> |
|
|
612 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(file) {>> |
|
|
613 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("complete", file);>> |
|
|
614 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
615 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));>> |
|
|
616 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.on("complete", (function(_this) {>> |
|
|
617 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(file) {>> |
|
|
618 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {>> |
|
|
619 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout((function() {>> |
|
|
620 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("queuecomplete");>> |
|
|
621 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }), 0);>> |
|
|
622 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
623 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
624 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));>> |
|
|
625 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation = function(e) {>> |
|
|
626 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.stopPropagation();>> |
|
|
627 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (e.preventDefault) {>> |
|
|
628 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return e.preventDefault();>> |
|
|
629 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
630 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return e.returnValue = false;>> |
|
|
631 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
632 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
633 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.listeners = [>> |
|
|
634 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { {>> |
|
|
635 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { element: this.element,>> |
|
|
636 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { events: {>> |
|
|
637 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragstart": (function(_this) {>> |
|
|
638 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
639 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragstart", e);>> |
|
|
640 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
641 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),>> |
|
|
642 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragenter": (function(_this) {>> |
|
|
643 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
644 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);>> |
|
|
645 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragenter", e);>> |
|
|
646 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
647 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),>> |
|
|
648 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragover": (function(_this) {>> |
|
|
649 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
650 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var efct;>> |
|
|
651 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { try {>> |
|
|
652 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { efct = e.dataTransfer.effectAllowed;>> |
|
|
653 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } catch (_error) {}>> |
|
|
654 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';>> |
|
|
655 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);>> |
|
|
656 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragover", e);>> |
|
|
657 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
658 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),>> |
|
|
659 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragleave": (function(_this) {>> |
|
|
660 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
661 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragleave", e);>> |
|
|
662 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
663 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),>> |
|
|
664 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "drop": (function(_this) {>> |
|
|
665 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
666 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { noPropagation(e);>> |
|
|
667 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.drop(e);>> |
|
|
668 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
669 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this),>> |
|
|
670 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "dragend": (function(_this) {>> |
|
|
671 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(e) {>> |
|
|
672 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.emit("dragend", e);>> |
|
|
673 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
674 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this)>> |
|
|
675 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
676 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
677 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { ];>> |
|
|
678 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements.forEach((function(_this) {>> |
|
|
679 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return function(clickableElement) {>> |
|
|
680 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.listeners.push({>> |
|
|
681 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { element: clickableElement,>> |
|
|
682 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { events: {>> |
|
|
683 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "click": function(evt) {>> |
|
|
684 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {>> |
|
|
685 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.hiddenFileInput.click();>> |
|
|
686 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
687 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return true;>> |
|
|
688 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
689 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
690 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { });>> |
|
|
691 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
692 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { })(this));>> |
|
|
693 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.enable();>> |
|
|
694 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.init.call(this);>> |
|
|
695 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
696 |
|
|
|
697 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.destroy = function() {>> |
|
|
698 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var _ref;>> |
|
|
699 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.disable();>> |
|
|
700 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.removeAllFiles(true);>> |
|
|
701 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {>> |
|
|
702 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);>> |
|
|
703 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.hiddenFileInput = null;>> |
|
|
704 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
705 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { delete this.element.dropzone;>> |
|
|
706 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);>> |
|
|
707 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
708 |
|
|
|
709 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.updateTotalUploadProgress = function() {>> |
|
|
710 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;>> |
|
|
711 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytesSent = 0;>> |
|
|
712 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytes = 0;>> |
|
|
713 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { activeFiles = this.getActiveFiles();>> |
|
|
714 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (activeFiles.length) {>> |
|
|
715 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.getActiveFiles();>> |
|
|
716 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {>> |
|
|
717 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file = _ref[_i];>> |
|
|
718 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytesSent += file.upload.bytesSent;>> |
|
|
719 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalBytes += file.upload.total;>> |
|
|
720 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
721 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalUploadProgress = 100 * totalBytesSent / totalBytes;>> |
|
|
722 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
723 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { totalUploadProgress = 100;>> |
|
|
724 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
725 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);>> |
|
|
726 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
727 |
|
|
|
728 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._getParamName = function(n) {>> |
|
|
729 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.options.paramName === "function") {>> |
|
|
730 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.paramName(n);>> |
|
|
731 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else {>> |
|
|
732 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");>> |
|
|
733 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
734 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
735 |
|
|
|
736 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._renameFilename = function(name) {>> |
|
|
737 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof this.options.renameFilename !== "function") {>> |
|
|
738 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return name;>> |
|
|
739 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
740 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.renameFilename(name);>> |
|
|
741 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { };>> |
|
|
742 |
|
|
|
743 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getFallbackForm = function() {>> |
|
|
744 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var existingFallback, fields, fieldsString, form;>> |
|
|
745 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (existingFallback = this.getExistingFallback()) {>> |
|
|
746 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return existingFallback;>> |
|
|
747 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { }>> |
|
|
748 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fieldsString = ""; >> |
|
|
749 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.dictFallbackText) { >> |
|
|
750 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fieldsString += " " + this.options.dictFallbackText + "p>"; >> |
|
|
751 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
752 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fieldsString += "<input type=\"file\" name=\"" + (this._getParamName(0)) + "\" " + (this.options.uploadMultiple ? 'multiple="multiple"' : void 0) + " /><input type=\"submit\" value=\"Upload!\"></div>"; >> |
|
|
753 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fields = Dropzone.createElement(fieldsString); >> |
|
|
754 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.tagName !== "FORM") { >> |
|
|
755 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { form = Dropzone.createElement("<form action=\"" + this.options.url + "\" enctype=\"multipart/form-data\" method=\"" + this.options.method + "\"></form>"); >> |
|
|
756 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { form.appendChild(fields); >> |
|
|
757 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
758 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.setAttribute("enctype", "multipart/form-data"); >> |
|
|
759 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.element.setAttribute("method", this.options.method); >> |
|
|
760 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
761 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return form != null ? form : fields; >> |
|
|
762 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
763 |
|
|
|
764 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.getExistingFallback = function() { >> |
|
|
765 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var fallback, getFallback, tagName, _i, _len, _ref; >> |
|
|
766 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { getFallback = function(elements) { >> |
|
|
767 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
768 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = elements.length; _i < _len; _i++) { >> |
|
|
769 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
770 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (/(^| )fallback($| )/.test(el.className)) { >> |
|
|
771 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
772 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
773 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
774 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
775 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
776 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
777 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
778 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { >> |
|
|
779 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
780 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
781 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
782 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
783 |
|
|
|
784 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.setupEventListeners = function() { >> |
|
|
785 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var elementListeners, event, listener, _i, _len, _ref, _results; >> |
|
|
786 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
787 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
788 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
789 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { elementListeners = _ref[_i]; >> |
|
|
790 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push((function() { >> |
|
|
791 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
792 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = elementListeners.events; >> |
|
|
793 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
794 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
795 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
796 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results1.push(elementListeners.element.addEventListener(event, listener, false)); >> |
|
|
797 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
798 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
799 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
800 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
801 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
802 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
803 |
|
|
|
804 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.removeEventListeners = function() { >> |
|
|
805 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var elementListeners, event, listener, _i, _len, _ref, _results; >> |
|
|
806 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
807 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
808 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
809 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { elementListeners = _ref[_i]; >> |
|
|
810 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push((function() { >> |
|
|
811 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
812 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = elementListeners.events; >> |
|
|
813 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
814 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
815 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
816 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results1.push(elementListeners.element.removeEventListener(event, listener, false)); >> |
|
|
817 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
818 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
819 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
820 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
821 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
822 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
823 |
|
|
|
824 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.disable = function() { >> |
|
|
825 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref, _results; >> |
|
|
826 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements.forEach(function(element) { >> |
|
|
827 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return element.classList.remove("dz-clickable"); >> |
|
|
828 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
829 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.removeEventListeners(); >> |
|
|
830 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
831 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
832 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
833 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
834 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(this.cancelUpload(file)); >> |
|
|
835 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
836 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
837 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
838 |
|
|
|
839 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.enable = function() { >> |
|
|
840 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.clickableElements.forEach(function(element) { >> |
|
|
841 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return element.classList.add("dz-clickable"); >> |
|
|
842 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
843 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.setupEventListeners(); >> |
|
|
844 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
845 |
|
|
|
846 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.filesize = function(size) { >> |
|
|
847 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; >> |
|
|
848 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
849 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
850 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
851 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { units = ['TB', 'GB', 'MB', 'KB', 'b']; >> |
|
|
852 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { >> |
|
|
853 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
854 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; >> |
|
|
855 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
856 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); >> |
|
|
857 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
858 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
859 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
860 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
861 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { selectedSize = Math.round(10 * selectedSize) / 10; >> |
|
|
862 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
863 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return "" + selectedSize + "strong> " + selectedUnit; >> |
|
|
864 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
865 |
|
|
|
866 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._updateMaxFilesReachedClass = function() { >> |
|
|
867 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { >> |
|
|
868 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.getAcceptedFiles().length === this.options.maxFiles) { >> |
|
|
869 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit('maxfilesreached', this.files); >> |
|
|
870 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
871 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.add("dz-max-files-reached"); >> |
|
|
872 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
873 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.element.classList.remove("dz-max-files-reached"); >> |
|
|
874 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
875 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
876 |
|
|
|
877 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.drop = function(e) { >> |
|
|
878 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
879 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
880 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
881 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
882 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
883 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { files = e.dataTransfer.files; >> |
|
|
884 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("addedfiles", files); >> |
|
|
885 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
886 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { items = e.dataTransfer.items; >> |
|
|
887 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (items && items.length && (items[0].webkitGetAsEntry != null)) { >> |
|
|
888 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this._addFilesFromItems(items); >> |
|
|
889 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
890 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
891 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
892 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
893 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
894 |
|
|
|
895 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.paste = function(e) { >> |
|
|
896 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
897 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { >> |
|
|
898 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
899 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
900 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
901 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { items = e.clipboardData.items; >> |
|
|
902 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
903 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this._addFilesFromItems(items); >> |
|
|
904 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
905 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
906 |
|
|
|
907 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.handleFiles = function(files) { >> |
|
|
908 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _results; >> |
|
|
909 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
910 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
911 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
912 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(this.addFile(file)); >> |
|
|
913 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
914 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
915 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
916 |
|
|
|
917 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._addFilesFromItems = function(items) { >> |
|
|
918 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var entry, item, _i, _len, _results; >> |
|
|
919 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
920 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = items.length; _i < _len; _i++) { >> |
|
|
921 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
922 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { >> |
|
|
923 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
924 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(this.addFile(item.getAsFile())); >> |
|
|
925 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (entry.isDirectory) { >> |
|
|
926 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(this._addFilesFromDirectory(entry, entry.name)); >> |
|
|
927 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
928 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
929 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
930 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (item.getAsFile != null) { >> |
|
|
931 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((item.kind == null) || item.kind === "file") { >> |
|
|
932 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(this.addFile(item.getAsFile())); >> |
|
|
933 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
934 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
935 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
936 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
937 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
938 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
939 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
940 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
941 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
942 |
|
|
|
943 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._addFilesFromDirectory = function(directory, path) { >> |
|
|
944 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var dirReader, errorHandler, readEntries; >> |
|
|
945 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dirReader = directory.createReader(); >> |
|
|
946 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { errorHandler = function(error) { >> |
|
|
947 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; >> |
|
|
948 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
949 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { readEntries = (function(_this) { >> |
|
|
950 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
951 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return dirReader.readEntries(function(entries) { >> |
|
|
952 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
953 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (entries.length > 0) { >> |
|
|
954 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = entries.length; _i < _len; _i++) { >> |
|
|
955 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
956 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
957 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { entry.file(function(file) { >> |
|
|
958 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { >> |
|
|
959 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
960 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
961 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.fullPath = "" + path + "/" + file.name; >> |
|
|
962 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.addFile(file); >> |
|
|
963 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
964 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (entry.isDirectory) { >> |
|
|
965 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); >> |
|
|
966 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
967 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
968 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
969 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
970 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
971 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
972 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
973 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
974 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
975 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
976 |
|
|
|
977 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.accept = function(file, done) { >> |
|
|
978 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.size > this.options.maxFilesize * 1024 * 1024) { >> |
|
|
979 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); >> |
|
|
980 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { >> |
|
|
981 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return done(this.options.dictInvalidFileType); >> |
|
|
982 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { >> |
|
|
983 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); >> |
|
|
984 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("maxfilesexceeded", file); >> |
|
|
985 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
986 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.options.accept.call(this, file, done); >> |
|
|
987 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
988 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
989 |
|
|
|
990 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.addFile = function(file) { >> |
|
|
991 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
992 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
993 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
994 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
995 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
996 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
997 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.ADDED; >> |
|
|
998 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("addedfile", file); >> |
|
|
999 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this._enqueueThumbnail(file); >> |
|
|
1000 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.accept(file, (function(_this) { >> |
|
|
1001 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1002 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1003 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1004 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this._errorProcessing([file], error); >> |
|
|
1005 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1006 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1007 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (_this.options.autoQueue) { >> |
|
|
1008 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1009 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1010 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1011 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this._updateMaxFilesReachedClass(); >> |
|
|
1012 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1013 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1014 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1015 |
|
|
|
1016 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.enqueueFiles = function(files) { >> |
|
|
1017 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1018 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
1019 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1020 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1021 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1022 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1023 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1024 |
|
|
|
1025 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.enqueueFile = function(file) { >> |
|
|
1026 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.ADDED && file.accepted === true) { >> |
|
|
1027 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.QUEUED; >> |
|
|
1028 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.autoProcessQueue) { >> |
|
|
1029 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout(((function(_this) { >> |
|
|
1030 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1031 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.processQueue(); >> |
|
|
1032 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1033 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1034 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1035 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1036 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("This file can't be queued because it has already been processed or was rejected."); >> |
|
|
1037 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1038 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1039 |
|
|
|
1040 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._thumbnailQueue = []; >> |
|
|
1041 |
|
|
|
1042 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._processingThumbnail = false; >> |
|
|
1043 |
|
|
|
1044 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._enqueueThumbnail = function(file) { >> |
|
|
1045 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { >> |
|
|
1046 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this._thumbnailQueue.push(file); >> |
|
|
1047 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return setTimeout(((function(_this) { >> |
|
|
1048 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1049 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this._processThumbnailQueue(); >> |
|
|
1050 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1051 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1052 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1053 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1054 |
|
|
|
1055 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._processThumbnailQueue = function() { >> |
|
|
1056 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this._processingThumbnail || this._thumbnailQueue.length === 0) { >> |
|
|
1057 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1058 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1059 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this._processingThumbnail = true; >> |
|
|
1060 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { >> |
|
|
1061 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1062 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this._processingThumbnail = false; >> |
|
|
1063 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this._processThumbnailQueue(); >> |
|
|
1064 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1065 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1066 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1067 |
|
|
|
1068 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.removeFile = function(file) { >> |
|
|
1069 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING) { >> |
|
|
1070 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1071 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1072 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.files = without(this.files, file); >> |
|
|
1073 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("removedfile", file); >> |
|
|
1074 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.files.length === 0) { >> |
|
|
1075 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.emit("reset"); >> |
|
|
1076 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1077 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1078 |
|
|
|
1079 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { >> |
|
|
1080 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, _i, _len, _ref; >> |
|
|
1081 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (cancelIfNecessary == null) { >> |
|
|
1082 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { cancelIfNecessary = false; >> |
|
|
1083 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1084 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = this.files.slice(); >> |
|
|
1085 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
1086 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1087 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { >> |
|
|
1088 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1089 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1090 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1091 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1092 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1093 |
|
|
|
1094 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.createThumbnail = function(file, callback) { >> |
|
|
1095 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1096 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fileReader = new FileReader; >> |
|
|
1097 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { fileReader.onload = (function(_this) { >> |
|
|
1098 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1099 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.type === "image/svg+xml") { >> |
|
|
1100 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.emit("thumbnail", file, fileReader.result); >> |
|
|
1101 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1102 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1103 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1104 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1105 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1106 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this.createThumbnailFromUrl(file, fileReader.result, callback); >> |
|
|
1107 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1108 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1109 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return fileReader.readAsDataURL(file); >> |
|
|
1110 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1111 |
|
|
|
1112 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) { >> |
|
|
1113 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1114 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { img = document.createElement("img"); >> |
|
|
1115 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1116 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { img.crossOrigin = crossOrigin; >> |
|
|
1117 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1118 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { img.onload = (function(_this) { >> |
|
|
1119 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1120 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; >> |
|
|
1121 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1122 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.height = img.height; >> |
|
|
1123 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { resizeInfo = _this.options.resize.call(_this, file); >> |
|
|
1124 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (resizeInfo.trgWidth == null) { >> |
|
|
1125 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { resizeInfo.trgWidth = resizeInfo.optWidth; >> |
|
|
1126 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1127 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (resizeInfo.trgHeight == null) { >> |
|
|
1128 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { resizeInfo.trgHeight = resizeInfo.optHeight; >> |
|
|
1129 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1130 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canvas = document.createElement("canvas"); >> |
|
|
1131 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { ctx = canvas.getContext("2d"); >> |
|
|
1132 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canvas.width = resizeInfo.trgWidth; >> |
|
|
1133 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canvas.height = resizeInfo.trgHeight; >> |
|
|
1134 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); >> |
|
|
1135 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { thumbnail = canvas.toDataURL("image/png"); >> |
|
|
1136 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _this.emit("thumbnail", file, thumbnail); >> |
|
|
1137 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1138 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1139 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1140 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1141 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1142 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1143 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1144 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1145 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return img.src = imageUrl; >> |
|
|
1146 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1147 |
|
|
|
1148 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.processQueue = function() { >> |
|
|
1149 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var i, parallelUploads, processingLength, queuedFiles; >> |
|
|
1150 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { parallelUploads = this.options.parallelUploads; >> |
|
|
1151 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { processingLength = this.getUploadingFiles().length; >> |
|
|
1152 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1153 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (processingLength >= parallelUploads) { >> |
|
|
1154 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1155 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1156 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { queuedFiles = this.getQueuedFiles(); >> |
|
|
1157 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!(queuedFiles.length > 0)) { >> |
|
|
1158 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1159 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1160 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1161 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); >> |
|
|
1162 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1163 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { while (i < parallelUploads) { >> |
|
|
1164 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!queuedFiles.length) { >> |
|
|
1165 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1166 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1167 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.processFile(queuedFiles.shift()); >> |
|
|
1168 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1169 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1170 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1171 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1172 |
|
|
|
1173 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.processFile = function(file) { >> |
|
|
1174 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.processFiles([file]); >> |
|
|
1175 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1176 |
|
|
|
1177 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.processFiles = function(files) { >> |
|
|
1178 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1179 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
1180 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1181 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1182 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.UPLOADING; >> |
|
|
1183 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("processing", file); >> |
|
|
1184 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1185 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1186 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("processingmultiple", files); >> |
|
|
1187 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1188 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.uploadFiles(files); >> |
|
|
1189 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1190 |
|
|
|
1191 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._getFilesWithXhr = function(xhr) { >> |
|
|
1192 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1193 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return files = (function() { >> |
|
|
1194 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var _i, _len, _ref, _results; >> |
|
|
1195 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1196 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1197 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
1198 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1199 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1200 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1201 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1202 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1203 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1204 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1205 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1206 |
|
|
|
1207 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.cancelUpload = function(file) { >> |
|
|
1208 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; >> |
|
|
1209 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.status === Dropzone.UPLOADING) { >> |
|
|
1210 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { groupedFiles = this._getFilesWithXhr(file.xhr); >> |
|
|
1211 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { >> |
|
|
1212 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { groupedFile = groupedFiles[_i]; >> |
|
|
1213 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { groupedFile.status = Dropzone.CANCELED; >> |
|
|
1214 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1215 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1216 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { >> |
|
|
1217 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { groupedFile = groupedFiles[_j]; >> |
|
|
1218 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("canceled", groupedFile); >> |
|
|
1219 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1220 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1221 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("canceledmultiple", groupedFiles); >> |
|
|
1222 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1223 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { >> |
|
|
1224 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.CANCELED; >> |
|
|
1225 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("canceled", file); >> |
|
|
1226 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1227 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("canceledmultiple", [file]); >> |
|
|
1228 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1229 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1230 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.autoProcessQueue) { >> |
|
|
1231 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.processQueue(); >> |
|
|
1232 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1233 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1234 |
|
|
|
1235 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { resolveOption = function() { >> |
|
|
1236 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1237 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; >> |
|
|
1238 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof option === 'function') { >> |
|
|
1239 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return option.apply(this, args); >> |
|
|
1240 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1241 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1242 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1243 |
|
|
|
1244 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.uploadFile = function(file) { >> |
|
|
1245 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.uploadFiles([file]); >> |
|
|
1246 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1247 |
|
|
|
1248 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.uploadFiles = function(files) { >> |
|
|
1249 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; >> |
|
|
1250 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr = new XMLHttpRequest(); >> |
|
|
1251 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
1252 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1253 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1254 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1255 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { method = resolveOption(this.options.method, files); >> |
|
|
1256 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { url = resolveOption(this.options.url, files); >> |
|
|
1257 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr.open(method, url, true); >> |
|
|
1258 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr.withCredentials = !!this.options.withCredentials; >> |
|
|
1259 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1260 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { handleError = (function(_this) { >> |
|
|
1261 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1262 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1263 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1264 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = files.length; _j < _len1; _j++) { >> |
|
|
1265 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1266 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); >> |
|
|
1267 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1268 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1269 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1270 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1271 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { updateProgress = (function(_this) { >> |
|
|
1272 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1273 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; >> |
|
|
1274 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1275 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { progress = 100 * e.loaded / e.total; >> |
|
|
1276 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = files.length; _j < _len1; _j++) { >> |
|
|
1277 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1278 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1279 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1280 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1281 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1282 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1283 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1284 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1285 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1286 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1287 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_k = 0, _len2 = files.length; _k < _len2; _k++) { >> |
|
|
1288 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1289 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { >> |
|
|
1290 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { allFilesFinished = false; >> |
|
|
1291 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1292 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.upload.progress = progress; >> |
|
|
1293 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.upload.bytesSent = file.upload.total; >> |
|
|
1294 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1295 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1296 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1297 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1298 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1299 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1300 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_l = 0, _len3 = files.length; _l < _len3; _l++) { >> |
|
|
1301 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1302 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); >> |
|
|
1303 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1304 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1305 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1306 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1307 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr.onload = (function(_this) { >> |
|
|
1308 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1309 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1310 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (files[0].status === Dropzone.CANCELED) { >> |
|
|
1311 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1312 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1313 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (xhr.readyState !== 4) { >> |
|
|
1314 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1315 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1316 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { response = xhr.responseText; >> |
|
|
1317 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { >> |
|
|
1318 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1319 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { response = JSON.parse(response); >> |
|
|
1320 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1321 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1322 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { response = "Invalid JSON response from server."; >> |
|
|
1323 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1324 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1325 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1326 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!((200 <= (_ref = xhr.status) && _ref < 300))) { >> |
|
|
1327 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1328 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1329 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return _this._finished(files, response, e); >> |
|
|
1330 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1331 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1332 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1333 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr.onerror = (function(_this) { >> |
|
|
1334 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1335 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (files[0].status === Dropzone.CANCELED) { >> |
|
|
1336 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1337 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1338 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1339 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1340 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1341 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { progressObj = (_ref = xhr.upload) != null ? _ref : xhr; >> |
|
|
1342 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { progressObj.onprogress = updateProgress; >> |
|
|
1343 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1344 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "Accept": "application/json", >> |
|
|
1345 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "Cache-Control": "no-cache", >> |
|
|
1346 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { "X-Requested-With": "XMLHttpRequest" >> |
|
|
1347 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1348 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.headers) { >> |
|
|
1349 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { extend(headers, this.options.headers); >> |
|
|
1350 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1351 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (headerName in headers) { >> |
|
|
1352 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { headerValue = headers[headerName]; >> |
|
|
1353 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1354 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { xhr.setRequestHeader(headerName, headerValue); >> |
|
|
1355 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1356 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1357 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { formData = new FormData(); >> |
|
|
1358 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.params) { >> |
|
|
1359 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref1 = this.options.params; >> |
|
|
1360 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1361 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1362 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { formData.append(key, value); >> |
|
|
1363 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1364 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1365 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = files.length; _j < _len1; _j++) { >> |
|
|
1366 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1367 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("sending", file, xhr, formData); >> |
|
|
1368 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1369 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1370 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("sendingmultiple", files, xhr, formData); >> |
|
|
1371 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1372 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.element.tagName === "FORM") { >> |
|
|
1373 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref2 = this.element.querySelectorAll("input, textarea, select, button"); >> |
|
|
1374 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { >> |
|
|
1375 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1376 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { inputName = input.getAttribute("name"); >> |
|
|
1377 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { inputType = input.getAttribute("type"); >> |
|
|
1378 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { >> |
|
|
1379 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1380 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { >> |
|
|
1381 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1382 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1383 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { formData.append(inputName, option.value); >> |
|
|
1384 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1385 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1386 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { >> |
|
|
1387 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { formData.append(inputName, input.value); >> |
|
|
1388 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1389 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1390 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1391 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { >> |
|
|
1392 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name)); >> |
|
|
1393 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1394 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.submitRequest(xhr, formData, files); >> |
|
|
1395 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1396 |
|
|
|
1397 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype.submitRequest = function(xhr, formData, files) { >> |
|
|
1398 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return xhr.send(formData); >> |
|
|
1399 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1400 |
|
|
|
1401 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._finished = function(files, responseText, e) { >> |
|
|
1402 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1403 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
1404 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1405 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.SUCCESS; >> |
|
|
1406 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("success", file, responseText, e); >> |
|
|
1407 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("complete", file); >> |
|
|
1408 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1409 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1410 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("successmultiple", files, responseText, e); >> |
|
|
1411 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("completemultiple", files); >> |
|
|
1412 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1413 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.autoProcessQueue) { >> |
|
|
1414 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.processQueue(); >> |
|
|
1415 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1416 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1417 |
|
|
|
1418 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.prototype._errorProcessing = function(files, message, xhr) { >> |
|
|
1419 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1420 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = files.length; _i < _len; _i++) { >> |
|
|
1421 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1422 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { file.status = Dropzone.ERROR; >> |
|
|
1423 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("error", file, message, xhr); >> |
|
|
1424 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("complete", file); >> |
|
|
1425 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1426 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.uploadMultiple) { >> |
|
|
1427 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("errormultiple", files, message, xhr); >> |
|
|
1428 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { this.emit("completemultiple", files); >> |
|
|
1429 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1430 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (this.options.autoProcessQueue) { >> |
|
|
1431 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.processQueue(); >> |
|
|
1432 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1433 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1434 |
|
|
|
1435 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1436 |
|
|
|
1437 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1438 |
|
|
|
1439 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.version = "4.3.0"; >> |
|
|
1440 |
|
|
|
1441 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1442 |
|
|
|
1443 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.optionsForElement = function(element) { >> |
|
|
1444 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (element.getAttribute("id")) { >> |
|
|
1445 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.options[camelize(element.getAttribute("id"))]; >> |
|
|
1446 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1447 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1448 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1449 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1450 |
|
|
|
1451 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1452 |
|
|
|
1453 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.forElement = function(element) { >> |
|
|
1454 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof element === "string") { >> |
|
|
1455 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { element = document.querySelector(element); >> |
|
|
1456 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1457 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if ((element != null ? element.dropzone : void 0) == null) { >> |
|
|
1458 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); >> |
|
|
1459 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1460 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1461 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1462 |
|
|
|
1463 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.autoDiscover = true; >> |
|
|
1464 |
|
|
|
1465 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.discover = function() { >> |
|
|
1466 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var checkElements, dropzone, dropzones, _i, _len, _results; >> |
|
|
1467 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (document.querySelectorAll) { >> |
|
|
1468 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dropzones = document.querySelectorAll(".dropzone"); >> |
|
|
1469 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1470 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1471 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { checkElements = function(elements) { >> |
|
|
1472 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var el, _i, _len, _results; >> |
|
|
1473 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1474 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = elements.length; _i < _len; _i++) { >> |
|
|
1475 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1476 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (/(^| )dropzone($| )/.test(el.className)) { >> |
|
|
1477 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(dropzones.push(el)); >> |
|
|
1478 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1479 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1480 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1481 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1482 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1483 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1484 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { checkElements(document.getElementsByTagName("div")); >> |
|
|
1485 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { checkElements(document.getElementsByTagName("form")); >> |
|
|
1486 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1487 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1488 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = dropzones.length; _i < _len; _i++) { >> |
|
|
1489 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { dropzone = dropzones[_i]; >> |
|
|
1490 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (Dropzone.optionsForElement(dropzone) !== false) { >> |
|
|
1491 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _results.push(new Dropzone(dropzone)); >> |
|
|
1492 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1493 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1494 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1495 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1496 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1497 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1498 |
|
|
|
1499 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; >> |
|
|
1500 |
|
|
|
1501 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.isBrowserSupported = function() { >> |
|
|
1502 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var capableBrowser, regex, _i, _len, _ref; >> |
|
|
1503 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1504 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { >> |
|
|
1505 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!("classList" in document.createElement("a"))) { >> |
|
|
1506 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1507 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1508 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = Dropzone.blacklistedBrowsers; >> |
|
|
1509 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = _ref.length; _i < _len; _i++) { >> |
|
|
1510 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1511 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (regex.test(navigator.userAgent)) { >> |
|
|
1512 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1513 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1514 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1515 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1516 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1517 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1518 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1519 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1520 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1521 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1522 |
|
|
|
1523 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { without = function(list, rejectedItem) { >> |
|
|
1524 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var item, _i, _len, _results; >> |
|
|
1525 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1526 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = list.length; _i < _len; _i++) { >> |
|
|
1527 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1528 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (item !== rejectedItem) { >> |
|
|
1529 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1530 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1531 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1532 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1533 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1534 |
|
|
|
1535 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { camelize = function(str) { >> |
|
|
1536 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return str.replace(/[\-_](\w)/g, function(match) { >> |
|
|
1537 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return match.charAt(1).toUpperCase(); >> |
|
|
1538 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1539 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1540 |
|
|
|
1541 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.createElement = function(string) { >> |
|
|
1542 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1543 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { div = document.createElement("div"); >> |
|
|
1544 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1545 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return div.childNodes[0]; >> |
|
|
1546 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1547 |
|
|
|
1548 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.elementInside = function(element, container) { >> |
|
|
1549 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (element === container) { >> |
|
|
1550 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1551 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1552 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { while (element = element.parentNode) { >> |
|
|
1553 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (element === container) { >> |
|
|
1554 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1555 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1556 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1557 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1558 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1559 |
|
|
|
1560 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.getElement = function(el, name) { >> |
|
|
1561 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1562 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof el === "string") { >> |
|
|
1563 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { element = document.querySelector(el); >> |
|
|
1564 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (el.nodeType != null) { >> |
|
|
1565 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1566 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1567 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1568 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); >> |
|
|
1569 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1570 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1571 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1572 |
|
|
|
1573 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.getElements = function(els, name) { >> |
|
|
1574 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var e, el, elements, _i, _j, _len, _len1, _ref; >> |
|
|
1575 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (els instanceof Array) { >> |
|
|
1576 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1577 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1578 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = els.length; _i < _len; _i++) { >> |
|
|
1579 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1580 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { elements.push(this.getElement(el, name)); >> |
|
|
1581 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1582 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1583 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1584 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1585 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1586 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (typeof els === "string") { >> |
|
|
1587 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1588 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { _ref = document.querySelectorAll(els); >> |
|
|
1589 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { >> |
|
|
1590 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1591 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1592 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1593 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (els.nodeType != null) { >> |
|
|
1594 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1595 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1596 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!((elements != null) && elements.length)) { >> |
|
|
1597 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); >> |
|
|
1598 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1599 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1600 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1601 |
|
|
|
1602 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.confirm = function(question, accepted, rejected) { >> |
|
|
1603 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (window.confirm(question)) { >> |
|
|
1604 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1605 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (rejected != null) { >> |
|
|
1606 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1607 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1608 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1609 |
|
|
|
1610 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.isValidFile = function(file, acceptedFiles) { >> |
|
|
1611 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var baseMimeType, mimeType, validType, _i, _len; >> |
|
|
1612 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1613 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1614 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1615 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { acceptedFiles = acceptedFiles.split(","); >> |
|
|
1616 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1617 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { baseMimeType = mimeType.replace(/\/.*$/, ""); >> |
|
|
1618 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { >> |
|
|
1619 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { validType = acceptedFiles[_i]; >> |
|
|
1620 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { validType = validType.trim(); >> |
|
|
1621 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (validType.charAt(0) === ".") { >> |
|
|
1622 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { >> |
|
|
1623 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1624 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1625 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { } else if (/\/\*$/.test(validType)) { >> |
|
|
1626 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (baseMimeType === validType.replace(/\/.*$/, "")) { >> |
|
|
1627 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1628 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1629 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1630 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (mimeType === validType) { >> |
|
|
1631 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1632 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1633 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1634 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1635 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1636 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1637 |
|
|
|
1638 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof jQuery !== "undefined" && jQuery !== null) { >> |
|
|
1639 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { jQuery.fn.dropzone = function(options) { >> |
|
|
1640 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return this.each(function() { >> |
|
|
1641 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return new Dropzone(this, options); >> |
|
|
1642 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1643 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1644 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1645 |
|
|
|
1646 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (typeof module !== "undefined" && module !== null) { >> |
|
|
1647 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { module.exports = Dropzone; >> |
|
|
1648 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1649 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { window.Dropzone = Dropzone; >> |
|
|
1650 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1651 |
|
|
|
1652 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.ADDED = "added"; >> |
|
|
1653 |
|
|
|
1654 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.QUEUED = "queued"; >> |
|
|
1655 |
|
|
|
1656 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.ACCEPTED = Dropzone.QUEUED; >> |
|
|
1657 |
|
|
|
1658 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.UPLOADING = "uploading"; >> |
|
|
1659 |
|
|
|
1660 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.PROCESSING = Dropzone.UPLOADING; >> |
|
|
1661 |
|
|
|
1662 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.CANCELED = "canceled"; >> |
|
|
1663 |
|
|
|
1664 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.ERROR = "error"; >> |
|
|
1665 |
|
|
|
1666 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone.SUCCESS = "success"; >> |
|
|
1667 |
|
|
|
1668 |
|
|
|
1669 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1670 |
|
|
|
1671 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1672 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios >> |
|
|
1673 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { based on the work of https://github.com/stomita/ios-imagefile-megapixel >> |
|
|
1674 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1675 |
|
|
|
1676 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { detectVerticalSquash = function(img) { >> |
|
|
1677 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; >> |
|
|
1678 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1679 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1680 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { canvas = document.createElement("canvas"); >> |
|
|
1681 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1682 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1683 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { ctx = canvas.getContext("2d"); >> |
|
|
1684 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { ctx.drawImage(img, 0, 0); >> |
|
|
1685 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { data = ctx.getImageData(0, 0, 1, ih).data; >> |
|
|
1686 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1687 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1688 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1689 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1690 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { alpha = data[(py - 1) * 4 + 3]; >> |
|
|
1691 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1692 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1693 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1694 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1695 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1696 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1697 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1698 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1699 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1700 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1701 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1702 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1703 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1704 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1705 |
|
|
|
1706 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { >> |
|
|
1707 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1708 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { vertSquashRatio = detectVerticalSquash(img); >> |
|
|
1709 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); >> |
|
|
1710 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1711 |
|
|
|
1712 |
|
|
|
1713 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1714 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1715 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1716 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { * Author: Diego Perini (diego.perini at gmail.com) >> |
|
|
1717 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { * Summary: cross-browser wrapper for DOMContentLoaded >> |
|
|
1718 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1719 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1720 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1721 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1722 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1723 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { * http://javascript.nwbox.com/ContentLoaded/ >> |
|
|
1724 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE >> |
|
|
1725 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1726 |
|
|
|
1727 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { contentLoaded = function(win, fn) { >> |
|
|
1728 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { var add, doc, done, init, poll, pre, rem, root, top; >> |
|
|
1729 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1730 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1731 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1732 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { root = doc.documentElement; >> |
|
|
1733 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { add = (doc.addEventListener ? "addEventListener" : "attachEvent"); >> |
|
|
1734 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); >> |
|
|
1735 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { pre = (doc.addEventListener ? "" : "on"); >> |
|
|
1736 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1737 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (e.type === "readystatechange" && doc.readyState !== "complete") { >> |
|
|
1738 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1739 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1740 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); >> |
|
|
1741 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (!done && (done = true)) { >> |
|
|
1742 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return fn.call(win, e.type || e); >> |
|
|
1743 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1744 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1745 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1746 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1747 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1748 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1749 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1750 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1751 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1752 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1753 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1754 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1755 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1756 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (doc.readyState !== "complete") { >> |
|
|
1757 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (doc.createEventObject && root.doScroll) { >> |
|
|
1758 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1759 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1760 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1761 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1762 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1763 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1764 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1765 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { doc[add](pre + "DOMContentLoaded", init, false); >> |
|
|
1766 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { doc[add](pre + "readystatechange", init, false); >> |
|
|
1767 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return win[add](pre + "load", init, false); >> |
|
|
1768 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1769 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1770 |
|
|
|
1771 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { Dropzone._autoDiscoverFunction = function() { >> |
|
|
1772 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { if (Dropzone.autoDiscover) { >> |
|
|
1773 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { return Dropzone.discover(); >> |
|
|
1774 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1775 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1776 |
|
|
|
1777 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) { contentLoaded(window, Dropzone._autoDiscoverFunction); >> |
|
|
1778 |
|
|
|
1779 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1780 |
|
|
|
1781 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |
|
|
1782 |
< info.optHeight || file.width < info.optWidth) {< info.optWidth) {>> |