diff --git a/www/file/main.js b/www/file/main.js index eb53cca47..ada0b50d2 100644 --- a/www/file/main.js +++ b/www/file/main.js @@ -73,13 +73,9 @@ define([ if (box) { actual += box.length; var progressValue = (actual / estimate * 100); - var progress = progressValue + '%'; return void sendChunk(box, function (e) { if (e) { return console.error(e); } - /*$progress.css({ - width: progress, - });*/ var $pv = $table.find('tr[id="'+id+'"]').find('.progressValue'); $pv.text(Math.round(progressValue*100)/100 + '%'); var $pb = $table.find('tr[id="'+id+'"]').find('.progressContainer'); @@ -179,17 +175,17 @@ define([ var $tr = $('', {id: id}).appendTo($table); var $cancel = $('', {'class': 'cancel fa fa-times'}).click(function () { - queue.queue = queue.queue.filter(function (el) { return el.id !== id }); + queue.queue = queue.queue.filter(function (el) { return el.id !== id; }); $cancel.remove(); $tr.find('.upCancel').text('-'); $tr.find('.progressValue').text(Messages.upload_cancelled); }); - var $tr = $('', {id: id}).appendTo($table); - $('').text(obj.metadata.name).appendTo($tr); - $('').text(prettySize(estimate)).appendTo($tr); - $('', {'class': 'upProgress'}).append($progressBar).append($progressValue).appendTo($tr); - $('', {'class': 'upCancel'}).append($cancel).appendTo($tr); + var $tr2 = $('', {id: id}).appendTo($table); + $('').text(obj.metadata.name).appendTo($tr2); + $('').text(prettySize(estimate)).appendTo($tr2); + $('', {'class': 'upProgress'}).append($progressBar).append($progressValue).appendTo($tr2); + $('', {'class': 'upCancel'}).append($cancel).appendTo($tr2); queue.next(); };