[ADF-2163] moved to upper case enum

This commit is contained in:
VitoAlbano
2018-02-02 15:45:18 +00:00
parent 6285e0e024
commit 41da0a34dd
2 changed files with 9 additions and 9 deletions
@@ -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;