Bugfix: compose e-mail file upload failed to wrong conversion to ES2015

Must be a 39 degrees workplace failure
This commit is contained in:
djmaze 2020-08-15 20:11:56 +02:00
parent 97443b7c7d
commit 9f73377a88
2 changed files with 11 additions and 18 deletions

27
vendors/jua/jua.js vendored
View file

@ -31,20 +31,15 @@
Array.from(aItems).forEach(oItem => {
if (oItem)
{
if (!bUseLimit) {
if (0 <= --iLimit)
{
oFile = Utils.getDataFromFile(oItem);
oFile && fFileCallback(oFile);
}
}
else if (!bCallLimit)
if (!bUseLimit || 0 <= --iLimit)
{
if (0 > iLimit && fLimitCallback)
{
bCallLimit = true;
fLimitCallback(iInputLimit);
}
oFile = Utils.getDataFromFile(oItem);
oFile && fFileCallback(oFile);
}
else if (bUseLimit && !bCallLimit && 0 > iLimit && fLimitCallback)
{
bCallLimit = true;
fLimitCallback(iInputLimit);
}
}
});
@ -436,13 +431,11 @@
}
})
.on('change', function () {
Utils.getDataFromInput(this, function (oFile) {
Utils.getDataFromInput(this, oFile => {
self.oJua.addNewFile(oFile);
self.generateNewInput(oClickElement);
setTimeout(function () {
oLabel.remove();
}, 10);
setTimeout(() => oLabel.remove(), 10);
},
Utils.getValue(self.oOptions, 'multipleSizeLimit', iDefLimit),
self.oJua.getEvent('onLimitReached')

File diff suppressed because one or more lines are too long