aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-01 16:08:35 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-01 16:08:35 -0400
commitae21e365e8ed34060bd94ee04d0d8b3a1f3479f3 (patch)
tree53c7e0dc6f6e9e83baa2a94f7bf5097d76640c88 /src/client
parent72a838b6a6165c7fa3050d78dbf16bf2cca6b840 (diff)
added doubleClick open on right to detailView template for Buxton
Diffstat (limited to 'src/client')
-rw-r--r--src/client/documents/Documents.ts1
-rw-r--r--src/client/views/collections/CollectionCarouselView.tsx4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 732f9303b..a8b10bc7b 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -123,6 +123,7 @@ export interface DocumentOptions {
borderRounding?: string;
boxShadow?: string;
dontRegisterChildren?: boolean;
+ "onDoubleClick-rawScript"?: string // onDoubleClick script in raw text form
"onClick-rawScript"?: string; // onClick script in raw text form
"onCheckedClick-rawScript"?: string; // onChecked script in raw text form
"onCheckedClick-params"?: List<string>; // parameter list for onChecked treeview functions
diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx
index 08d49f8a5..4086294ad 100644
--- a/src/client/views/collections/CollectionCarouselView.tsx
+++ b/src/client/views/collections/CollectionCarouselView.tsx
@@ -4,7 +4,7 @@ import { observer } from 'mobx-react';
import * as React from 'react';
import { documentSchema } from '../../../new_fields/documentSchemas';
import { makeInterface } from '../../../new_fields/Schema';
-import { NumCast, StrCast } from '../../../new_fields/Types';
+import { NumCast, StrCast, ScriptCast } from '../../../new_fields/Types';
import { DragManager } from '../../util/DragManager';
import { ContentFittingDocumentView } from '../nodes/ContentFittingDocumentView';
import "./CollectionCarouselView.scss";
@@ -48,6 +48,8 @@ export class CollectionCarouselView extends CollectionSubView(CarouselDocument)
<>
<div className="collectionCarouselView-image" key="image">
<ContentFittingDocumentView {...this.props}
+ onDoubleClick={ScriptCast(this.layoutDoc.onChildDoubleClick)}
+ onClick={ScriptCast(this.layoutDoc.onChildClick)}
renderDepth={this.props.renderDepth + 1}
Document={this.childLayoutPairs[index].layout}
DataDoc={this.childLayoutPairs[index].data}