mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2540] Lock node feature (#3138)
* add adf-node-lock directive * add lock-node service + button in context menu * unit tests * docs * unit tests fix * Remove unnecessary imports * PR changes * Remove fit from tests * Update specific node from list on lock/ulock
This commit is contained in:
committed by
Denys Vuika
parent
7b7e39d989
commit
7d1b4bf14a
@@ -217,6 +217,7 @@ for more information about installing and using the source code.
|
||||
| [Folder edit directive](content-services/folder-edit.directive.md) | Allows folders to be edited. | [Source](../lib/content-services/folder-directive/folder-edit.directive.ts) |
|
||||
| [Inherited button directive](content-services/inherited-button.directive.md) | Update the current node by adding/removing the inherited permissions. | [Source](../lib/content-services/permission-manager/components/inherited-button.directive.ts) |
|
||||
| [File draggable directive](core/file-draggable.directive.md) | Provide drag-and-drop features for an element such as a `div`. | [Source](../lib/content-services/upload/directives/file-draggable.directive.ts) |
|
||||
| [Node lock directive](content-services/node-lock.directive.md) | Open the node lock dialog on click. | [Source](../lib/content-services/directives/node-lock.directive.ts) |
|
||||
|
||||
## Models
|
||||
|
||||
|
@@ -45,6 +45,7 @@ for more information about installing and using the source code.
|
||||
| [Folder edit directive](folder-edit.directive.md) | Allows folders to be edited. | [Source](../../lib/content-services/folder-directive/folder-edit.directive.ts) |
|
||||
| [Inherited button directive](inherited-button.directive.md) | Update the current node by adding/removing the inherited permissions. | [Source](../../lib/content-services/permission-manager/components/inherited-button.directive.ts) |
|
||||
| [File draggable directive](file-draggable.directive.md) | Provide drag-and-drop features for an element such as a `div`. | [Source](../../lib/content-services/upload/directives/file-draggable.directive.ts) |
|
||||
| [Node lock directive](node-lock.directive.md) | Open the node lock dialog on click. | [Source](../../lib/content-services/directives/node-lock.directive.ts) |
|
||||
|
||||
## Models
|
||||
|
||||
|
@@ -10,6 +10,9 @@ Displays and manages dialogs for selecting content to open, copy or upload.
|
||||
|
||||
## Methods
|
||||
|
||||
- `openLockNodeDialog(nodeEntry: MinimalNodeEntryEntity): Observable<string>`
|
||||
Opens a dialog to lock or unlock file
|
||||
- `nodeEntry` - Item to lock or unlock.
|
||||
- `openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a file browser at a chosen folder location.
|
||||
- `folderNodeId` - ID of the folder to use
|
||||
|
22
docs/content-services/node-lock.directive.md
Normal file
22
docs/content-services/node-lock.directive.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
Added: v2.2.0
|
||||
Status: Active
|
||||
---
|
||||
# Node Lock directive
|
||||
|
||||
Call [`ContentNodeDialogService.openLockNodeDialog(nodeEntry)`](./content-node-dialog.service.md) method on click event,
|
||||
and disable target button if provided node is not a file or user don't have permissions.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<button mat-icon-button [adf-node-lock]="node.entry">
|
||||
<mat-icon>lock</mat-icon> Lock file
|
||||
</button>
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| node | `MinimalNodeEntryEntity` | | Node to lock. |
|
Reference in New Issue
Block a user