diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-06 21:58:50 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-06 21:58:50 -0400 |
| commit | 8b02394f24e4f15674bf18192f49ee2385d67655 (patch) | |
| tree | 8840293a778b6d25ae79c016c7d15dbaf4da7746 /src/client/views/collections/CollectionViewChromes.tsx | |
| parent | 68131598cebf0edbccef98d8bcfdba202161ec00 (diff) | |
cleaned up some scripting. added childClicks to UserDoc to extend menu of OnClick options. switched containingCollection to thisContainer for onclick scripts
Diffstat (limited to 'src/client/views/collections/CollectionViewChromes.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionViewChromes.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionViewChromes.tsx b/src/client/views/collections/CollectionViewChromes.tsx index 4a0eb3aa4..9bade1c82 100644 --- a/src/client/views/collections/CollectionViewChromes.tsx +++ b/src/client/views/collections/CollectionViewChromes.tsx @@ -43,14 +43,14 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewChro get target() { return this.props.CollectionView.props.Document; } _templateCommand = { params: ["target", "source"], title: "=> item view", - script: "setChildLayout(this.target, this.source?.[0])", - immediate: (source: Doc[]) => Doc.setChildLayout(this.target, source?.[0]), + script: "target.childLayout = getDocTemplate(this.source?.[0])", + immediate: (source: Doc[]) => this.target.childLayout = Doc.getDocTemplate(source?.[0]), initialize: emptyFunction, }; _narrativeCommand = { params: ["target", "source"], title: "=> click item view", - script: "setChildDetailedLayout(this.target, this.source?.[0])", - immediate: (source: Doc[]) => Doc.setChildDetailedLayout(this.target, source?.[0]), + script: "this.target.childDetailed = getDocTemplate(this.source?.[0])", + immediate: (source: Doc[]) => this.target.childDetailed = Doc.getDocTemplate(source?.[0]), initialize: emptyFunction, }; _contentCommand = { @@ -353,7 +353,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewChro const c = { params: ["target"], title: CollectionViewType.stringFor(vtype), script: `this.target._viewType = ${NumCast(this.props.CollectionView.props.Document._viewType)}`, - immediate: (source: Doc[]) => Doc.setChildLayout(this.target, source?.[0]), + immediate: (source: Doc[]) => this.target = Doc.getTemplateDoc(source?.[0]), initialize: emptyFunction, }; DragManager.StartButtonDrag([this._viewRef.current!], c.script, StrCast(c.title), |
