mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-2135] Updated tables of contents and tools (#2820)
This commit is contained in:
committed by
Eugenio Romano
parent
9e706d68e4
commit
994041fb23
@@ -4,25 +4,20 @@ Adds options to a Document List actions menu for a particular content type.
|
||||
|
||||

|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
## Contents
|
||||
|
||||
<!-- toc -->
|
||||
- [Basic Usage](#basic-usage)
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Properties](#properties)
|
||||
* [Events](#events)
|
||||
- [Details](#details)
|
||||
* [Built-in action examples](#built-in-action-examples)
|
||||
+ [Delete - System handler combined with custom handler](#delete---system-handler-combined-with-custom-handler)
|
||||
+ [Download](#download)
|
||||
+ [Copy and move](#copy-and-move)
|
||||
* [Error, Permission and Success callbacks](#error-permission-and-success-callbacks)
|
||||
* [Customizing built-in actions](#customizing-built-in-actions)
|
||||
- [See also](#see-also)
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
<!-- tocstop -->
|
||||
- [Details](#details)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
- [Built-in action examples](#built-in-action-examples)
|
||||
- [Error, Permission and Success callbacks](#error-permission-and-success-callbacks)
|
||||
- [Customizing built-in actions](#customizing-built-in-actions)
|
||||
|
||||
- [See also](#see-also)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@@ -80,19 +75,19 @@ export class MyView {
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `target` | string | | "document" or "folder" |
|
||||
| `title` | string | | The title of the action as shown in the menu |
|
||||
| `icon` | string | | The name of the icon to display next to the menu command (can be left blank) |
|
||||
| `handler` | string | | System type actions. Can be "delete", "download", "copy" or "move" |
|
||||
| `permission` | string | | The name of the permission |
|
||||
| `disabled` | boolean | | Is the menu item disabled?
|
||||
| `disableWithNoPermission` | boolean | | Should this action be disabled in the menu if the user doesn't have permission for it? |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| `target` | string | | "document" or "folder" |
|
||||
| `title` | string | | The title of the action as shown in the menu |
|
||||
| `icon` | string | | The name of the icon to display next to the menu command (can be left blank) |
|
||||
| `handler` | string | | System type actions. Can be "delete", "download", "copy" or "move" |
|
||||
| `permission` | string | | The name of the permission |
|
||||
| `disabled` | boolean | | Is the menu item disabled? |
|
||||
| `disableWithNoPermission` | boolean | | Should this action be disabled in the menu if the user doesn't have permission for it? |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Handler | Description |
|
||||
| --- | --- | --- |
|
||||
| ---- | ------- | ----------- |
|
||||
| `execute` | All | Emitted when user clicks on the action. For combined handlers see below |
|
||||
| `permissionEvent` | All | Emitted when a permission error happens |
|
||||
| `success` | copy, move, delete | Emitted on successful action with the success string message |
|
||||
@@ -105,15 +100,15 @@ The document actions are rendered on a dropdown menu for each items of content.
|
||||
|
||||
A number of built-in actions are defined to handle common use cases:
|
||||
|
||||
- **Download** (document)
|
||||
- **Copy** (document, folder)
|
||||
- **Move** (document, folder)
|
||||
- **Delete** (document, folder)
|
||||
- **Download** (document)
|
||||
- **Copy** (document, folder)
|
||||
- **Move** (document, folder)
|
||||
- **Delete** (document, folder)
|
||||
|
||||
You can use one of the built-in handlers by assigning its name to the `handler` property.
|
||||
(The names are case-insensitive, so `handler="download"` and `handler="DOWNLOAD"`
|
||||
will trigger the same action.) You can also add your own handler by implementing the
|
||||
`execute` event. Note that you can use *both* a built-in handler and your own `execute`
|
||||
`execute` event. Note that you can use _both_ a built-in handler and your own `execute`
|
||||
function in the same action.
|
||||
|
||||
### Built-in action examples
|
||||
@@ -240,9 +235,9 @@ allow the item being copied/moved to be the destination if it is itself a folder
|
||||
|
||||
Defining error, permission and success callbacks are pretty much the same as doing it for the delete permission handling.
|
||||
|
||||
- The error handler callback gets the error object which was raised
|
||||
- The success callback's only parameter is the translatable success message string (could be used for showing in snackbar for example)
|
||||
- The permissionEvent callback is the same as described above with the delete action
|
||||
- The error handler callback gets the error object which was raised
|
||||
- The success callback's only parameter is the translatable success message string (could be used for showing in snackbar for example)
|
||||
- The permissionEvent callback is the same as described above with the delete action
|
||||
|
||||

|
||||
|
||||
@@ -255,10 +250,12 @@ and override the default implementations. See the doc pages for
|
||||
for details and examples.
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
## See also
|
||||
|
||||
- [Document list component](document-list.component.md)
|
||||
- [Document actions service](document-actions.service.md)
|
||||
- [Folder actions service](folder-actions.service.md)
|
||||
<!-- seealso end -->
|
||||
- [Document list component](document-list.component.md)
|
||||
- [Document actions service](document-actions.service.md)
|
||||
- [Folder actions service](folder-actions.service.md)
|
||||
<!-- seealso end -->
|
||||
|
||||
Reference in New Issue
Block a user