mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
#384 Rename event name and improve docs
This commit is contained in:
parent
369ac0d7d6
commit
d950612738
@ -210,6 +210,23 @@ DocumentList provides simple breadcrumb element to indicate the current position
|
||||
|
||||
Parent folder button is not displayed when breadcrumb is enabled.
|
||||
|
||||
### Creation Menu Action
|
||||
|
||||
DocumentList provides simple creation menu actions that provide the action to create a new folder.
|
||||
|
||||
```html
|
||||
<alfresco-document-menu-action
|
||||
[currentFolderPath]="currentFolderPath">
|
||||
</alfresco-document-menu-action>
|
||||
```
|
||||
|
||||

|
||||
|
||||
When the "New Folder" button is pressed a dialog appear.
|
||||
|
||||

|
||||
|
||||
|
||||
### Custom columns
|
||||
|
||||
It is possible to reorder, extend or completely redefine data columns displayed by the component.
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 174 KiB |
Binary file not shown.
After Width: | Height: | Size: 167 KiB |
@ -1,7 +1,7 @@
|
||||
<alfresco-document-menu-action *ngIf="creationMenuActions"
|
||||
[currentFolderPath]="currentFolderPath"
|
||||
(onSuccess)="onActionMenuSuccess($event)"
|
||||
(onError)="onActionMenuError($event)">
|
||||
(success)="onActionMenuSuccess($event)"
|
||||
(error)="onActionMenuError($event)">
|
||||
</alfresco-document-menu-action>
|
||||
<alfresco-datatable
|
||||
[data]="data"
|
||||
|
@ -43,10 +43,10 @@ export class DocumentMenuAction implements OnInit {
|
||||
currentFolderPath: string;
|
||||
|
||||
@Output()
|
||||
onSuccess = new EventEmitter();
|
||||
success = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
error = new EventEmitter();
|
||||
|
||||
@ViewChild('dialog')
|
||||
dialog: any;
|
||||
@ -73,16 +73,16 @@ export class DocumentMenuAction implements OnInit {
|
||||
res => {
|
||||
let relativeDir = this.currentFolderPath;
|
||||
console.log(relativeDir);
|
||||
this.onSuccess.emit({value: relativeDir});
|
||||
this.success.emit({value: relativeDir});
|
||||
},
|
||||
error => {
|
||||
let errorMessagePlaceholder = this.getErrorMessage(error.response);
|
||||
if (errorMessagePlaceholder) {
|
||||
this.message = this.formatString(errorMessagePlaceholder, [name]);
|
||||
this.onError.emit({message: this.message});
|
||||
this.error.emit({message: this.message});
|
||||
console.log(this.message);
|
||||
} else {
|
||||
this.onError.emit(error);
|
||||
this.error.emit(error);
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user