I'd just like to point out a minor issue I noted as I'm trying to implement this plugin. If you apply fileUpload to a form within a jQuery UI dialog element that is has the modal option enabled, the upload file button is not clickable. The obvious workaround is to not use a modal dialogue, but it would be ideal in some circumstances to be able to use that dialog feature in combination with this plugin. Below is a sample that should reproduce the problem with the latest jQuery/jQuery UI libraries. It seems that this is due to the presence of 'z-index: 2' for the '.file_upload input' class in the css file. Is that necessary (e.g., for browser compatibility)? I took it out, and it seems fine so far as I can tell.
var d = $('<div><form class="upload" action="upload.php" method="POST" enctype="multipart/form-data"><input type="file" name="file" multiple><button>Upload</button><div>Upload files</div></form><table class="upload_files"></table><table class="download_files"></table> </div>');
d.dialog({title:"Test File Upload",modal:true,
buttons:{
"Close":function()
{
t.dialog.dialog("close");
}
}
});
$('.upload').fileUploadUI({
uploadTable: $('.upload_files'),
downloadTable: $('.download_files'),
buildUploadRow: function (files, index) {
var file = files[index];
return $(
'<tr>' +
'<td>' + file.name + '<\/td>' +
'<td class="file_upload_progress"><div><\/div><\/td>' +
'<td class="file_upload_cancel">' +
'<div class="ui-state-default ui-corner-all ui-state-hover" title="Cancel">' +
'<span class="ui-icon ui-icon-cancel">Cancel<\/span>' +
'<\/div>' +
'<\/td>' +
'<\/tr>'
);
},
buildDownloadRow: function (file) {
return $(
'<tr><td>' + file.name + '<\/td><\/tr>'
);
}
});