mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1774] Extend "Create Folder" and add "Edit Folder" dialogs to ADF (#2585)
* [ADF-1774] Extend "Create Folder" and add "Edit Folder" dialogs to ADF - added create and edit folder directives and used them inside the demo-shell file component - added FolderDialogComponent for edit/create actions with name validators: forbidSpecialCharacters, forbidEndingDot and forbidOnlySpaces - updated the translation files - added unit tests for the new components - removed the CreateFolderDialogComponent and its usage inside demo-shell - added documentation files for FolderCreateDirective and FolderEditDirective * [ADF-1774] fix messed up translation files because of previous commit * [ADF-1774] changes required on code review comments
This commit is contained in:
committed by
Eugenio Romano
parent
c74b696a6e
commit
5dabc39841
@@ -253,6 +253,8 @@ for more information about installing and using the source code.
|
||||
- [Node permission directive](node-permission.directive.md)
|
||||
- [Node restore directive](node-restore.directive.md)
|
||||
- [Upload directive](upload.directive.md)
|
||||
- [Folder create directive](folder-create.directive.md)
|
||||
- [Folder edit directive](folder-edit.directive.md)
|
||||
|
||||
### Models
|
||||
|
||||
|
40
docs/folder-create.directive.md
Normal file
40
docs/folder-create.directive.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Folder Create directive
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Properties](#properties)
|
||||
* [Events](#events)
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-toolbar>
|
||||
<button mat-icon-button
|
||||
[adf-create-folder]="documentList.currentFolderId">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
|
||||
<adf-document-list #documentList ...>
|
||||
...
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----------------- | ------------------- | --------- | ----------------------------------------------------------------- |
|
||||
| adf-create-folder | string | '-my-' | Parent folder where the new folder will be located after creation |
|
||||
|
||||
## Details
|
||||
|
||||
'FolderCreateDirective' directive needs the id of the parent folder where we want the new folder node to be created. If no value is provided, the '-my-' alias is used.
|
||||
It opens the FolderDialogComponent to receive data for the new folder. If data is valid, on dialog close, it emits folderCreate event.
|
40
docs/folder-edit.directive.md
Normal file
40
docs/folder-edit.directive.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Folder Edit directive
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
* [Properties](#properties)
|
||||
* [Events](#events)
|
||||
- [Details](#details)
|
||||
|
||||
<!-- tocstop -->
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-toolbar title="toolbar example">
|
||||
<button mat-icon-button
|
||||
[adf-edit-folder]="documentList.selection[0]?.entry">
|
||||
<mat-icon>create</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
|
||||
<adf-document-list #documentList ...>
|
||||
...
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----------------- | ---------------------- | ------- | ----------------------------------- |
|
||||
| adf-edit-folder | MinimalNodeEntryEntity | | The folder node entity for editing |
|
||||
|
||||
## Details
|
||||
|
||||
'FolderEditDirective' directive needs a selection folder entry of #documentList to open the folder dialog component to edit the name and description properties of that selected folder.
|
||||
If data is valid, on dialog close, it emits folderEdit event.
|
Reference in New Issue
Block a user