1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-17 14:37:58 +00:00
seahub/templates/file_upload_progress_page.html

26 lines
923 B
HTML
Raw Normal View History

{% extends "myhome_base.html" %}
{% block extra_script %}
<script type="text/javascript">
// Update progress bar
function updateProgress() {
$.ajax({
2012-08-14 12:36:19 +00:00
url: '{{ httpserver_root }}/upload_progress/?X-Progress-ID=' + '{{ uuid }}' + '&callback=?',
dataType: 'jsonp',
cache: false,
success: function(data) {
if (data) {
$('#{{ upload_progress_con_id }} .upload-progress-text', window.parent.document).html(filesizeformat(data.uploaded, 2) + ' / ' + filesizeformat(data.length, 2));
$('#{{ upload_progress_con_id }} .upload-progress-bar', window.parent.document).progressbar({
value: data.uploaded / data.length * 100
});
}
}
});
setTimeout(updateProgress, 1000);
};
updateProgress();
</script>
{% endblock %}