aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <abdullah_ahmed@brown.edu>2019-05-09 18:45:20 -0400
committerSam Wilkins <abdullah_ahmed@brown.edu>2019-05-09 18:45:20 -0400
commitd6b7ee34014be0e990d0d3967225dde1daaed5d0 (patch)
treef49b69e8a5ab6aaadf21a00fa5191bdfb6863144 /src
parent508410d810f61b8f8602dedbbba3e0736c1f5ba3 (diff)
removed template field, cleaned up cursor refactor
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/Documents.ts1
-rw-r--r--src/fields/TemplateField.ts43
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