mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: multiple uploads failed, found while investigating #322
This commit is contained in:
parent
c5cf9fc71d
commit
59857e66e7
1 changed files with 4 additions and 10 deletions
14
vendors/jua/jua.js
vendored
14
vendors/jua/jua.js
vendored
|
|
@ -73,15 +73,9 @@
|
||||||
|
|
||||||
class Queue extends Array
|
class Queue extends Array
|
||||||
{
|
{
|
||||||
constructor(limit) {
|
|
||||||
super();
|
|
||||||
this.limit = parseInt(limit || 0, 10);
|
|
||||||
}
|
|
||||||
push(fn, ...args) {
|
push(fn, ...args) {
|
||||||
if (this.limit > this.length) {
|
super.push([fn, args]);
|
||||||
super.push([fn, args]);
|
this.call();
|
||||||
this.call();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
call() {
|
call() {
|
||||||
if (!this.running) {
|
if (!this.running) {
|
||||||
|
|
@ -134,7 +128,7 @@
|
||||||
hidden: {},
|
hidden: {},
|
||||||
limit: 0
|
limit: 0
|
||||||
}, options || {});
|
}, options || {});
|
||||||
self.oQueue = new Queue(1 == options.limit ? 1 : 2);
|
self.oQueue = new Queue();
|
||||||
|
|
||||||
if (el) {
|
if (el) {
|
||||||
el.style.position = 'relative';
|
el.style.position = 'relative';
|
||||||
|
|
@ -390,7 +384,7 @@
|
||||||
oInput.type = 'file';
|
oInput.type = 'file';
|
||||||
oInput.tabIndex = -1;
|
oInput.tabIndex = -1;
|
||||||
oInput.style.display = 'none';
|
oInput.style.display = 'none';
|
||||||
oInput.multiple = 1 < limit;
|
oInput.multiple = 1 != limit;
|
||||||
|
|
||||||
oClickElement.addEventListener('click', onClick);
|
oClickElement.addEventListener('click', onClick);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue