alfresco-ng2-components/docs/folder-create.directive.md
suzanadirla 5dabc39841 [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
2017-11-03 14:45:42 +00:00

1.2 KiB

Folder Create directive

Basic Usage

<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.