Mercurial > hg > orthanc
comparison OrthancExplorer/file-upload.js @ 3159:4cfed5c2eacd
added debug info for Orthanc issue #1
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 24 Jan 2019 10:54:47 +0100 |
parents | b311cff247ca |
children | fc9a4a2dad63 |
comparison
equal
deleted
inserted
replaced
3104:b311cff247ca | 3159:4cfed5c2eacd |
---|---|
1 var pendingUploads = []; | 1 var pendingUploads = []; |
2 var currentUpload = 0; | 2 var currentUpload = 0; |
3 var totalUpload = 0; | 3 var totalUpload = 0; |
4 var alreadyInitialized = false; // trying to debug Orthanc issue #1 | |
4 | 5 |
5 $(document).ready(function() { | 6 $(document).ready(function() { |
7 if (alreadyInitialized) { | |
8 console.log("Orthanc issue #1: the fileupload has been initialized twice !"); | |
9 } else { | |
10 alreadyInitialized = true; | |
11 } | |
12 | |
6 // Initialize the jQuery File Upload widget: | 13 // Initialize the jQuery File Upload widget: |
7 $('#fileupload').fileupload({ | 14 $('#fileupload').fileupload({ |
8 //dataType: 'json', | 15 //dataType: 'json', |
9 //maxChunkSize: 500, | 16 //maxChunkSize: 500, |
10 //sequentialUploads: true, | 17 //sequentialUploads: true, |
25 .css('width', '100%') | 32 .css('width', '100%') |
26 .css('background-color', 'red'); | 33 .css('background-color', 'red'); |
27 $('#progress .label').text('Failure'); | 34 $('#progress .label').text('Failure'); |
28 }) | 35 }) |
29 .bind('fileuploaddrop', function (e, data) { | 36 .bind('fileuploaddrop', function (e, data) { |
30 console.log("dropped " + data.files.length + " files"); | 37 console.log("dropped " + data.files.length + " files: ", data); |
31 appendFilesToUploadList(data.files); | 38 appendFilesToUploadList(data.files); |
32 }) | 39 }) |
33 .bind('fileuploadsend', function (e, data) { | 40 .bind('fileuploadsend', function (e, data) { |
34 // Update the progress bar. Note: for some weird reason, the | 41 // Update the progress bar. Note: for some weird reason, the |
35 // "fileuploadprogressall" does not work under Firefox. | 42 // "fileuploadprogressall" does not work under Firefox. |