cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Properties after uploading a document

sofia
Champ in-the-making
Champ in-the-making
Hello,
I need to display the popup of editing properties when I upload a new document. There is a  function <strong> onActionDetails </strong> defined in " webapps\share\components\documentlibrary\actions.js " , I want to use it in "\webapps\share\components\documentlibrary\toolbar.js"
But the problem is that I can't give it the right parameters, because onActionDetails takes as argument : Record (Node and other stuff) . Is there a way to get the record after uploading a document .

Reagards,
Sofia.
1 REPLY 1

sofia
Champ in-the-making
Champ in-the-making
I've solved this by myself .It may help someone else needing to display edit properties form after uploading a file
In the function onFileUploadComplete defined in file toolbar.js I called onActionDetails :

                var record = new Object();
                  var parent = this.doclistMetadata.parent;

                  // jsNode
                  var jsNode = new Object();
                  jsNode["isContainer"] = parent.isContainer;
                  record["jsNode"] = jsNode;

                  // NodeRef
                  var nodeRef = new Object();
                  nodeRef["uri"] = file.nodeRef.replace(":/", "");
                  jsNode["nodeRef"] = nodeRef;
                  // Display name
                  record["displayName"] = parent.properties["cm:name"];
               
               record.nodeRef = file.nodeRef;
                  this.onActionDetails(record);