Mercurial > hg > orthanc
comparison OrthancExplorer/file-upload.js @ 3160:fc9a4a2dad63
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 24 Jan 2019 10:55:19 +0100 |
parents | 4cfed5c2eacd 495ec3d3893d |
children |
comparison
equal
deleted
inserted
replaced
3159:4cfed5c2eacd | 3160:fc9a4a2dad63 |
---|---|
59 | 59 |
60 $('#fileupload').live('change', function (e) { | 60 $('#fileupload').live('change', function (e) { |
61 appendFilesToUploadList(e.target.files); | 61 appendFilesToUploadList(e.target.files); |
62 }) | 62 }) |
63 | 63 |
64 $('#upload').live('pageshow', function() { | 64 |
65 function ClearUploadProgress() | |
66 { | |
67 $('#progress .label').text(''); | |
68 $('#progress .bar').css('width', '0%').css('background-color', '#333'); | |
69 } | |
70 | |
71 $('#upload').live('pagebeforeshow', function() { | |
65 if (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) { | 72 if (navigator.userAgent.toLowerCase().indexOf('firefox') == -1) { |
66 $("#issue-21-warning").css('display', 'none'); | 73 $("#issue-21-warning").css('display', 'none'); |
67 } | 74 } |
68 | 75 |
69 // alert('WARNING - This page is currently affected by Orthanc issue #21: ' + | 76 ClearUploadProgress(); |
70 // '"DICOM files might be missing after uploading with Mozilla Firefox." ' + | 77 }); |
71 // 'Do not use this upload feature for clinical uses, or carefully ' + | 78 |
72 // 'check that all instances have been properly received by Orthanc. ' + | 79 $('#upload').live('pageshow', function() { |
73 // 'Please use the command-line "ImportDicomFiles.py" script to circumvent this issue.'); | |
74 $('#fileupload').fileupload('enable'); | 80 $('#fileupload').fileupload('enable'); |
75 }); | 81 }); |
76 | 82 |
77 $('#upload').live('pagehide', function() { | 83 $('#upload').live('pagehide', function() { |
78 $('#fileupload').fileupload('disable'); | 84 $('#fileupload').fileupload('disable'); |
83 var pu = pendingUploads; | 89 var pu = pendingUploads; |
84 pendingUploads = []; | 90 pendingUploads = []; |
85 | 91 |
86 $('.pending-file').remove(); | 92 $('.pending-file').remove(); |
87 $('#upload-list').listview('refresh'); | 93 $('#upload-list').listview('refresh'); |
88 $('#progress .bar').css('width', '0%'); | 94 ClearUploadProgress(); |
89 $('#progress .label').text(''); | |
90 | 95 |
91 currentUpload = 1; | 96 currentUpload = 1; |
92 totalUploads = pu.length + 1; | 97 totalUploads = pu.length + 1; |
93 if (pu.length > 0) { | 98 if (pu.length > 0) { |
94 $('#upload-button').addClass('ui-disabled'); | 99 $('#upload-button').addClass('ui-disabled'); |