Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base UI in Demo! #18

Open
jairot opened this issue Jul 30, 2014 · 2 comments
Open

Base UI in Demo! #18

jairot opened this issue Jul 30, 2014 · 2 comments

Comments

@jairot
Copy link

jairot commented Jul 30, 2014

I need to implement an UI more like the BASE UI in the original Jquery File Uploader

http://blueimp.github.io/jQuery-File-Upload/basic.html

Any idea how to do that? I have JFU running ok in my project but putting a simpler example in the demo would be nice.

@NicolasDumoulin
Copy link

I've tried with this template code:

{% extends 'jfu/upload_form.html' %}
{% block UPLOAD_FORM_BUTTON_BAR %}
<div class="row fileupload-buttonbar">
<div class="col-lg-7"><span class="btn btn-primary fileinput-button">
                <i class="glyphicon glyphicon-upload"></i>
                <span>Upload Kernel</span>
                <input type="file" name="files[]">
            </span>
</div>
</div>
{% endblock %}

{% block JS_OPTS %}
autoUpload: true,
maxNumberOfFiles: 1,
sequentialUploads: false,
done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name).appendTo(document.body);
            });
        }
{% endblock %}

I can pick up a file and send it to the server. But the transaction seems to not finish, as the progress bar is completed but doesn't disappear, and the "cancel" button remains too.

@NicolasDumoulin
Copy link

NicolasDumoulin commented Sep 30, 2016

Ok, I've fixed my callbacks and now it works :-)

done: function (e, data) {
    data.context.text('Upload finished.');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants