diff options
| author | bobzel <zzzman@gmail.com> | 2020-02-10 11:39:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-10 11:39:56 -0500 |
| commit | ffeddae0e12719c7bf2a07468822c9547772febc (patch) | |
| tree | 7b4ae0842791de8df59d4be59fb5ca964f9d5b09 /src/client/views/collections/CollectionTreeView.tsx | |
| parent | a411e92f6e7b486108f5d06564a2cdbbe91ae5ad (diff) | |
| parent | 4adc6b5a343d7ef048354b51444245755759492c (diff) | |
Merge pull request #337 from browngraphicslab/new_importer
New importer
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index ab4804cdd..be2947dff 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -633,11 +633,10 @@ export class CollectionTreeView extends CollectionSubView(Document) { description: "Buxton Layout", icon: "eye", event: () => { DocListCast(this.dataDoc[this.props.fieldKey]).map(d => { DocListCast(d.data).map((img, i) => { - const caption = (d.captions as any)[i]?.data; - if (caption instanceof ObjectField) { - Doc.GetProto(img).caption = ObjectField.MakeCopy(caption); + const caption = (d.captions as any)[i]; + if (caption) { + Doc.GetProto(img).caption = caption; } - d.captions = undefined; }); }); const { TextDocument, ImageDocument, CarouselDocument, TreeDocument } = Docs.Create; @@ -649,13 +648,12 @@ export class CollectionTreeView extends CollectionSubView(Document) { const detailView = Docs.Create.StackingDocument([ CarouselDocument([], { title: "data", _height: 350, _itemIndex: 0, backgroundColor: "#9b9b9b3F" }), textDoc, - TextDocument("", { title: "short_description", _autoHeight: true }), + TextDocument("", { title: "shortDescription", _autoHeight: true }), TreeDocument([], { title: "narratives", _height: 75, treeViewHideTitle: true }) ], { _chromeStatus: "disabled", _width: 300, _height: 300, _autoHeight: true, title: "detailView" }); textDoc.data = new RichTextField(detailedTemplate, "year company"); detailView.isTemplateDoc = makeTemplate(detailView); - const heroView = ImageDocument(fallbackImg, { title: "heroView", isTemplateDoc: true, isTemplateForField: "hero", }); // this acts like a template doc and a template field ... a little weird, but seems to work? heroView.proto!.layout = ImageBox.LayoutString("hero"); heroView.showTitle = "title"; @@ -673,7 +671,6 @@ export class CollectionTreeView extends CollectionSubView(Document) { dragFactory: detailView, removeDropProperties: new List<string>(["dropAction"]), title: "detail view", icon: "file-alt" })); - Document.childLayout = heroView; Document.childDetailed = detailView; Document._viewType = CollectionViewType.Time; |
