Reputation: 10061
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
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
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