1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-10 21:22:35 +01:00

Merge branch 'master' of github.com:mozilla/send into localization

This commit is contained in:
Abhinav Adduri 2017-07-19 11:37:52 -07:00
commit 69055a504b

View File

@ -94,6 +94,8 @@ $(document).ready(function() {
$('#page-one').hide(); $('#page-one').hide();
$('#upload-error').hide(); $('#upload-error').hide();
$('#upload-progress').show(); $('#upload-progress').show();
//don't allow drag and drop when not on page-one
$('body').off('drop', onUpload);
const percent = progress[0] / progress[1]; const percent = progress[0] / progress[1];
// update progress bar // update progress bar
$('#ul-progress').circleProgress('value', percent); $('#ul-progress').circleProgress('value', percent);
@ -102,21 +104,15 @@ $(document).ready(function() {
}); });
if (progress[1] < 1000000) { if (progress[1] < 1000000) {
$('.progress-text').text( $('.progress-text').text(
`${file.name} (${(progress[0] / 1000).toFixed( `${file.name} (${(progress[0] / 1000).toFixed(1)}KB of ${(progress[1] / 1000).toFixed(1)}KB)`
1
)}KB of ${(progress[1] / 1000).toFixed(1)}KB)`
); );
} else if (progress[1] < 1000000000) { } else if (progress[1] < 1000000000) {
$('.progress-text').text( $('.progress-text').text(
`${file.name} (${(progress[0] / 1000000).toFixed( `${file.name} (${(progress[0] / 1000000).toFixed(1)}MB of ${(progress[1] / 1000000).toFixed(1)}MB)`
1
)}MB of ${(progress[1] / 1000000).toFixed(1)}MB)`
); );
} else { } else {
$('.progress-text').text( $('.progress-text').text(
`${file.name} (${(progress[0] / 1000000).toFixed( `${file.name} (${(progress[0] / 1000000).toFixed(1)}MB of ${(progress[1] / 1000000000).toFixed(1)}GB)`
1
)}MB of ${(progress[1] / 1000000000).toFixed(1)}GB)`
); );
} }
}); });