mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1548][ACA-1802] add actions to viewer toolbar via extensions (#637)
* [ACA-1548] rename viewer toolbar extension of More menu * [ACA-1548][ACA-1802] add actions to the viewer toolbar via extensions
This commit is contained in:
committed by
Denys Vuika
parent
2f4048a859
commit
e373064fd1
@@ -58,6 +58,7 @@ export class AppExtensionService implements RuleContext {
|
||||
|
||||
toolbarActions: Array<ContentActionRef> = [];
|
||||
viewerToolbarActions: Array<ContentActionRef> = [];
|
||||
viewerToolbarMoreActions: Array<ContentActionRef> = [];
|
||||
viewerContentExtensions: Array<ViewerExtensionRef> = [];
|
||||
contextMenuActions: Array<ContentActionRef> = [];
|
||||
openWithActions: Array<ContentActionRef> = [];
|
||||
@@ -99,7 +100,11 @@ export class AppExtensionService implements RuleContext {
|
||||
);
|
||||
this.viewerToolbarActions = this.loader.getContentActions(
|
||||
config,
|
||||
'features.viewer.toolbar'
|
||||
'features.viewer.toolbarActions'
|
||||
);
|
||||
this.viewerToolbarMoreActions = this.loader.getContentActions(
|
||||
config,
|
||||
'features.viewer.toolbarMoreMenu'
|
||||
);
|
||||
this.viewerContentExtensions = this.loader.getElements<ViewerExtensionRef>(
|
||||
config,
|
||||
@@ -226,6 +231,12 @@ export class AppExtensionService implements RuleContext {
|
||||
);
|
||||
}
|
||||
|
||||
getViewerToolbarMoreActions(): Array<ContentActionRef> {
|
||||
return this.viewerToolbarMoreActions.filter(action =>
|
||||
this.filterByRules(action)
|
||||
);
|
||||
}
|
||||
|
||||
getAllowedContextMenuActions(): Array<ContentActionRef> {
|
||||
return this.contextMenuActions.filter(action => this.filterByRules(action));
|
||||
}
|
||||
|
Reference in New Issue
Block a user