Changeset 1324
- Timestamp:
- 06/18/12 09:17:26 (1 year ago)
- Location:
- trunk/plugins/MootoolsFileManager
- Files:
-
- 7 modified
-
MootoolsFileManager.FileManager.js (modified) (2 diffs)
-
MootoolsFileManager.ImageManager.js (modified) (3 diffs)
-
MootoolsFileManager.js (modified) (1 diff)
-
backend.php (modified) (2 diffs)
-
config.php (modified) (5 diffs)
-
mootools-filemanager/Assets/Connector/FileManager.php (modified) (3 diffs)
-
mootools-filemanager/Source/FileManager.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/MootoolsFileManager/MootoolsFileManager.FileManager.js
r1323 r1324 90 90 language: _editor_lang, 91 91 selectable: true, 92 upload: this.phpcfg. allow_files_upload,93 destroy: this.phpcfg. allow_files_delete,94 createFolders: this.phpcfg. allow_files_create_dir,95 rename: this.phpcfg. allow_files_move,96 move_or_copy: this.phpcfg. allow_files_move,97 download: this.phpcfg. allow_files_download,92 upload: this.phpcfg.files_allow_upload, 93 destroy: this.phpcfg.files_allow_delete, 94 createFolders: this.phpcfg.files_allow_create_dir, 95 rename: this.phpcfg.files_allow_move, 96 move_or_copy: this.phpcfg.files_allow_move, 97 download: this.phpcfg.files_allow_download, 98 98 99 99 propagateData: Object.merge({'__function': 'file-manager'}, this.editor.config.MootoolsFileManager.backend_data), … … 117 117 118 118 showDirGallery: false, 119 keyboardNavigation: false 119 keyboardNavigation: false, 120 listType: this.phpcfg.files_list_type, 121 listPaginationSize: this.phpcfg.files_pagination_size, 122 listMaxSuggestedDirSizeForThumbnails: this.phpcfg.files_list_mode_over, 123 directory: this.phpcfg.files_list_start_in 120 124 }); 121 125 } -
trunk/plugins/MootoolsFileManager/MootoolsFileManager.ImageManager.js
r1323 r1324 70 70 selectable: true, 71 71 72 upload: this.phpcfg. allow_images_upload,73 destroy: this.phpcfg. allow_images_delete,74 createFolders: this.phpcfg. allow_images_create_dir,75 rename: this.phpcfg. allow_images_move,76 move_or_copy: this.phpcfg. allow_images_move,77 download: this.phpcfg. allow_images_download,72 upload: this.phpcfg.images_allow_upload, 73 destroy: this.phpcfg.images_allow_delete, 74 createFolders: this.phpcfg.images_allow_create_dir, 75 rename: this.phpcfg.images_allow_move, 76 move_or_copy: this.phpcfg.images_allow_move, 77 download: this.phpcfg.images_allow_download, 78 78 79 79 propagateData: Object.merge({'__function': 'image-manager'}, this.editor.config.MootoolsFileManager.backend_data), … … 97 97 98 98 showDirGallery: false, 99 keyboardNavigation: false 99 keyboardNavigation: false, 100 listType: this.phpcfg.images_list_type, 101 listPaginationSize: this.phpcfg.images_pagination_size, 102 listMaxSuggestedDirSizeForThumbnails: this.phpcfg.images_list_mode_over, 103 directory: this.phpcfg.images_list_start_in 100 104 }); 101 105 } 106 102 107 if(Xinha.is_ie) this.current_selection = this.editor.saveSelection(); 103 108 … … 240 245 } 241 246 242 if(self.phpcfg. UseHSpaceVSpace)247 if(self.phpcfg.images_use_hspace_vspace) 243 248 { // HSPACE/VSPACE 244 249 var th = tr.appendChild(document.createElement('th')); -
trunk/plugins/MootoolsFileManager/MootoolsFileManager.js
r1321 r1324 57 57 { 58 58 __MFM_USE_FLASH__ = true; 59 } 60 61 if(typeof __MFM_USE_BACK_BUTTON_NAVIGATION__ == 'undefined') 62 { 63 __MFM_USE_BACK_BUTTON_NAVIGATION__ = false; 59 64 } 60 65 -
trunk/plugins/MootoolsFileManager/backend.php
r1321 r1324 116 116 'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 117 117 118 'upload' => $IMConfig[' allow_images_upload'],119 'destroy' => $IMConfig[' allow_images_delete'],120 'create' => $IMConfig[' allow_images_create_dir'],121 'move' => $IMConfig[' allow_images_move'],122 'download' => $IMConfig[' allow_images_download'],118 'upload' => $IMConfig['images_allow_upload'], 119 'destroy' => $IMConfig['images_allow_delete'], 120 'create' => $IMConfig['images_allow_create_dir'], 121 'move' => $IMConfig['images_allow_move'], 122 'download' => $IMConfig['images_allow_download'], 123 123 124 124 125 'maxUploadSize' => size_to_bytes($IMConfig[' max_images_upload_size']),126 'suggestedMaxImageDimension' => $IMConfig[' suggested_images_image_dimension'],125 'maxUploadSize' => size_to_bytes($IMConfig['images_max_upload_size']), 126 'suggestedMaxImageDimension' => $IMConfig['images_suggested_image_dimension'], 127 127 'thumbnailsMustGoThroughBackend' => FALSE, 128 128 'filter' => 'image/', … … 152 152 'assetBasePath' => $IMConfig['base_url'] .'/mootools-filemanager/Assets', 153 153 154 'upload' => $IMConfig[' allow_files_upload'],155 'destroy' => $IMConfig[' allow_files_delete'],156 'create' => $IMConfig[' allow_files_create_dir'],157 'move' => $IMConfig[' allow_files_move'],158 'download' => $IMConfig[' allow_files_download'],154 'upload' => $IMConfig['files_allow_upload'], 155 'destroy' => $IMConfig['files_allow_delete'], 156 'create' => $IMConfig['files_allow_create_dir'], 157 'move' => $IMConfig['files_allow_move'], 158 'download' => $IMConfig['files_allow_download'], 159 159 160 160 161 'maxUploadSize' => size_to_bytes($IMConfig[' max_files_upload_size']),162 'suggestedMaxImageDimension' => $IMConfig[' suggested_files_image_dimension'],161 'maxUploadSize' => size_to_bytes($IMConfig['files_max_upload_size']), 162 'suggestedMaxImageDimension' => $IMConfig['files_suggested_image_dimension'], 163 163 'thumbnailsMustGoThroughBackend' => FALSE, 164 164 // 'filter' => $IMConfig['files_filter'], -
trunk/plugins/MootoolsFileManager/config.php
r1321 r1324 112 112 */ 113 113 114 $IMConfig[' allow_files_upload'] = false;115 $IMConfig[' allow_files_delete'] = false;116 $IMConfig[' max_files_upload_size'] = '3M';117 $IMConfig[' suggested_files_image_dimension'] = array('width' => 2048, 'height' => 1536);118 119 $IMConfig[' allow_images_upload'] = false;120 $IMConfig[' allow_images_delete'] = false;121 $IMConfig[' max_images_upload_size'] = '3M';122 $IMConfig[' suggested_images_image_dimension'] = array('width' => 1024, 'height' => 768);114 $IMConfig['files_allow_upload'] = false; 115 $IMConfig['files_allow_delete'] = false; 116 $IMConfig['files_max_upload_size'] = '3M'; 117 $IMConfig['files_suggested_image_dimension'] = array('width' => 2048, 'height' => 1536); 118 119 $IMConfig['images_allow_upload'] = false; 120 $IMConfig['images_allow_delete'] = false; 121 $IMConfig['images_max_upload_size'] = '3M'; 122 $IMConfig['images_suggested_image_dimension'] = array('width' => 1024, 'height' => 768); 123 123 124 124 … … 129 129 /** Expanded Permissions */ 130 130 131 $IMConfig['allow_images_create_dir'] = NULL; // Defaults to allow_images_upload 132 $IMConfig['allow_images_move'] = false; 133 $IMConfig['allow_images_download'] = false; 134 135 $IMConfig['allow_files_create_dir'] = NULL; // Defaults to allow_files_upload 136 $IMConfig['allow_files_move'] = false; 137 $IMConfig['allow_files_download'] = false; 138 139 131 $IMConfig['images_allow_create_dir'] = NULL; // Defaults to allow_images_upload 132 $IMConfig['images_allow_move'] = false; 133 $IMConfig['images_allow_download'] = false; 134 135 $IMConfig['files_allow_create_dir'] = NULL; // Defaults to allow_files_upload 136 $IMConfig['files_allow_move'] = false; 137 $IMConfig['files_allow_download'] = false; 138 139 /** Listing Mode Configuration */ 140 141 $IMConfig['images_list_type'] = 'list'; // Or 'thumb' 142 $IMConfig['images_pagination_size'] = 10000; // By default, a large number to avoid pagination strongly 143 // The MFM may reduce this automatically however. 144 $IMConfig['images_list_mode_over'] = 30; // If a folder contains more than this many entries 145 // it will fall back to 'list' mode when in 'thumb' mode 146 // the user can switch back to 'thumb' if they want. 147 $IMConfig['images_list_start_in'] = NULL; // You can set this to a path relative to the images_dir 148 149 150 $IMConfig['files_list_type'] = 'list'; // Or 'thumb' 151 $IMConfig['files_pagination_size'] = 10000; // By default, a large number to avoid pagination strongly 152 // The MFM may reduce this automatically however. 153 $IMConfig['files_list_mode_over'] = 30; // If a folder contains more than this many entries 154 // it will fall back to 'list' mode when in 'thumb' mode 155 // the user can switch back to 'thumb' if they want. 156 $IMConfig['files_list_start_in'] = NULL; // You can set this to a path relative to the images_dir 157 140 158 /** 141 159 … … 154 172 == HTML Compatability == 155 173 156 For most people the default of using CSS will be fine, but if the HTML you are editing 157 in Xinha is destined for an email you will probably want to use hspace and vspace 158 instead of CSS margins because of poor Email support for CSS. 174 If the HTML you are editing in Xinha is destined for an email you will probably want to use hspace and vspace instead of CSS margins because of poor Email support for CSS. 159 175 160 176 */ 161 177 162 $IMConfig['UseHSpaceVSpace'] = TRUE; 163 164 /** 165 // Future use, not yet required. 166 167 == ImageMagick Path == 168 169 Certain operations require that ImageMagick is available on your server, 170 mogrify, convert and identify executables are required. 171 172 If these executables are not in your executable path, you'll want to 173 set the path to them here, for Linux/Unix etc this will be something like 174 175 {{{ 176 /usr/bin 177 }}} 178 179 for Windows servers, something like 180 181 {{{ 182 C:/"Program Files"/ImageMagick-5.5.7-Q16/ 183 }}} 184 185 186 187 $IMConfig['IMAGE_TRANSFORM_LIB_PATH'] = ''; 188 */ 178 $IMConfig['images_use_hspace_vspace'] = TRUE; 189 179 190 180 //////////////////////////////////////////////////////////////////////////////// 191 181 // ================== END OF CONFIGURATION ======================= // 192 182 //////////////////////////////////////////////////////////////////////////////// 193 194 183 195 184 // Standard PHP Backend Data Passing … … 204 193 @session_write_close(); // Close session now so we don't lock. 205 194 195 // Back Compat, Some of our config options have been renamed, 196 // if the old name is present, that takes precendence. 197 $RenamedConfigVars = array( 198 'UseHSpaceVSpace' => 'images_use_hspace_vspace', 199 200 'allow_files_upload' => 'files_allow_upload', 201 'allow_files_delete' => 'files_allow_delete', 202 'allow_files_create_dir' => 'files_allow_create_dir', 203 'allow_files_move' => 'files_allow_move', 204 'allow_files_download' => 'files_allow_download', 205 206 'max_files_upload_size' => 'files_max_upload_size', 207 'suggested_files_image_dimension' => 'files_suggested_image_dimension', 208 209 'allow_images_upload' => 'images_allow_upload', 210 'allow_images_delete' => 'images_allow_delete', 211 'allow_images_create_dir' => 'images_allow_create_dir', 212 'allow_images_move' => 'images_allow_move', 213 'allow_images_download' => 'images_allow_download', 214 215 'max_images_upload_size' => 'images_max_upload_size', 216 'suggested_images_image_dimension' => 'images_suggested_image_dimension', 217 ); 218 219 foreach($RenamedConfigVars as $Old => $New) 220 { 221 if(isset($IMConfig[$Old])) 222 { 223 $New = $IMConfig[$Old]; 224 unset($IMConfig[$Old]); 225 } 226 } 227 206 228 if(!isset($IMConfig['thumbs_dir'])) 207 229 { … … 214 236 } 215 237 216 if(!isset($IMConfig[' allow_images_create_dir']))217 { 218 $IMConfig[' allow_images_create_dir'] = $IMConfig['allow_images_upload'];219 } 220 221 if(!isset($IMConfig[' allow_files_create_dir']))222 { 223 $IMConfig[' allow_files_create_dir'] = $IMConfig['allow_files_upload'];238 if(!isset($IMConfig['images_allow_create_dir'])) 239 { 240 $IMConfig['images_allow_create_dir'] = $IMConfig['images_allow_upload']; 241 } 242 243 if(!isset($IMConfig['files_allow_create_dir'])) 244 { 245 $IMConfig['files_allow_create_dir'] = $IMConfig['files_allow_upload']; 224 246 } 225 247 -
trunk/plugins/MootoolsFileManager/mootools-filemanager/Assets/Connector/FileManager.php
r1321 r1324 1044 1044 'showHiddenFoldersAndFiles' => false, // Hide dot dirs/files ? 1045 1045 'useGetID3IfAvailable' => true, 1046 'enableXSendFile' => false 1046 'enableXSendFile' => false, 1047 'readme_file' => '.readme.html', // If a directory contains a file of this name, the contents of this file 1048 // will be returned in the ajax. The MFM front end will display this in 1049 // the preview area, provided there is nothing else to display there. 1050 // Useful for displaying help text. The file should only be an 1051 // html snippet, not a complete html file. 1052 1047 1053 ), (is_array($options) ? $options : array())); 1048 1054 … … 1366 1372 'mime' => 'text/directory', 1367 1373 'icon48' => $icon48_de, 1368 'icon' => $icon_de 1374 'icon' => $icon_de, 1375 'readme' => file_exists($dir . '/' . $this->options['readme_file']) 1376 ? file_get_contents($dir . '/' . $this->options['readme_file']) 1377 : null, 1369 1378 ), 1370 1379 'preselect_index' => ($file_preselect_index >= 0 ? $file_preselect_index + count($out[1]) + 1 : 0), … … 3562 3571 if(function_exists('exif_imagetype') && exif_imagetype($file) !== FALSE) 3563 3572 { 3564 $rv['exif'] = exif_read_data($file, 0, true);3573 $rv['exif'] = @exif_read_data($file, 0, true); 3565 3574 $rv['jpg']['exif'] = $rv['exif']; // Not strictly true! 3566 3575 } -
trunk/plugins/MootoolsFileManager/mootools-filemanager/Source/FileManager.js
r1321 r1324 101 101 listPaginationSize: 100, // add pagination per N items for huge directories (speed up interaction) 102 102 listPaginationAvgWaitTime: 2000, // adaptive pagination: strive to, on average, not spend more than this on rendering a directory chunk 103 103 listMaxSuggestedDirSizeForThumbnails: 30, // if a directory load has more than this many items (dirs+files), and the view mode is currently thumbs 104 // it is dropped back to the listing view mode, the user can still switch back, at their own risk! 104 105 standalone: true, // (boolean). Default to true. If set to false, returns the Filemanager without enclosing window / overlay. 105 106 parentContainer: null, // (string). ID of the parent container. If not set, FM will consider its first container parent for fitSizes(); … … 387 388 if(this.listType == 'thumb') { 388 389 this.browserMenu_thumb.setStyle('opacity',1); 389 this.browserMenu_list.setStyle('opacity',0.5); 390 } 391 392 // set startup list type 393 if(this.options.thumbnailList === true) 394 this.toggleList.bind(this); 390 this.browserMenu_list.setStyle('opacity',0.5); 391 this.browserMenu_thumb.store('set', true); 392 this.browserMenu_list.store('set', false); 393 } 394 else 395 { 396 this.browserMenu_thumb.setStyle('opacity',0.5); 397 this.browserMenu_list.setStyle('opacity',1); 398 this.browserMenu_thumb.store('set', false); 399 this.browserMenu_list.store('set', true); 400 } 395 401 396 402 // Add a scroller to scroll the browser list when dragging a file … … 865 871 toggleList: function(e) { 866 872 if (e) e.stop(); 867 873 if(e && e.target && document.id(e.target).retrieve('set', false)) return; // Already Set 874 868 875 $$('.filemanager-browserheader a.listType').setStyle('opacity',0.5); 869 876 if (!this.browserMenu_thumb.retrieve('set',false)) { … … 1325 1332 return; 1326 1333 } 1327 1334 1335 if(this.listType == 'thumb' && (j.files.length + j.dirs.length) > this.options.listMaxSuggestedDirSizeForThumbnails) 1336 { 1337 this.listType = 'list'; 1338 this.browserMenu_thumb.setStyle('opacity',0.5); 1339 this.browserMenu_list.setStyle('opacity',1); 1340 this.browserMenu_thumb.store('set', false); 1341 this.browserMenu_list.store('set', true); 1342 } 1343 1328 1344 // make sure we store the JSON list! 1329 1345 this.reset_view_fill_store(j); … … 2321 2337 // Besides, fetching the thumbs and all right after we render the directory also makes these thumbs + metadata available for drag&drop gallery and 2322 2338 // 'select mode', so they don't always have to ask for the meta data when it is required there and then. 2323 if (file.thumb48 || /* this.listType !== 'thumb' || */!file.thumbs_deferred)2339 if (file.thumb48 || this.listType !== 'thumb' || !file.thumbs_deferred) 2324 2340 { 2325 2341 // This is just a raw image … … 2958 2974 2959 2975 this.diag.log('fillInfo: request detail for file: ', Object.clone(file), ', dir: ', dir); 2960 if(this.options.showDirGallery === false && file.mime === 'text/directory') return; 2976 if(file.mime === 'text/directory') 2977 { 2978 if(file.readme && file.readme.length) { this.preview.set('html', file.readme); this.preview_area.setStyle('display', 'block').fade('in'); return; } 2979 if(this.options.showDirGallery === false) return; 2980 } 2981 2961 2982 var tx_cfg = this.options.mkServerRequestURL(this, 'detail', { 2962 2983 directory: this.dirname(file.path), … … 2965 2986 filter: this.options.filter, 2966 2987 // provide either direct links to the thumbnails (when available in cache) or PHP event trigger URLs for delayed thumbnail image creation (performance optimization: faster page render): 2967 mode: ' auto' + this.options.detailInfoMode2988 mode: 'direct' + this.options.detailInfoMode 2968 2989 }); 2969 2990 … … 3619 3640 Asset.css(__MFM_ASSETS_DIR__+'/Css/FileManager_ie7.css'); 3620 3641 } 3621 Asset.javascript(__MFM_ASSETS_DIR__+'/js/jsGET.js', { 3622 events: { 3623 load: (function() { 3624 window.fireEvent('jsGETloaded'); 3625 }).bind(this) 3626 } 3627 }); 3642 3643 3644 if( __MFM_USE_BACK_BUTTON_NAVIGATION__ ) 3645 { 3646 Asset.javascript(__MFM_ASSETS_DIR__+'/js/jsGET.js', { 3647 events: { 3648 load: (function() { 3649 window.fireEvent('jsGETloaded'); 3650 }).bind(this) 3651 } 3652 }); 3653 } 3628 3654 3629 3655 Element.implement({
