cancel
Showing results for 
Search instead for 
Did you mean: 

Custom backup action

nancyaggarwal
Champ in-the-making
Champ in-the-making
Hi All

I want to make a custom backup action which is available online. I followed the every step of the below wiki url but still my action doesn't work

http://wiki.alfresco.com/wiki/Custom_Document_Library_Action


My action appears under the more option but when i click on it, it doesn't do anything. I also checked in firebug whether my javascript is loading or not and it is not loading.

Below is my javascript code which i am using:


(function()
      {
       /**
      * Backup single document.
      *
      * @method onActionBackup
      * @param file {object} Object literal representing one or more file(s) or folder(s) to be actioned
      */
    YAHOO.Bubbling.fire("registerAction",

             {

                 actionName: "onActionBackup",

                 onActionBackup: function dlA_onActionBackup(record)

       {
   alert("TEST");
         
              var displayName = record.displayName;

              var nodeRef = record.nodeRef;

      this.modules.actions.genericAction(
      {
       success:
       {
      event:
      {
       name: "metadataRefresh"
      },
      message: this.msg("message.backup.success", record.displayName)
       },
       failure:
       {
      message: this.msg("message.backup.failure",record.displayName)
       },
      
       webscript:
       {
      name:"/slingshot/doclib/action/backup/site/{site}/{container}",
      method: Alfresco.util.Ajax.POST
       },
       params:
       {
      site: this.options.siteId,
      container: this.options.containerId
       },
       config:
       {
      requestContentType: Alfresco.util.Ajax.JSON,
      dataObj:
      {
       nodeRefs: [record.nodeRef]
      }
       }
      });
       }
       });
      
      })();





Thanks
Nancy

1 REPLY 1

nancyaggarwal
Champ in-the-making
Champ in-the-making
Can anyone help me with this??