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:
@@ -43,8 +43,8 @@
|
||||
<folder-action title="Custom folder action" (execute)="myFolderAction1($event)"></folder-action>
|
||||
</folder-actions>
|
||||
<quick-document-actions>
|
||||
<quick-document-action icon="extension" handler="system1"></quick-document-action>
|
||||
<quick-document-action icon="thumb_up" handler="system2"></quick-document-action>
|
||||
<quick-document-action icon="account_circle" handler="my-handler"></quick-document-action>
|
||||
<quick-document-action icon="cloud_download" handler="download"></quick-document-action>
|
||||
</quick-document-actions>
|
||||
<document-actions>
|
||||
<document-action title="Download" handler="DOWNLOAD"></document-action>
|
||||
|
@@ -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