-
Type: Feature Request
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 5.1.3
-
Fix Version/s: 5.2.0-RC1
-
Component/s: File Uploader
-
Labels:None
-
External issue URL:
-
Change Log Message:Allows to sort uploaded files
-
Story Points:1
-
External issue ID:1292
-
Copy Issue Key:
-
Patch Instructions:
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(); } );
jQuery sortable isn't included in in-portal, that's why by default you can't sort anything of course.