Class Alfresco.doclib.Actions
Document Library Actions module
Defined in: documentlibrary-actions.js
| Field Attributes | Field Name and Description |
|---|---|
|
Current actions view type: set by owning class to "browse" or "details".
|
|
|
Valid online edit mimetypes, mapped to application ProgID.
|
| Method Attributes | Method Name and Description |
|---|---|
|
getAction(record, owner, resolve)
Helper for actions of type "javascript" to get the node's action descriptor with params resolved (unless resolve is set to false).
|
|
|
getActionUrls(recordData, siteId)
The urls to be used when creating links in the action cell
|
|
|
getParentNodeRef(record)
Tries to get a common parent nodeRef for an action that requires one.
|
|
|
onActionAssignWorkflow(record)
Assign workflow.
|
|
|
onActionCancelEditing(record)
Cancel editing.
|
|
|
onActionChangeType(record)
Change Type
|
|
|
onActionCheckinFromGoogleDocs(record)
Check in a new version from Google Docs.
|
|
|
onActionCheckoutToGoogleDocs(record)
Checkout to Google Docs.
|
|
|
onActionCopyTo(record)
Copy single document or folder.
|
|
|
onActionDelete(record)
Delete record.
|
|
|
onActionDetails(record)
Record metadata.
|
|
|
onActionEditOffline(record)
Edit Offline.
|
|
|
onActionEditOnline(record)
Edit Online.
|
|
|
onActionFormDialog(record, owner)
Form Dialog Action.
|
|
|
onActionLocate(record)
Locate record.
|
|
|
onActionManageAspects(record)
Manage aspects.
|
|
|
onActionManagePermissions(record)
Set permissions on a single document or folder.
|
|
|
onActionMoveTo(record)
Move single document or folder.
|
|
|
onActionPublish(record)
Social Publishing
|
|
|
onActionSimpleRepoAction(record, owner)
Simple Repo Action.
|
|
|
onActionUploadNewVersion(record)
Upload new version.
|
|
|
onFileUploadComplete(complete)
Called from the uploader component after one or more files have been uploaded.
|
|
|
onNewVersionUploadComplete(complete)
Called from the uploader component after one or more files have been updated.
|
|
|
onRegisterAction(layer, args)
Register a Document Library action via Bubbling event
|
|
|
registerAction(actionName, fn)
Register a Document Library action
|
|
|
renderAction(p_action, p_record)
Renders a single action for a given record.
|
|
|
viewInSourceRepositoryURL(record, actionUrls)
View in source Repository URL helper
|
Field Detail
{string}
actionsView
Current actions view type: set by owning class to "browse" or "details".
{object}
onlineEditMimetypes
Valid online edit mimetypes, mapped to application ProgID.
Currently allowed are Microsoft Office 2003 and 2007 mimetypes for Excel, PowerPoint and Word only
Currently allowed are Microsoft Office 2003 and 2007 mimetypes for Excel, PowerPoint and Word only
Method Detail
getAction(record, owner, resolve)
Helper for actions of type "javascript" to get the node's action descriptor with params resolved (unless resolve is set to false).
- Parameters:
- {object} record
- Object literal representing one file or folder to be actioned
- {HTMLElement} owner
- The action html element
- {Boolean} resolve
- (Optional) Set to false if the action param's {} shouldn't get resolved
{object}
getActionUrls(recordData, siteId)
The urls to be used when creating links in the action cell
- Parameters:
- {object} recordData
- Object literal representing the node
- {string} siteId
- Optional siteId override for site-based locations
- Returns:
- {object} Object literal containing URLs to be substituted in action placeholders
{string|null}
getParentNodeRef(record)
Tries to get a common parent nodeRef for an action that requires one.
- Parameters:
- {object} record
- Object literal representing one file or folder to be actioned
- Returns:
- {string|null} Parent nodeRef or null
onActionAssignWorkflow(record)
Assign workflow.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionCancelEditing(record)
Cancel editing.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionChangeType(record)
Change Type
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionCheckinFromGoogleDocs(record)
Check in a new version from Google Docs.
NOTE: Placeholder only, clients MUST implement their own checkinFromGoogleDocs action
NOTE: Placeholder only, clients MUST implement their own checkinFromGoogleDocs action
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionCheckoutToGoogleDocs(record)
Checkout to Google Docs.
NOTE: Placeholder only, clients MUST implement their own checkoutToGoogleDocs action
NOTE: Placeholder only, clients MUST implement their own checkoutToGoogleDocs action
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionCopyTo(record)
Copy single document or folder.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionDelete(record)
Delete record.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionDetails(record)
Record metadata.
- Parameters:
- {object} record
- Object literal representing one file or folder to be actioned
onActionEditOffline(record)
Edit Offline.
NOTE: Placeholder only, clients MUST implement their own editOffline action
NOTE: Placeholder only, clients MUST implement their own editOffline action
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionEditOnline(record)
Edit Online.
- Parameters:
- {object} record
- Object literal representing file or folder to be actioned
onActionFormDialog(record, owner)
Form Dialog Action.
Accepts <param name=""></param> declarations in share config xml for the following names:
success - The name of the callback function
successMessage - The msg key to use when the repo action succeded (i.e. message.extract-metadata.success)
failure - The name of the callback function
failureMessage - The msg key to use when the repo action failed (i.e. message.extract-metadata.failure)
...and any other parameter mathing the properties for GET /service/components/form webscript
i.e itemid, itemkind, mode etc...
Accepts <param name=""></param> declarations in share config xml for the following names:
success - The name of the callback function
successMessage - The msg key to use when the repo action succeded (i.e. message.extract-metadata.success)
failure - The name of the callback function
failureMessage - The msg key to use when the repo action failed (i.e. message.extract-metadata.failure)
...and any other parameter mathing the properties for GET /service/components/form webscript
i.e itemid, itemkind, mode etc...
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
- owner
onActionLocate(record)
Locate record.
- Parameters:
- {object} record
- Object literal representing one file or folder to be actioned
onActionManageAspects(record)
Manage aspects.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionManagePermissions(record)
Set permissions on a single document or folder.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionMoveTo(record)
Move single document or folder.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionPublish(record)
Social Publishing
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onActionSimpleRepoAction(record, owner)
Simple Repo Action.
Accepts the following <param> declarations from the <action> config:
action - The name of the repo action (i.e. extract-metadata)
success - The name of the callback function
successMessage - The msg key to use when the repo action succeded (i.e. message.extract-metadata.success)
failure - The name of the callback function
failureMessage - The msg key to use when the repo action failed (i.e. message.extract-metadata.failure)
Accepts the following <param> declarations from the <action> config:
action - The name of the repo action (i.e. extract-metadata)
success - The name of the callback function
successMessage - The msg key to use when the repo action succeded (i.e. message.extract-metadata.success)
failure - The name of the callback function
failureMessage - The msg key to use when the repo action failed (i.e. message.extract-metadata.failure)
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
- owner
onActionUploadNewVersion(record)
Upload new version.
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
onFileUploadComplete(complete)
Called from the uploader component after one or more files have been uploaded.
- Parameters:
- {object} complete
- Object literal containing details of successful and failed uploads
onNewVersionUploadComplete(complete)
Called from the uploader component after one or more files have been updated.
- Parameters:
- {object} complete
- Object literal containing details of successful and failed uploads
onRegisterAction(layer, args)
Register a Document Library action via Bubbling event
- Parameters:
- {object} layer
- Event fired (unused)
- {array} args
- Event parameters (actionName, fn)
{boolean}
registerAction(actionName, fn)
Register a Document Library action
- Parameters:
- {string} actionName
- Action name
- {function} fn
- Handler function
- Returns:
- {boolean} Success status of registration
{string}
renderAction(p_action, p_record)
Renders a single action for a given record.
Callers should then use
<pre>
YAHOO.lang.substitute(actionHTML, this.getActionUrls(record))
</pre>
on the final concatenated HTML for multiple actions to populate placeholder URLs.
Callers should then use
<pre>
YAHOO.lang.substitute(actionHTML, this.getActionUrls(record))
</pre>
on the final concatenated HTML for multiple actions to populate placeholder URLs.
- Parameters:
- {object} p_action
- Object literal representing the node
- {string} p_record
- Optional siteId override for site-based locations
- Returns:
- {string} HTML containing action markup
viewInSourceRepositoryURL(record, actionUrls)
View in source Repository URL helper
- Parameters:
- {object} record
- Object literal representing the file or folder to be actioned
- {object} actionUrls
- Action urls for this record