From a4959a79b002a25617a84e6edff1148fff666c68 Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Fri, 19 Jun 2020 11:37:39 +0530 Subject: initial commit: added group document type + started setting up GroupManager --- src/client/documents/DocumentTypes.ts | 1 + src/client/documents/Documents.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'src/client/documents') diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index 7ba21b2f6..5697a5bc0 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -36,4 +36,5 @@ export enum DocumentType { LINKDB = "linkdb", // database of links ??? why do we have this SCRIPTDB = "scriptdb", // database of scripts RECOMMENDATION = "recommendation", // view of a recommendation + GROUPDB = "groupdb" // database of groups } \ No newline at end of file diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index dac3a1aaa..980c52dd0 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -310,6 +310,11 @@ export namespace Docs { [DocumentType.COMPARISON, { layout: { view: ComparisonBox, dataField: defaultDataKey }, }], + [DocumentType.GROUPDB, { + data: new List(), + layout: { view: EmptyBox, dataField: defaultDataKey }, + options: { childDropAction: "alias", title: "Global Group Database" } + }], ]); // All document prototypes are initialized with at least these values @@ -372,6 +377,13 @@ export namespace Docs { return Prototypes.get(DocumentType.SCRIPTDB); } + /** + * A collection of all groups in the database + */ + export function MainGroupDocument() { + return Prototypes.get(DocumentType.GROUPDB); + } + /** * This is a convenience method that is used to initialize * prototype documents for the first time. -- cgit v1.2.3-70-g09d2