StreetCoder
StreetCoder

Reputation: 10061

don't want to hide queue item bar after upload complete in uploadify

I am using uploadify in one application. I have successfully implemented it. I got that after complete the upload files, the files' queue bar hide slowly. But I do not want to hide this bar because I am able to understand how many files being uploaded as well as which files. I have tried to write something as 'onUploadComplete' : function() { $('.uploadify-queue').show(); }

But no luck. Is there any option not hide the queue bar of uploadify.

Upvotes: 3

Views: 892

Answers (2)

userlond
userlond

Reputation: 3828

Basic idea is to clone original block into another and define own rules of closing:

$('#file_upload').uploadify({
    // other options

    'onUploadSuccess': function (file, data, response) {
        // clone block to another to prevent hidding
        var blockOld = $('#' + file.id);
        var block = blockOld
                .clone()
                .removeAttr('id')
                .insertAfter(blockOld);
        // remove original block
        blockOld.remove();

        // close block on cancel button click
        block.find('.cancel').click(function () {
            $(this)
                .closest('.uploadify-queue-item')
                .fadeOut(function () {
                    $(this).remove();
                })
            ;
        });
    }
});

Upvotes: 0

user3800502
user3800502

Reputation: 41

$('#file_upload').uploadify({
    'swf'      : '/js/uploadify/uploadify.swf',
    'uploader' : '/js/uploadify/uploadify.php',
    'method'   : 'post',
    'formData' : { 'someKey' : 'someValue' },
    'auto'     : false,
    'buttonClass' : 'form-control',
    'removeCompleted' : false
});

use removeCompleted : false

Upvotes: 4

Related Questions