[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" */ /** Type of item that the action appies to. Can be "document" or "folder" */
@Input() @Input()
target: string = ContentActionTarget.All; target: string = ContentActionTarget.ALL;
/** The permission type. */ /** The permission type. */
@Input() @Input()
@@ -90,9 +90,9 @@ export class ContentActionComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
if (this.target === ContentActionTarget.All) { if (this.target === ContentActionTarget.ALL) {
this.generateAction(ContentActionTarget.Folder); this.generateAction(ContentActionTarget.FOLDER);
this.generateAction(ContentActionTarget.Document); this.generateAction(ContentActionTarget.DOCUMENT);
} else { } else {
this.generateAction(this.target); this.generateAction(this.target);
} }
@@ -131,7 +131,7 @@ export class ContentActionComponent implements OnInit {
if (target) { if (target) {
let ltarget = target.toLowerCase(); let ltarget = target.toLowerCase();
if (ltarget === ContentActionTarget.Document) { if (ltarget === ContentActionTarget.DOCUMENT) {
if (this.documentActions) { if (this.documentActions) {
this.documentActions.permissionEvent.subscribe((permission) => { this.documentActions.permissionEvent.subscribe((permission) => {
this.permissionEvent.emit(permission); this.permissionEvent.emit(permission);
@@ -150,7 +150,7 @@ export class ContentActionComponent implements OnInit {
return null; return null;
} }
if (ltarget === ContentActionTarget.Folder) { if (ltarget === ContentActionTarget.FOLDER) {
if (this.folderActions) { if (this.folderActions) {
this.folderActions.permissionEvent.subscribe((permission) => { this.folderActions.permissionEvent.subscribe((permission) => {
this.permissionEvent.emit(permission); this.permissionEvent.emit(permission);
@@ -40,9 +40,9 @@ export class ContentActionModel {
} }
export enum ContentActionTarget { export enum ContentActionTarget {
Document = 'document', DOCUMENT = 'document',
Folder = 'folder', FOLDER = 'folder',
All = 'all' ALL = 'all'
} }
export type ContentActionHandler = (obj: any, target?: any, permission?: string) => any; export type ContentActionHandler = (obj: any, target?: any, permission?: string) => any;