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:
Denys Vuika
2016-05-03 15:15:23 +01:00
parent 43344881e9
commit 0ff5701900
13 changed files with 123 additions and 12 deletions

View File

@@ -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);