Ignore:
Timestamp:
04/01/11 14:24:09 (8 years ago)
Author:
gogo
Message:

Updates to http://www.github.com/sleemanj/mootools-filemanager from GerHoblett?

http://www.github.com/GerHoblett/

Changes to said updates by gogo (sleemanj @ github)

Modifications to MootoolsFileManager? to work with those updates, some courtesy of GerHoblett?, some sleemanj

GerHoblett? provided a large diff which accomplished the goal in a quite different way. It has merit, however I have opted for a less-affecting path in so far as Xinha's "way" is concerned, namely, not splitting the config for a single plugin into several calls to backend config passing functions which seemed a little cumbersome.

Instead I take the option of using POST to send backend data around, at the minor expense of an extra round trip when displaying thumbnails (for each one). This could be reduced by checking for thumbnail existence and returning the thumbnail name directly in "onView" rather than the backend request to generate said thumbnail.

Still to do, is to make the preview pane thumbnail also work.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/backend.php

    r1300 r1302  
    9898 
    9999  case 'image-manager': 
    100     include('mootools-filemanager/Assets/Connector/FileManager.php'); 
    101  
    102     $browser = new FileManager(array( 
    103       'directory'     => $IMConfig['images_dir'], 
    104       'baseURL'       => $IMConfig['images_url'], 
    105       'thumbnailPath' => $IMConfig['thumbs_dir'], 
     100    // include('mootools-filemanager/Assets/Connector/FileManager.php'); 
     101    include('XinhaFileManager.php'); 
     102     
     103    $browser = new XinhaFileManager(array( 
     104      'images_dir'    => $IMConfig['images_dir'], 
     105      'images_url'    => $IMConfig['images_url'], 
     106       
     107      'thumbs_dir'    => $IMConfig['thumbs_dir'], 
     108      'thumbs_url'    => $IMConfig['thumbs_url'], 
    106109       
    107110      'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 
    108111       
    109112      'upload'        => $IMConfig['allow_images_upload'], 
    110       'create'        => $IMConfig['allow_images_upload'], 
    111       'maxUploadSize' => size_to_bytes($IMConfig['max_images_upload_size']), 
     113      'destroy'       => $IMConfig['allow_images_delete'],       
     114      'create'        => $IMConfig['allow_images_create_dir'], 
     115      'move'          => $IMConfig['allow_images_move'], 
     116      'download'      => $IMConfig['allow_images_download'], 
    112117       
     118       
     119      'maxUploadSize' => size_to_bytes($IMConfig['max_images_upload_size']),       
    113120      'suggestedMaxImageDimension' => $IMConfig['suggested_images_image_dimension'], 
    114              
    115       'destroy'       => $IMConfig['allow_images_delete'], 
    116       'filter'        => 'image/', 
    117              
     121                   
     122      'filter'        => 'image/',             
    118123    )); 
    119124 
     
    125130 
    126131    $browser = new FileManager(array( 
    127       'directory'     => $IMConfig['files_dir'], 
    128       'baseURL'       => $IMConfig['files_url'], 
    129       'thumbnailPath' => $IMConfig['thumbs_dir'], 
     132      'files_dir'     => $IMConfig['files_dir'], 
     133      'files_url'     => $IMConfig['files_url'], 
     134       
     135      'thumbs_dir'    => $IMConfig['thumbs_dir'], 
     136      'thumbs_url'    => $IMConfig['thumbs_dir'], 
    130137       
    131138      'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 
    132139       
    133140      'upload'        => $IMConfig['allow_files_upload'], 
    134       'create'        => $IMConfig['allow_files_upload'], 
    135       'maxUploadSize' => size_to_bytes($IMConfig['max_files_upload_size']), 
     141      'destroy'       => $IMConfig['allow_files_delete'], 
     142      'create'        => $IMConfig['allow_files_create_dir'], 
     143      'move'          => $IMConfig['allow_files_move'], 
     144      'download'      => $IMConfig['allow_files_download'], 
    136145       
     146       
     147      'maxUploadSize' => size_to_bytes($IMConfig['max_files_upload_size']),       
    137148      'suggestedMaxImageDimension' => $IMConfig['suggested_files_image_dimension'], 
    138149             
    139       'destroy'       => $IMConfig['allow_files_delete'], 
    140150     // 'filter'        => $IMConfig['files_filter'], 
    141151             
Note: See TracChangeset for help on using the changeset viewer.