mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Customisation of global actions (folders and documents)
- support for registering custom global actions (folders, documents) - documentation update with code samples and pictures refs #9
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
import {Component} from 'angular2/core';
|
||||
import {
|
||||
DOCUMENT_LIST_DIRECTIVES,
|
||||
DOCUMENT_LIST_PROVIDERS
|
||||
DOCUMENT_LIST_PROVIDERS,
|
||||
DocumentActionsService
|
||||
} from 'ng2-alfresco-documentlist/ng2-alfresco-documentlist';
|
||||
import {MDL} from 'ng2-alfresco-core/material';
|
||||
|
||||
@@ -36,6 +37,14 @@ export class FilesComponent {
|
||||
navigation: boolean = true;
|
||||
|
||||
events: any[] = [];
|
||||
|
||||
constructor(documentActions: DocumentActionsService) {
|
||||
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
||||
}
|
||||
|
||||
myDocumentActionHandler(obj: any) {
|
||||
window.alert('my custom action handler');
|
||||
}
|
||||
|
||||
onItemClick($event) {
|
||||
console.log($event.value);
|
||||
|
Reference in New Issue
Block a user