From b05c1a98293a4a7c17a57589db750eace2db4c9d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 28 Jul 2016 11:45:57 +0200 Subject: use single quote for js and double quote for html with proper escapes and implement a simple progressbar --- view/js/mod_cloud.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index e29efd664..8e6b8cb05 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -84,12 +84,12 @@ function UploadFileSelectHandler(e) { function prepareHtml(f, i) { $("#cloud-index tr:nth-child(2)").after( - "" + - "" + - "" + f.name + "" + - "" + - "" + formatSizeUnits(f.size) + "" + - "" + '' + + '' + + '' + f.name + '' + + '' + + '' + formatSizeUnits(f.size) + '' + + '' ); } @@ -162,6 +162,7 @@ function UploadFile(file, idx) { var total = e.totalSize || e.total; // Dynamically update the percentage complete displayed in the file upload list $('#upload-progress-' + idx).html(Math.round(done / total * 100) + '%'); + $('#new-upload-' + idx).css('background-size', Math.round(done / total * 100) + '%'); }); xhr.addEventListener('load', function (e) { -- cgit v1.2.3