Skip to content

Commit

Permalink
pop up modal close and upload job progress UI changes
Browse files Browse the repository at this point in the history
(cherry picked from commit f2fb733)
  • Loading branch information
Athithyaa Selvam committed Oct 25, 2023
1 parent 221ed19 commit 6d1d871
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions apps/filebrowser/src/filebrowser/templates/listdir_components.mako
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ else:
<span class="muted qq-upload-size-selector"></span>&nbsp;&nbsp;
<a href="#" title="${_('Cancel')}" class="complex-layout"><i class="fa fa-fw fa-times qq-upload-cancel-selector"></i></a>
<span class="qq-upload-done-selector" style="display:none"><i class="fa fa-fw fa-check muted"></i></span>
<span class="qq-upload-failed-text-selector">${_('Failed')}</span>
<span class="qq-upload-failed-text-selector">${_('Hello Failed')}</span>
</div>
<div class="progress-row-bar" style="width: 0%;"></div>
</div>
Expand Down Expand Up @@ -2085,10 +2085,12 @@ else:
// totalFileSize: "qqtotalfilesize",
// totalParts: "qqtotalparts"
// },
onProgress: function (id, fileName, loaded, total) {
callbacks: {
onProgress: function (id, fileName, loaded, total) {
console.log(loaded);
$('.qq-upload-files').find('li').each(function(){
var listItem = $(this);
if (listItem.find('.qq-upload-file-extended').text() == fileName){
if (listItem.find('.qq-upload-file-selector').text() == fileName){
listItem.find('.progress-row-bar').css('width', (loaded/total)*100 + '%');
}
});
Expand All @@ -2107,12 +2109,22 @@ else:
self.retrieveData(true);
}
},
onTotalProgress: function(totalUploadedBytes, totalBytes) {
if (totalUploadedBytes == totalBytes) {
}
},
onAllComplete: function(succeeded, failed){
$('#uploadFileModal').modal('hide');
},
onSubmit: function (id, fileName, responseJSON) {
self.pendingUploads(self.pendingUploads() + 1);
},
onCancel: function (id, fileName) {
self.pendingUploads(self.pendingUploads() - 1);
}
},
debug: false
});
Expand Down

0 comments on commit 6d1d871

Please sign in to comment.