Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1061

Allow sorting of uploaded files

    XMLWordPrintable

    Details

    • 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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: