Open custom dialog when a file is uploaded
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2014 06:28 AM
Hi,
I would like to know how to open a custom dialog when a file is dropped in a folder. Here is how it goes :
- The user drops a file
- A pop-up asks a due date (because it's an assignment)
- A Javascript runs and starts a workflow with this due date
I can do the last part but I'm stuck at the pop up thing, could anyone help me please ?
Best Regards,
Vincent
I would like to know how to open a custom dialog when a file is dropped in a folder. Here is how it goes :
- The user drops a file
- A pop-up asks a due date (because it's an assignment)
- A Javascript runs and starts a workflow with this due date
I can do the last part but I'm stuck at the pop up thing, could anyone help me please ?
Best Regards,
Vincent
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2014 12:34 PM
Hi,
When a file is uploaded via drag'n'drop, the onFileUploadComplete method (from actions.js) is called.
You will have to override this method and create your pop-up here.
To do this, I think you can register a new action called onFileUploadComplete, and it will automatically override the native one.
Here is an example :
The problem is that this method is also called when you upload documents by other ways than drag'n'drop, or when you upload a new version of a document.
I don't know if it is a problem is your case…
When a file is uploaded via drag'n'drop, the onFileUploadComplete method (from actions.js) is called.
You will have to override this method and create your pop-up here.
To do this, I think you can register a new action called onFileUploadComplete, and it will automatically override the native one.
Here is an example :
YAHOO.Bubbling.fire("registerAction", { actionName: "onFileUploadComplete", fn: function onFileUploadComplete(complete) { // Create your popup here } }
The problem is that this method is also called when you upload documents by other ways than drag'n'drop, or when you upload a new version of a document.
I don't know if it is a problem is your case…
