AnsweredAssumed Answered

'File to...' in DM

Question asked by croc on Aug 24, 2010
Latest reply on Jul 8, 2011 by johanpi
HI all,
I need the File to… functionality into DM.
Below is what I did and it is not working:

File name: actions.js
     //Added this method
      onActionFileTo: function dlA_onActionFileTo(assets)
      {
         this._copyMoveTo("file", assets);
      },

_copyMoveTo: function dlA__copyMoveTo(mode, asset)
      {
         // Check mode is an allowed one
         if (!mode in
            {
               copy: true,
          file: true, //added this line
               move: true
            })
         {
             throw new Error("'" + mode + "' is not a valid Copy/Move/File to mode.");
         }
        
         if (!this.modules.copyMoveTo)
         {
            this.modules.copyMoveTo = new Alfresco.module.DoclibCopyMoveTo(this.id + "-copyMoveTo");
         }

         this.modules.copyMoveTo.setOptions(
         {
            mode: mode,
            siteId: this.options.siteId,
            containerId: this.options.containerId,
            path: this.currentPath,
            files: asset,
            workingMode: this.options.workingMode
         }).showDialog();
      },

File name:  documentlist.get.config.xml

//Added

<action type="action-link" id="onActionFileTo" label="actions.document.file-to" />


File name:  document-actions.get.config.xml

//Added

<action type="action-link" id="onActionFileTo" label="actions.document.file-to" />

File name: slingshot.properties

//added
actions.document.file-to=File to…

When I click File to… nothing happens,
What is it that I didn't do? please help

Thanks,
Croc

Outcomes