Imported From: http://groups.google.com/group/in-portal-dev/browse_thread/thread/0683f0f0168547c8#
To make flash uploader even more powerful I'm proposing to add queue
sorting capability to it.
To allow that I've added *getSortedFiles *function, that allows to sort
uploaded files using uploader queue div IDs as input. As an example I've
used following code (see http://jqueryui.com/demos/sortable/#display-grid):
$(document).ready(
function () {
var $uploader_id = '<inp2:project_InputName name="Gallery"
js_escape="1"/>';
$('#' + jq($uploader_id + '_queueinfo'))
.sortable({
update: function(event, ui) {
var $new_order = $(this).sortable('toArray'),
$uploader = UploadsManager._Uploaders[$uploader_id],
$files = $uploader.getSortedFiles($new_order);
$('#' + jq($uploader_id + '[order]')).val($files.join('|'));
}