mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-2163] moved to upper case enum
This commit is contained in:
+6
-6
@@ -49,7 +49,7 @@ export class ContentActionComponent implements OnInit {
|
||||
|
||||
/** Type of item that the action appies to. Can be "document" or "folder" */
|
||||
@Input()
|
||||
target: string = ContentActionTarget.All;
|
||||
target: string = ContentActionTarget.ALL;
|
||||
|
||||
/** The permission type. */
|
||||
@Input()
|
||||
@@ -90,9 +90,9 @@ export class ContentActionComponent implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.target === ContentActionTarget.All) {
|
||||
this.generateAction(ContentActionTarget.Folder);
|
||||
this.generateAction(ContentActionTarget.Document);
|
||||
if (this.target === ContentActionTarget.ALL) {
|
||||
this.generateAction(ContentActionTarget.FOLDER);
|
||||
this.generateAction(ContentActionTarget.DOCUMENT);
|
||||
} else {
|
||||
this.generateAction(this.target);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ export class ContentActionComponent implements OnInit {
|
||||
if (target) {
|
||||
let ltarget = target.toLowerCase();
|
||||
|
||||
if (ltarget === ContentActionTarget.Document) {
|
||||
if (ltarget === ContentActionTarget.DOCUMENT) {
|
||||
if (this.documentActions) {
|
||||
this.documentActions.permissionEvent.subscribe((permission) => {
|
||||
this.permissionEvent.emit(permission);
|
||||
@@ -150,7 +150,7 @@ export class ContentActionComponent implements OnInit {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (ltarget === ContentActionTarget.Folder) {
|
||||
if (ltarget === ContentActionTarget.FOLDER) {
|
||||
if (this.folderActions) {
|
||||
this.folderActions.permissionEvent.subscribe((permission) => {
|
||||
this.permissionEvent.emit(permission);
|
||||
|
||||
@@ -40,9 +40,9 @@ export class ContentActionModel {
|
||||
}
|
||||
|
||||
export enum ContentActionTarget {
|
||||
Document = 'document',
|
||||
Folder = 'folder',
|
||||
All = 'all'
|
||||
DOCUMENT = 'document',
|
||||
FOLDER = 'folder',
|
||||
ALL = 'all'
|
||||
}
|
||||
|
||||
export type ContentActionHandler = (obj: any, target?: any, permission?: string) => any;
|
||||
|
||||
Reference in New Issue
Block a user