diff OrthancExplorer/file-upload.js @ 3103:81b58b549845

back to using 'var' instead of 'let' since let is not supported by many old browsers. All variables declaration have been moved to the top of the function to better show that their scope is the function
author Alain Mazy <alain@mazy.be>
date Thu, 10 Jan 2019 10:51:36 +0100
parents 9b18c8d4d459
children b311cff247ca
line wrap: on
line diff
--- a/OrthancExplorer/file-upload.js	Thu Jan 10 10:10:26 2019 +0100
+++ b/OrthancExplorer/file-upload.js	Thu Jan 10 10:51:36 2019 +0100
@@ -32,7 +32,7 @@
     .bind('fileuploadsend', function (e, data) {
       // Update the progress bar. Note: for some weird reason, the
       // "fileuploadprogressall" does not work under Firefox.
-      let progress = parseInt(currentUpload / totalUploads * 100, 10);
+      var progress = parseInt(currentUpload / totalUploads * 100, 10);
       currentUpload += 1;
       $('#progress .label').text('Uploading: ' + progress + '%');
       $('#progress .bar')
@@ -42,7 +42,7 @@
 });
 
 function appendFilesToUploadList(files) {
-  let target = $('#upload-list');
+  var target = $('#upload-list');
   $.each(files, function (index, file) {
     target.append('<li class="pending-file">' + file.name + '</li>');
   });
@@ -72,7 +72,7 @@
 
 
 $('#upload-button').live('click', function() {
-  let pu = pendingUploads;
+  var pu = pendingUploads;
   pendingUploads = [];
 
   $('.pending-file').remove();
@@ -87,7 +87,7 @@
     //$('#upload-abort').removeClass('ui-disabled');
   }
 
-  for (let i = 0; i < pu.length; i++) {
+  for (var i = 0; i < pu.length; i++) {
     pu[i].submit();
   }
 });