Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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('|'));
		}
	})
	.disableSelection();
});

Related Tasks

Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.

  • No labels