Commit 35842bba authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

irsteaFileUpload: n'affiche la progression que si nécessaire.

Showing with 5 additions and 3 deletions
+5 -3
......@@ -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)+')');
});
}
}
......
......@@ -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>&nbsp;<span class="name"></span>&nbsp;(<span class="size"></span>)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment