Permalink
Browse files

updated/augmented documentation

  • Loading branch information...
1 parent 9413574 commit 735c2cc951c97264d543c916fd27d5969a9e45d2 @GerHobbelt GerHobbelt committed Mar 30, 2011
Showing with 37 additions and 11 deletions.
  1. +17 −1 Assets/Connector/FileManager.php
  2. +6 −4 README.md
  3. +1 −1 Source/FileManager.TinyMCE.js
  4. +13 −5 Source/FileManager.js
@@ -244,7 +244,9 @@
* $_POST[session_name()] value to manually set the PHP session_id() before you start your your session
* again.
*
- * The frontend-specified options.uploadAuthData items will be available as further $_GET[] items, as well.
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
+ * The frontend-specified options.uploadAuthData items will be available as $_POST[] items.
*
*
* 'download':
@@ -267,6 +269,8 @@
*
* 'mime_filters' (optional, array of strings) the set of allowed mime types, derived from the 'mime_filter' setting.
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'create': // create directory
*
@@ -292,6 +296,8 @@
*
* 'chmod' (integer) UNIX access rights (default: 0777) for the directory-to-be-created (RWX for user,group,world)
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'destroy':
*
@@ -320,6 +326,8 @@
* The design idea behind this approach is that you are only allowed what you can see ('view'), so
* all 'view' restrictions should equally to the 'delete' operation.
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'move': // move or copy!
*
@@ -360,6 +368,8 @@
*
* 'function' (string) PHP call which will perform the operation. ('rename' or 'copy')
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'view':
*
@@ -393,6 +403,8 @@
* we are performing a view operation as the second part of another otherwise failed action, e.g. a
* failed 'create directory'.
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'detail':
*
@@ -416,6 +428,8 @@
*
* 'mime_filters' (optional, array of strings) the set of allowed mime types, derived from the 'mime_filter' setting.
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
* 'thumbnail':
*
@@ -441,6 +455,8 @@
*
* 'requested_size' (integer) the size (maximum width and height) in pixels of the thumbnail to be produced.
*
+ * The frontend-specified options.propagateData items will be available as $_GET[] items.
+ *
*
*
* Developer Notes:
View
@@ -92,11 +92,13 @@ Options if Uploader is included
Events
-* onComplete(path, file): fired when a file gets selected via the "Select file" button
+* onComplete(path, file, legal_url, cur_dir, url): fired when a file gets selected via the "Select file" button
* onModify(file): fired when a file gets renamed/deleted or modified in another way
-* onShow: fired when the FileManager opens
-* onHide: event fired when FileManager closes
-* onPreview: event fired when the user clicks an image in the preview
+* onShow(): fired when the FileManager opens
+* onHide(): event fired when FileManager closes
+* onPreview(src): event fired when the user clicks an image in the preview
+* onDetails(json): event fired when an item is picked form the files list, supplies object (e.g. {width: 123, height:456} )
+* onHidePreview(): event fired when the preview is hidden (e.g. when uploading)
Backend
@@ -21,7 +21,7 @@ FileManager.TinyMCE = function(options){
/*
* field: Id of the element to set value in.
* url: value currently stored in the indicated element
- * type: Type of browser to open image/file/flash.
+ * type: Type of browser to open image/file/flash: 'file' ~ page links, 'image' ~ insert picture, 'media' ~ insert media/movie
* win: window object reference
*/
return function(field, url, type, win){
View
@@ -28,13 +28,21 @@ var FileManager = new Class({
options: {
/*
- onComplete: function(){},
- onModify: function(){},
+ onComplete: function(path, // URLencoded 'legal URI space' path to selected file
+ file, // the file specs object: .dir, .name, .path, .size, .date, .mime, .icon, .thumbnail
+ legal_url, // (file.dir + file.name): the 'legal URI space' path to selected file (NOT URLencoded!)
+ cur_dir, // (this.CurrentPath): the absolute URL for the current directory
+ url // ('/' + this.root + file.dir + file.name): the absolute URL for the selected file
+ ){},
+ onModify: function(file // a CLONE of the file specs object: .dir, .name, .path, .size, .date, .mime, .icon, .thumbnail
+ ){},
onShow: function(){},
onHide: function(){},
- onPreview: function(){},
- onDetails: function(){}, // Fired when an item is picked form the files list, supplies object (e.g. {width: 123, height:456} )
- onHidePreview: function(){}, // Fired when the preview is hidden (e.g. when uploading)
+ onPreview: function(src // this.get('src') ???
+ ){},
+ onDetails: function(json // The JSON data as sent by the server for this 'detail' request
+ ){}, // Fired when an item is picked form the files list, supplies object (e.g. {width: 123, height:456} )
+ onHidePreview: function(){}, // Fired when the preview is hidden (e.g. when uploading)
*/
directory: '',
url: null,

0 comments on commit 735c2cc

Please sign in to comment.