Auto upload

This commit is contained in:
Tris 2020-10-27 16:22:42 +11:00
parent e2d6a6e8f6
commit 1b24a9258f
2 changed files with 7 additions and 3 deletions

View File

@ -7,9 +7,12 @@
{% for project in ensemble.active_projects %}
<a class="" href="{% url 'project_detail' pk=project.id %}">
<h3>{{ project.name }}</h3>
<p><small>Due in {{ project.deadline|timeuntil }}</small></p>
<p><small>Due in {{ project.deadline|timeuntil }}, {{ project.submissions.count }} submissions.</small></p>
</a>
{% endfor %}
</div>
<div style="text-align: right; margin-top: 10px; color: #999;">
<small>{{ ensemble.ensemble_code }}</small>
</div>
</div>
{% endblock %}

View File

@ -52,10 +52,10 @@ let fallback = {{ request.GET.fallback|yesno:"true,false,false" }};
Dropzone.options.itemUpload = {
params: dzData['fields'],
forceFallback: fallback,
autoProcessQueue: false,
autoProcessQueue: true,
createImageThumbnails: false,
//acceptedFiles: acceptFiles,
timeout: 3600000,
timeout: 36000000,
maxFiles: 1,
addRemoveLinks: true,
maxFilesize: 500,
@ -72,6 +72,7 @@ Dropzone.options.itemUpload = {
});
this.on('sending', function(f) {
status.html('Uploading - please wait...');
uploadBtn.attr('disabled', true);
});
this.on('success', function(f) {
status.html("Upload successfull");