Compare commits
No commits in common. "3a42f9114e6ac36426f5868c0649d0a0dfb10284" and "57811f3f2e80a6c6922fdfe2fbbfbf2f518bee79" have entirely different histories.
3a42f9114e
...
57811f3f2e
@ -15,37 +15,37 @@ export class ItemTypeService {
|
|||||||
|
|
||||||
getIcon(itemType: string) {
|
getIcon(itemType: string) {
|
||||||
let icon = "fal fa-file";
|
let icon = "fal fa-file";
|
||||||
if (this.itemTypes && this.itemTypes[itemType]) icon = this.itemTypes[itemType].icon;
|
if (this.itemTypes[itemType]) icon = this.itemTypes[itemType].icon;
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
getColor(itemType: string) {
|
getColor(itemType: string) {
|
||||||
let color = "#000000";
|
let color = "#000000";
|
||||||
if (this.itemTypes && this.itemTypes[itemType]) color = this.itemTypes[itemType].iconColor;
|
if (this.itemTypes[itemType]) color = this.itemTypes[itemType].iconColor;
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
getExtraAttributes(itemType: string) {
|
getExtraAttributes(itemType: string) {
|
||||||
let extraAttributes = null;
|
let extraAttributes = null;
|
||||||
if (this.itemTypes && this.itemTypes[itemType] && this.itemTypes[itemType]?.extraAttributes) extraAttributes = this.itemTypes[itemType]?.extraAttributes;
|
if (this.itemTypes[itemType] && this.itemTypes[itemType]?.extraAttributes) extraAttributes = this.itemTypes[itemType]?.extraAttributes;
|
||||||
return extraAttributes;
|
return extraAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSchema(itemType: string): string {
|
getSchema(itemType: string): string {
|
||||||
let schema = null;
|
let schema = null;
|
||||||
if (this.itemTypes && this.itemTypes[itemType]) schema = this.itemTypes[itemType].schema;
|
if (this.itemTypes[itemType]) schema = this.itemTypes[itemType].schema;
|
||||||
return schema;
|
return schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
hasViewer(item: IItem) {
|
hasViewer(item: IItem) {
|
||||||
const itemType: string = item.itemType;
|
const itemType: string = item.itemType;
|
||||||
if (this.itemTypes && this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined;
|
if (this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
hasEditor(item: IItem) {
|
hasEditor(item: IItem) {
|
||||||
const itemType: string = item.itemType;
|
const itemType: string = item.itemType;
|
||||||
if (this.itemTypes && this.itemTypes[itemType]) return this.itemTypes[itemType].editor !== undefined;
|
if (this.itemTypes[itemType]) return this.itemTypes[itemType].editor !== undefined;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user