Launch File Manager With Filters

Permalink
Hi,

I'd like to launch the File Manager from a single page using some filters, driven by a Redactor plugin that replaces the normal image select button.

I've worked out how to filter images only. However I need to pre-select a File Set. The resulting File Manager dialogue should show only Images in a given file set. Here's where I've got to:

opts = {filters:[{field: 'type', type: 1}]}; // Only images
$('a[data-action=choose-image-from-file-manager]').on('click', function(e) {
   e.preventDefault();
   ConcreteFileManager.launchDialog(function(data) {
      jQuery.fn.dialog.showLoader();
      ConcreteFileManager.getFileDetails(data.fID, function(r) {
         jQuery.fn.dialog.hideLoader();
         var file = r.files[0];
         $('#redactor-image-link').val(file.urlInline);
      });
   }, opts);
});


(full plugin code attached)

1 Attachment

 
surefyre replied on at Permalink Reply
surefyre
I also need to be able to use filters to display files in a particular set. Can find no ducmentation at all on this and I don't have time to try reverse engineering the JS that the picker loads for the filterArgs parameter.
surefyre replied on at Permalink Reply
surefyre
I also need to be able to use filters to display files in a particular set. Can find no ducmentation at all on this and I don't have time to try reverse engineering the JS that the picker loads for the filterArgs parameter.