[Solved]DocumentLibrary: Custom Action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2010 07:07 AM
Hi everybody,
I tray to add a custom action to the DocumentLibrary (like assign workflow). I added the icon to the action menu and I created the WS for the form dialogue (deployed at 'share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\modules\documentlibrary').
Now I want to know where the mapping between the action link and the form dialogue is made?
P.S. Is there any documentation on best-practices to customize Alfresco Share like the Alfresco Developer Guide Book (wrote by JeffPotts)?
Thanks.
I tray to add a custom action to the DocumentLibrary (like assign workflow). I added the icon to the action menu and I created the WS for the form dialogue (deployed at 'share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\modules\documentlibrary').
Now I want to know where the mapping between the action link and the form dialogue is made?
P.S. Is there any documentation on best-practices to customize Alfresco Share like the Alfresco Developer Guide Book (wrote by JeffPotts)?
Thanks.
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2010 08:45 AM
You a JS function with the same value as the action id you defined.
See this: http://wiki.alfresco.com/wiki/Custom_Document_Library_Action
See this: http://wiki.alfresco.com/wiki/Custom_Document_Library_Action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2010 09:37 AM
Thanks zaizi,
I tried the example in wiki and it worked well.
But now, I need to add interaction user by selecting a value of a parameter on a pop before executing the action (exactly like assign workflow action).
regards,
Lamba
I tried the example in wiki and it worked well.
But now, I need to add interaction user by selecting a value of a parameter on a pop before executing the action (exactly like assign workflow action).
regards,
Lamba
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2010 12:09 PM
Hi all,
I need example of custom action with user interaction.
Thanks in advance.
I need example of custom action with user interaction.
Thanks in advance.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2010 12:32 PM
The assign workflow action is wired up to do this:
The Alfresco.module.DoclibWorkflow class is defined in modules/documentlibrary/workflow.js
Thanks,
Mike
/** * Assign workflow. * * @method onActionAssignWorkflow * @param asset {object} Object literal representing the file or folder to be actioned */ onActionAssignWorkflow: function dlA_onActionAssignWorkflow(asset) { if (!this.modules.assignWorkflow) { this.modules.assignWorkflow = new Alfresco.module.DoclibWorkflow(this.id + "-workflow"); } this.modules.assignWorkflow.setOptions( { siteId: this.options.siteId, containerId: this.options.containerId, path: this.currentPath, files: asset }).showDialog(); },
The Alfresco.module.DoclibWorkflow class is defined in modules/documentlibrary/workflow.js
Thanks,
Mike
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2010 06:19 AM
thanks make,
But, me too, I used this action to set up mine. I added a similar declaration of that in the file action.js and I defined my class under the directory modules / documentlibrary/.
I would try to restart again… :roll:
But, me too, I used this action to set up mine. I added a similar declaration of that in the file action.js and I defined my class under the directory modules / documentlibrary/.
I would try to restart again… :roll:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2010 06:26 AM
Sorry, I wanted to say thank you Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2010 01:40 PM
I success to make it turn. Thank you Mike.
In fact, it is necessary to pay attention to the @ during the include of a new action in the file actions-common.get.head.ftl. So during the addition of a new declaration in the file action.js it is necessary to remove @ in front of the call of this file in the actions-common.get.head.ftl.
In fact, it is necessary to pay attention to the @ during the include of a new action in the file actions-common.get.head.ftl. So during the addition of a new declaration in the file action.js it is necessary to remove @ in front of the call of this file in the actions-common.get.head.ftl.
