aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-01-25 17:28:57 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-01-25 17:28:57 -0500
commit0d263dba422a96c5d22f29a9b6411ff074c92645 (patch)
treee791fde96894b4dfc2fe8e8385acc311737044ab /src/client/views/collections/CollectionTreeView.tsx
parent69c9188ddc8d3316d78c3af8db6a89667bfa0cd8 (diff)
added carousel view
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 2208de264..a54449638 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -632,20 +632,13 @@ export class CollectionTreeView extends CollectionSubView(Document) {
}
ContextMenu.Instance.addItem({
description: "Buxton Layout", icon: "eye", event: () => {
- const { TextDocument, ImageDocument, MulticolumnDocument, TreeDocument } = Docs.Create;
+ const { TextDocument, ImageDocument, MulticolumnDocument, TreeDocument, CarouselDocument } = Docs.Create;
const { Document } = this.props;
const fallbackImg = "http://www.cs.brown.edu/~bcz/face.gif";
const detailedTemplate = `{ "doc": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "dashField", "attrs": { "fieldKey": "short_description" } } ] }, { "type": "paragraph", "content": [ { "type": "dashField", "attrs": { "fieldKey": "year" } } ] }, { "type": "paragraph", "content": [ { "type": "dashField", "attrs": { "fieldKey": "company" } } ] } ] }, "selection":{"type":"text","anchor":1,"head":1},"storedMarks":[] }`;
const detailedLayout = Docs.Create.StackingDocument([
- ImageDocument(fallbackImg, { title: "activeHero" }),
- MulticolumnDocument([], {
- title: "data", _height: 100, onChildClick: ScriptField.MakeFunction(
- `containingCollection.resolvedDataDoc.activeHero = copyField(this.data);
- containingCollection.resolvedDataDoc.activeHero["activeHero-nativeWidth"] = copyField(this.data["data-nativeWidth"]);
- containingCollection.resolvedDataDoc.activeHero["activeHero-nativeHeight"] = copyField(this.data["data-nativeHeight"]);
- `, { containingCollection: Doc.name })
- }),
+ CarouselDocument([], { title: "data", _height: 350, _itemIndex: 0 }),
TextDocument("", { title: "details", _autoHeight: true, _textTemplate: new RichTextField(detailedTemplate, "short_description year company") })
], { _chromeStatus: "disabled", title: "detailed layout stack" });
detailedLayout.isTemplateDoc = makeTemplate(detailedLayout);