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