CUSTOM ACTIONS

cancel
Showing results for 
Search instead for 
Did you mean: 
mjuarez
Member II

CUSTOM ACTIONS

Que tal amigos del foro? Abro este thread para tratar un tema interesante, las "custom actions". He intentado realizar el backup de un contenido mediante una accion y no lo pude hacer funcionar.

Me base en estos 2 links:
http://wiki.alfresco.com/wiki/Custom_Document_Library_Action
http://blogs.alfresco.com/wp/wabson/2010/02/28/share-custom-actions-in-a-jar/

Ni siquiera me muestra la etiqueta "BACKUP" que supuestamente me tendria que mostrar. Saludos! Espero su respuesta
2 Replies
cristinamr
Advanced

Re: CUSTOM ACTIONS

Buenos días.

Quizás deberías poner el código que tienes hecho así podremos ver con más claridad donde está el problema Smiley Wink
--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc
mjuarez
Member II

Re: CUSTOM ACTIONS

Tenes razon Cristina… Perdon por no poner mi codigo…

En "C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary" tengo:

*documentlist.get.head.ftl
*backup-action.js
*backup-action.css
*documentlist.get.properties
*documentlist.get.config.xml

En "C:\Alfresco\tomcat\webapps\share\components\documentlibrary" tengo:

*documentlist.get.head.ftl
*backup-action.js
*backup-action.css
*documentlist.get.properties
*documentlist.get.config.xml
*document.css

——————————————————————————————

*backup-action.js
*backup-action.css
los tengo vacios, x q es a modo de prueba por el momento, quiero q me aparezca la etiqueta por lo menos.




<#include "../component.head.inc">
<!– Document List –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/documentlist.css" />
<@script type="text/javascript" src="${page.url.context}/components/documentlibrary/documentlist.js"></@script>
<!– Simple Dialog –>
<@script type="text/javascript" src="${page.url.context}/modules/simple-dialog.js"></@script>
<!– Copy-To –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/copy-to.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/copy-to.js"></@script>
<!– Move-To –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/move-to.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/move-to.js"></@script>
<!– Details –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/details.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/details.js"></@script>
<!– Tag Library –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/taglibrary/taglibrary.css" />
<@script type="text/javascript" src="${page.url.context}/modules/taglibrary/taglibrary.js"></@script>
<!– Assign Workflow –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/workflow.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/workflow.js"></@script>
<!– People Finder Assets (req'd by Assign Workflow)  –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/components/people-finder/people-finder.css" />
<@script type="text/javascript" src="${page.url.context}/components/people-finder/people-finder.js"></@script>
<!– Manage Permissions –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/permissions.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/permissions.js"></@script>
<!– Manage Aspects –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/modules/documentlibrary/aspects.css" />
<@script type="text/javascript" src="${page.url.context}/modules/documentlibrary/aspects.js"></@script>
<!– Backup Action –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/backup-action.css" />
<@script type="text/javascript" src="${page.url.context}/components/documentlibrary/backup-action.js"></@script>
documentlist.get.head.ftl

## Buttons
button.folders.show=Show Folders
button.folders.hide=Hide Folders
button.view.simple=Simple View
button.view.detailed=Detailed View

## Drop-down Menus
menu.select=Select
menu.select.all=All
menu.select.none=None
menu.select.invert=Invert Selection
menu.select.folders=Folders
menu.select.documents=Documents

## Document Details
details.link-to=Link to: {0}
details.created.on=Created on:
details.created.by=Created by:
details.modified.on=Modified on:
details.modified.by=Modified by:
details.checked-out.on=Checked out on:
details.checked-out.by=Checked out by:
details.by=By:
details.version=Version:
details.size=Size:
details.description=Description:
details.description.none=(None)
details.comments=Comments:
details.tags=Tags:
details.tags.none=(None)

## Actions
actions.description.empty=Empty action set
actions.description.document=Document default
actions.description.folder=Folder default
actions.description.locked=Locked by another user
actions.description.lockOwner=Locked by you
actions.description.workingCopyOwner=Checked-out by you
actions.description.link=Document or Folder link

actions.document.edit-metadata=Edit Metadata
actions.document.copy-to=Copy to…
actions.document.move-to=Move to…
actions.document.delete=Delete Document
actions.document.download=Download
actions.document.download-again=Download
actions.document.download-original=Download Original
actions.document.edit-offline=Edit Offline
actions.document.edit-online=Edit Online
actions.document.cancel-editing=Cancel Editing
actions.document.upload-new-version=Upload New Version
actions.document.assign-workflow=Assign Workflow
actions.document.manage-permissions=Manage Permissions
actions.document.manage-aspects=Manage Aspects
actions.link.delete=Delete Link
actions.folder.edit-metadata=Edit Metadata
actions.folder.view-metadata=View Details
actions.folder.copy-to=Copy to…
actions.folder.move-to=Move to…
actions.folder.delete=Delete Folder
actions.folder.manage-permissions=Manage Permissions
actions.folder.manage-aspects=Manage Aspects
actions.more=More…

## Tips
tip.locked=Locked by {0} ({1})
tip.editing=Being edited by you
tip.lock-owner=Locked by you
tip.active-workflow=Belongs to {0} active workflows
tip.favourite-document.add=Add to favorites
tip.favourite-document.remove=Remove from favorites

## Pop-up Messages
message.confirm.delete=Are you sure you want to delete '{0}'?
message.delete.success='{0}' was deleted
message.delete.failure=Could not delete '{0}'
message.edit-offline.success='{0}' can now be edited
message.edit-offline.success.ie7=Download the document using the button below.
message.edit-offline.failure=You cannot edit '{0}'.
message.edit-cancel.success=Editing '{0}' has been cancelled
message.edit-cancel.failure=Could not cancel editing '{0}'.
message.loading=Loading the Document Library…
message.error=Could not access the Document Library
message.empty=No items
message.empty.subfolders=No items. Click "{0}" to see {1} subfolder(s) here.
message.empty.subfolders.link=Show Folders
message.favourite.failure=Could not update favorites list

## File Upload (upload new version)
label.filter-description=Same type as {0}

## Customize Dialog
customize.title=Customize
customize.header.actions=Actions

## Backup Action
actions.document.backup=Backup
message.backup.success='{0}' successfully backed up.
message.backup.failure=Couldn't backup '{0}
documentlist.get.properties



<documentList>

   <actionSets>

      <actionSet id="empty"></actionSet>

      <actionSet id="document">
         <action id="onActionDownload" type="simple-link" href="{downloadUrl}" label="actions.document.download" />
         <action id="onActionDetails" type="action-link" permission="edit" label="actions.document.edit-metadata" />
         <action id="onActionUploadNewVersion" type="action-link" label="actions.document.upload-new-version" />
         <action id="onActionEditOnline" type="action-link" permission="edit,online-edit" label="actions.document.edit-online" />
         <action id="onActionEditOffline" type="action-link" permission="edit" label="actions.document.edit-offline" />
         <action id="onActionCopyTo" type="action-link" label="actions.document.copy-to" />
         <action id="onActionMoveTo" type="action-link" permission="delete" label="actions.document.move-to" />
         <action id="onActionDelete" type="action-link" permission="delete" label="actions.document.delete" />
         <action id="onActionAssignWorkflow" type="action-link" label="actions.document.assign-workflow" />
         <action id="onActionManagePermissions" type="action-link" permission="permissions" label="actions.document.manage-permissions" />
         <action id="onActionManageAspects" type="action-link" permission="edit" label="actions.document.manage-aspects" />
       <action id="onActionBackup" type="action-link" permission="" label="actions.document.backup" />
      </actionSet>

      <actionSet id="locked">
         <action id="onActionDownload" href="{downloadUrl}" type="simple-link" label="actions.document.download" />
      </actionSet>

      <actionSet id="lockOwner">
         <action id="onActionDownload" href="{downloadUrl}" type="simple-link" label="actions.document.download-original" />
      </actionSet>

      <actionSet id="workingCopyOwner">
         <action id="onActionUploadNewVersion" type="action-link" label="actions.document.upload-new-version" />
         <action id="onActionDownload" href="{downloadUrl}" type="simple-link" label="actions.document.download-again" />
         <action id="onActionCancelEditing" type="action-link" label="actions.document.cancel-editing" />
      </actionSet>

      <actionSet id="folder">
         <action id="onActionDetails" permission="edit" type="action-link" label="actions.folder.edit-metadata" />
         <action id="onActionMetadata" type="simple-link" href="{folderDetailsUrl}" label="actions.folder.view-metadata" />
         <action id="onActionCopyTo" type="action-link" label="actions.folder.copy-to" />
         <action id="onActionMoveTo" permission="delete" type="action-link" label="actions.folder.move-to" />
         <action id="onActionDelete" permission="delete" type="action-link" label="actions.folder.delete" />
         <action id="onActionManagePermissions" permission="permissions" type="action-link" label="actions.folder.manage-permissions" />
         <action id="onActionManageAspects" type="action-link" permission="edit" label="actions.folder.manage-aspects" />
      </actionSet>

      <actionSet id="link">
         <action id="onActionDelete" permission="delete" type="action-link" label="actions.link.delete" />
      </actionSet>

   </actionSets>

</documentList>
documentlist.get.config.xml



.doclist
{
   clear: both;
   visibility: hidden;
}

.doclist a:hover
{
   text-decoration: none;
}

.doclist .align-center
{
   text-align: center;
}

.doclist .align-right
{
   text-align: right;
}


/* DocList bar */

.doclist .doclist-bar
{
   background-color: #f8f8f8;
   border-bottom: 1px dashed #c0c0c0;
   border-top: 2px solid #c7ccce;
   margin: 0 -10px;
   padding: 4px 0.5em;
}

.doclist .doclist-bar-bottom
{
   border-top: 1px dashed #d9d9d9;
   margin-top: 2em;
   display: none;
}

.doclist span.separator
{
   border-right: 1px dotted #457A9C;
   margin: 0 4px 0 0;
   padding: 2px 0 0;
   vertical-align: bottom;
}


/* DocList bar Buttons and Paginator */

.doclist .doclist-bar .file-select
{
   float: left;
   width: 15%;
}

.doclist .doclist-bar .paginator
{
   float: left;
   margin: 4px 0;
   text-align: center;
   width: 80%;
}

.doclist .doclist-bar .yui-pg-current
{
   margin-right: 0;
}


/* DocList bar Select menu */

.doclist .file-select .yuimenuitemlabel span
{
   background-position: 2px 50%;
   background-repeat: no-repeat;
   cursor: pointer;
   display: block;
   margin-left: -4px;
   min-height: 16px;
   padding: 2px 0px 1px 24px;
}

.doclist .file-select .selectAll
{
   background-image: url(images/select-all-16.png);
}

.doclist .file-select .selectNone
{
   background-image: url(images/select-none-16.png);
}

.doclist .file-select .selectInvert
{
   background-image: url(images/select-invert-16.png);
}

.doclist .file-select .selectFolders
{
   background-image: url(images/select-folders-16.png);
}

.doclist .file-select .selectDocuments
{
   background-image: url(images/select-documents-16.png);
}



/* Data Table */

.doclist .documents table
{
   border: medium none;
   width: 100%;
}

.doclist .documents thead
{
   display: none;
}

.doclist .documents tbody
{
   outline: none;
}

.doclist .documents .yui-dt table
{
   border: none;
}

.doclist tr.yui-dt-odd
{
   background-color: #ffffff;
}

.doclist tr.yui-dt-odd.yui-dt-highlighted td.yui-dt-last,
.doclist tr.yui-dt-even.yui-dt-highlighted td.yui-dt-last
{
   border-left: 1px solid #c5e6e9;
}

.doclist .documents.yui-dt .yui-dt-data td
{
   border-bottom: 1px dashed #d9d9d9;
   border-right: medium none;
   vertical-align: top;
}

.doclist .documents.yui-dt .yui-dt-data .yui-dt-last td
{
   border-bottom: medium none;
}

.doclist .documents.yui-dt tr.yui-dt-first td
{
   border-top: medium none;
}

.doclist .documents.yui-dt td.yui-dt-last
{
   border-left: 1px solid #fff;
   vertical-align: middle;
}

.doclist .yui-dt-liner
{
   padding: 4px;
}

.doclist .yui-dt-error
{
   background: red;
   color: white;
   font-weight: bold;
   margin: 1em auto;
   padding: 1em;
}

/* This rule is vital to workaround a Firefox mouseout bug */
.doclist .yui-dt-col-4
{
   overflow: visible;
}


/* Cell Renderers */

.doclist .documents .icon32
{
   cursor: pointer;
   display: block;
   min-height: 32px;
}

.doclist .documents .icon32 span,
.doclist .documents .folder-small span
{
   background: url(images/link-16.png) no-repeat;
   display: block;
   height: 16px;
   width: 16px;
   position: absolute;
}

.doclist .documents .thumbnail
{
   cursor: pointer;
   display: block;
   max-height: 100px;
   max-width: 100px;
   min-height: 100px;
   overflow: hidden;
   padding-top: 2px;
}

.doclist .documents .thumbnail span,
.doclist .documents .folder span
{
   background: url(images/link-32.png) no-repeat;
   display: block;
   height: 32px;
   width: 32px;
   position: absolute;
}

.doclist .documents h3.filename
{
   font-size: 123%;
   font-weight: normal;
   float: left;
   padding-bottom: 0.1em;
}
.doclist .documents
{
   color: #333333;
   margin: 0 -10px 0 -8px;
}
.doclist .documents a
{
   color: #2B6EB5;
}
.doclist .documents a:active,
.doclist .documents a:hover
{
   text-decoration: underline;
}

/* Favourite document indicator */
.doclist .documents h3 a.favourite-document
{
   background-image: url(../images/star-deselected_16x16.png);
   background-position: center;
   background-repeat: no-repeat;
   cursor: pointer;
   margin-right: 0.5em;
   padding: 0.5em;
}
.doclist .documents h3 a.favourite-document.enabled
{
   background-image: url(../images/star-selected_16x16.png);
}
.doclist .documents h3 a.favourite-document:active,
.doclist .documents h3 a.favourite-document:hover
{
   text-decoration: none;
}

.doclist .documents .rename-file
{
   background-color: #e8e8e8;
   border: 1px solid #808080;
   cursor: pointer;
   float: left;
   margin-left: 2em;
   position: relative;
   top: -2px;
}

.doclist .documents .detail
{
   clear: left;
   float: left;
   line-height: 1.7em;
}

.doclist .documents .detail em
{
   color: #606060;
   font-style: normal;
   font-weight: normal;
}

.doclist .documents .detail span.item
{
   float: left;
   padding-right: 2em;
}

.doclist .documents .detail span.item-simple
{
   padding-right: 0.5em;
}


/* Tags */

.doclist .documents .detail span.tag-item
{
   background-image: url(images/tag-16.png);
   background-position: 0px 0px;
   background-repeat: no-repeat;
   padding-left: 20px;
}

.doclist .documents .detail span.tag
{
   padding-right: 0.5em;
}

.doclist .documents .detail a.tag-link
{
  
}

.doclist .documents .detail a.tag-link span
{
  
}


/* Actions Rollover */

.doclist .documents .hidden
{
   visibility: hidden;
}


/* Actions */

.doclist .action-set div
{
   display: block;
   margin: 0;
}

.doclist a.action-link,
.doclist a.simple-link,
.doclist a.show-more
{
   background-position: 4px 1px;
   background-repeat: no-repeat;
   border: 1px solid transparent;
   display: block;
   min-height: 16px;
   padding: 2px 0 2px 24px;
}

.doclist .action-set a:active,
.doclist .action-set a:hover,
.doclist .action-set .highlighted
{
   background-color: #fff;
   border: 1px solid #2b6eb5;
   text-decoration: none;
}

.doclist div.more-actions
{
   background-color: #fff;
   border: 1px solid #2b6eb5;
   clear: left;
   margin-left: -22px;
   margin-top: 1px;
   position: absolute;
   width: 200px;
}

.doclist .more-actions a.action-link,
.doclist .more-actions a.simple-link
{
   border: 1px solid #fff;
}

.doclist .more-actions a:active,
.doclist .more-actions a:hover
{
   background-color: #2b6eb5;
   border: 1px solid #2b6eb5;
   color: #fff;
}


/* Actions: Simple view */
.doclist div.simple div
{
   float: left;
   line-height: 1em;
}
.doclist div.simple a.action-link,
.doclist div.simple a.simple-link,
.doclist div.simple a.show-more
{
   background-position: 4px 0;
   min-height: 16px;
   padding: 1px 0 0 24px;
}
.doclist div.simple a.action-link span,
.doclist div.simple a.simple-link span
{
   display: none;
}
.doclist div.simple div.more-actions
{
   margin-left: -122px;
   margin-top: 3em;
}
.doclist div.simple div.more-actions div
{
   float: none;
}
.doclist div.simple div.more-actions a.action-link span,
.doclist div.simple div.more-actions a.simple-link span
{
   display: block;
}


/* Actions: Icons */
.doclist .yui-dt-col-actions a
{
   background-image: url(images/generic-16.png);
}

.doclist .onActionBackup a
{
   background-image: url(images/backup-16.png);
}

.doclist .onActionShowMore a
{
   background-image: url(images/plus-sign-16.png);
}

.doclist .onActionDetails a
{
   background-image: url(images/details-16.png);
}

.doclist .onActionMetadata a
{
   background-image: url(images/metadata-16.png);
}

.doclist .onActionDelete a
{
   background-image: url(images/remove-16.png);
}

.doclist .onActionDownload a
{
   background-image: url(images/download-16.png);
}

.doclist .onActionEditOffline a
{
   background-image: url(images/edit-16.png);
}

.doclist .onActionEditOnline a
{
   background-image: url(images/edit-online-16.png);
}

.doclist .onActionCancelEditing a
{
   background-image: url(images/cancel-editing-16.png);
}

.doclist .onActionCopyTo a
{
   background-image: url(images/copy-16.png);
}

.doclist .onActionMoveTo a
{
   background-image: url(images/move-to-16.png);
}

.doclist .onActionRequestUnlock a
{
   background-image: url(images/request-unlock-16.png);
}

.doclist .onActionUnlock a
{
   background-image: url(images/unlock-16.png);
}

.doclist .onActionUploadNewVersion a
{
   background-image: url(images/upload-new-version-16.png);
}

.doclist .onActionAssignWorkflow a
{
   background-image: url(images/workflow-16.png);
}

.doclist .onActionManagePermissions a
{
   background-image: url(images/permissions-16.png);
}

.doclist .onActionManageAspects a
{
   background-image: url(images/manage-aspects-16.png);
}

.doclist .onActionChangeType a
{
   background-image: url(images/change-type-16.png);
}


/* History Manager */
#yui-history-iframe
{
   position: absolute;
   top: 0;
   left: 0;
   width: 1px;
   height: 1px; /* avoid scrollbars */
   visibility: hidden;
}


/* Preview Tooltip */
.yui-tt .bd
{
   background-color: #f4faff !important;
   border: 1px solid #333 !important;
   padding: 4px 4px 1px !important;
}

/* Show Folders inline link */
.doclist .show-folders-link
{
   cursor: pointer;
}

/* Customize Dialog */
.doclist .customize
{
   display: none;
}
documentlist.css

Espero la ayuda de uds.!! Desde ayer que estoy con esto, y no lo puedo hacer funcionar!!! Saludos!