diff --git a/Resources/js/widget/file_upload.js b/Resources/js/widget/file_upload.js index c060a6096ee893904458eac05b396fe7f1d56fb8..77573e76075b5b9b860844bbc98ebb11c3cf7b93 100644 --- a/Resources/js/widget/file_upload.js +++ b/Resources/js/widget/file_upload.js @@ -109,7 +109,6 @@ function(response) { data.url = response.url; data.jqXHR = $this.fileupload('send', data); - data.context.find('.progress').show(); } ); return false; @@ -121,9 +120,12 @@ var progress = Math.floor(data.loaded / data.total * 100); data.context.each(function () { $(this).find('.progress') + .show() .attr('aria-valuenow', progress) .children().first().css('width',progress + '%'); - $(this).find('.progress-text').html(progress + '% ('+formatBitrate(data.bitrate)+')'); + $(this).find('.progress-text') + .show() + .html(progress + '% ('+formatBitrate(data.bitrate)+')'); }); } } diff --git a/Resources/views/Form/file_upload.html.twig b/Resources/views/Form/file_upload.html.twig index f80557300ed46d7041e30188c3987e0a19c2789a..fcf05f0dbe73e95953ea4de4fb8a64cba8e0b532 100644 --- a/Resources/views/Form/file_upload.html.twig +++ b/Resources/views/Form/file_upload.html.twig @@ -2,7 +2,7 @@ {% block file_upload_progress_prototype %} <div class="template-upload"> <p> - <span class="progress-text pull-right"></span> + <span class="progress-text pull-right" style="display: none"></span> <button class="btn btn-xs btn-danger cancel" title="{% trans %}button.cancel{% endtrans %}"> {{ irstea_icon('remove') }} </button> <span class="name"></span> (<span class="size"></span>)