From 7ceac5f7f4cc8172bde90c2d495da3779901ef84 Mon Sep 17 00:00:00 2001 From: Fawn Date: Fri, 19 Apr 2019 18:31:38 -0400 Subject: templating saves --- src/fields/KeyStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/fields/KeyStore.ts') diff --git a/src/fields/KeyStore.ts b/src/fields/KeyStore.ts index 16a909eb8..1602c3776 100644 --- a/src/fields/KeyStore.ts +++ b/src/fields/KeyStore.ts @@ -19,7 +19,9 @@ export namespace KeyStore { export const Data = new Key("Data"); export const Annotations = new Key("Annotations"); export const ViewType = new Key("ViewType"); + export const BaseLayout = new Key("BaseLayout"); export const Layout = new Key("Layout"); + export const Template = new Key("Template"); export const BackgroundColor = new Key("BackgroundColor"); export const BackgroundLayout = new Key("BackgroundLayout"); export const OverlayLayout = new Key("OverlayLayout"); @@ -49,7 +51,7 @@ export namespace KeyStore { export const CopyDraggedItems = new Key("CopyDraggedItems"); export const KeyList: Key[] = [Prototype, X, Y, Page, Title, Author, PanX, PanY, Scale, NativeWidth, NativeHeight, - Width, Height, ZIndex, Zoom, Data, Annotations, ViewType, Layout, BackgroundColor, BackgroundLayout, OverlayLayout, LayoutKeys, + Width, Height, ZIndex, Zoom, Data, Annotations, ViewType, BaseLayout, Layout, BackgroundColor, BackgroundLayout, OverlayLayout, LayoutKeys, LayoutFields, ColumnsKey, SchemaSplitPercentage, Caption, ActiveWorkspace, DocumentText, BrushingDocs, LinkedToDocs, LinkedFromDocs, LinkDescription, LinkTags, Thumbnail, ThumbnailPage, CurPage, AnnotationOn, NumPages, Ink, Cursors, OptionalRightCollection, Archives, Workspaces, Minimized, CopyDraggedItems -- cgit v1.2.3-70-g09d2 From e794b4b38e8ab2f4e7a79f223f9488cc845c724f Mon Sep 17 00:00:00 2001 From: Fawn Date: Mon, 22 Apr 2019 00:05:35 -0400 Subject: mutiple templates can be used --- src/client/documents/Documents.ts | 6 ++-- src/client/views/DocumentDecorations.tsx | 14 +++++--- src/client/views/TemplateMenu.tsx | 18 +++++----- src/client/views/Templates.tsx | 61 ++++++++++++++++++-------------- src/client/views/nodes/DocumentView.tsx | 43 ++++++++++++++++------ src/fields/KeyStore.ts | 2 +- src/fields/TemplateField.ts | 22 ++++++++---- src/server/Message.ts | 2 +- src/server/ServerUtil.ts | 3 +- 9 files changed, 106 insertions(+), 65 deletions(-) (limited to 'src/fields/KeyStore.ts') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index eba53273f..c93e65edb 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -50,7 +50,7 @@ export interface DocumentOptions { scale?: number; baseLayout?: string; layout?: string; - template?: Template; + templates?: Array