cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add 'File to' to Document Management

croc
Champ in-the-making
Champ in-the-making
Hi,
I have added File to menu item to DM, But now when I click nothing happens.

Below is what I did:

Added the following  to actions.js

onActionFileTo: function dlA_onActionFileTo(assets)
      {
         this._copyMoveTo("file", assets);
      },
added this to  _copyMoveTo method
// Check mode is an allowed one
         if (!mode in
            {
               copy: true,
               file: true, //added this
               move: true
            })

Added the following to copy-move-to.js

var dataWebScripts =

            {

               copy: "copy-to",
               move: "move-to",
          file: "add-child"  //added this line
            };

////////////////////////////////////////////////////////////
onOK: function DLCMT_onOK(e, p_obj)

      {

         var files, multipleFiles = [], params, i, j,

            eventSuffix =

            {

               copy: "Copied",

               move: "Moved",
               file: "Filed"

            };

NB: I have also added those new changes to the -min.js files. But it doesn't work.

Please help.

Thanks,
Croc
2 REPLIES 2

erikwinlof
Confirmed Champ
Confirmed Champ
Hi Croc,

I didn't understand if your new javascript method was called at all, have you tried putting in an alert(), breakpoint in FireBug or debug statement?
If it doesn't get called, please supply your changes in documentlist.get.config.xml and also make sure you have followed the instructions on this wiki page for creating custom doclib actions:
http://wiki.alfresco.com/wiki/Custom_Document_Library_Action

Cheers and good luck,

:: Erik

mikeh
Star Contributor
Star Contributor
Many of the DocLib client-side JavaScript files are concatenated at build time. I'd really recommend you (and anyone, actually) make your modifications to a checked-out copy of the source from SVN and then use our own build scripts to deploy rather than trying to modify them by hand.

Use "ant incremental-slingshot-tomcat" for Share.

Thanks,
Mike