diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/documents/Documents.ts | 1 | ||||
-rw-r--r-- | src/fields/TemplateField.ts | 43 |
2 files changed, 0 insertions, 44 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index a770ccc93..63ba01b6a 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -19,7 +19,6 @@ import { ColumnAttributeModel } from "../northstar/core/attribute/AttributeModel import { AttributeTransformationModel } from "../northstar/core/attribute/AttributeTransformationModel"; import { AggregateFunction } from "../northstar/model/idea/idea"; import { Template } from "../views/Templates"; -import { TemplateField } from "../../fields/TemplateField"; import { MINIMIZED_ICON_SIZE } from "../views/globalCssVariables.scss"; import { IconBox } from "../views/nodes/IconBox"; import { Field, Doc, Opt } from "../../new_fields/Doc"; diff --git a/src/fields/TemplateField.ts b/src/fields/TemplateField.ts deleted file mode 100644 index 72ae13c2e..000000000 --- a/src/fields/TemplateField.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { BasicField } from "./BasicField"; -import { Types } from "../server/Message"; -import { FieldId } from "./Field"; -import { Template, TemplatePosition } from "../client/views/Templates"; - - -export class TemplateField extends BasicField<Array<Template>> { - constructor(data: Array<Template> = [], id?: FieldId, save: boolean = true) { - super(data, save, id); - } - - ToScriptString(): string { - return `new TemplateField("${this.Data}")`; - } - - Copy() { - return new TemplateField(this.Data); - } - - ToJson() { - let templates: Array<{ name: string, position: TemplatePosition, layout: string }> = []; - this.Data.forEach(template => { - templates.push({ name: template.Name, layout: template.Layout, position: template.Position }); - }); - return { - type: Types.Templates, - data: templates, - id: this.Id, - }; - } - - UpdateFromServer(data: any) { - this.data = new Array(data); - } - - static FromJson(id: string, data: any): TemplateField { - let templates: Array<Template> = []; - data.forEach((template: { name: string, position: number, layout: string }) => { - templates.push(new Template(template.name, template.position, template.layout)); - }); - return new TemplateField(templates, id, false); - } -}
\ No newline at end of file |