aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTimeView.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-02-25 15:36:49 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-02-25 15:36:49 -0500
commit95451a2eb0871856b946fff8a14ca0c385af5f1b (patch)
tree90c18c68c4e077d63dd3286d527b243ac6cdc501 /src/client/views/collections/CollectionTimeView.tsx
parent02bceed486ecb03b94c757ae669f69912f282cdd (diff)
parent17ee7f6f1f61a079ec79b71aebc65abfd72ec32a (diff)
merging
Diffstat (limited to 'src/client/views/collections/CollectionTimeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTimeView.tsx37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/client/views/collections/CollectionTimeView.tsx b/src/client/views/collections/CollectionTimeView.tsx
index cd91cbf63..1f6322997 100644
--- a/src/client/views/collections/CollectionTimeView.tsx
+++ b/src/client/views/collections/CollectionTimeView.tsx
@@ -8,7 +8,7 @@ import { RichTextField } from "../../../fields/RichTextField";
import { listSpec } from "../../../fields/Schema";
import { ComputedField, ScriptField } from "../../../fields/ScriptField";
import { Cast, NumCast, StrCast } from "../../../fields/Types";
-import { emptyFunction, returnFalse, returnTrue, setupMoveUpEvents } from "../../../Utils";
+import { emptyFunction, returnFalse, returnTrue, setupMoveUpEvents, returnEmptyString } from "../../../Utils";
import { Docs, DocUtils } from "../../documents/Documents";
import { DocumentManager } from "../../util/DocumentManager";
import { Scripting } from "../../util/Scripting";
@@ -62,11 +62,10 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
async componentDidMount() {
this.props.setContentView?.(this);
- const detailView = (await DocCastAsync(this.props.Document.childClickedOpenTemplateView)) || DocUtils.findTemplate("detailView", StrCast(this.rootDoc.type), "");
+ //const detailView = (await DocCastAsync(this.props.Document.childClickedOpenTemplateView)) || DocUtils.findTemplate("detailView", StrCast(this.rootDoc.type), "");
///const childText = "const alias = getAlias(self); switchView(alias, detailView); alias.dropAction='alias'; alias.removeDropProperties=new List<string>(['dropAction']); useRightSplit(alias, shiftKey); ";
- const childText = "openInLightbox(self, shiftKey); ";
runInAction(() => {
- this._childClickedScript = ScriptField.MakeScript(childText, { this: Doc.name, shiftKey: "boolean" }, { detailView: detailView! });
+ this._childClickedScript = ScriptField.MakeScript("openInLightbox(self, shiftKey)", { this: Doc.name, shiftKey: "boolean" });//, { detailView: detailView! });
this._viewDefDivClick = ScriptField.MakeScript("pivotColumnClick(this,payload)", { payload: "any" });
});
}
@@ -193,22 +192,22 @@ export class CollectionTimeView extends CollectionSubView(doc => doc) {
}
@computed get pivotKeyUI() {
- const newEditableViewProps = {
- GetValue: () => "",
- SetValue: (value: any) => {
- if (value?.length) {
- this.layoutDoc._pivotField = value;
- return true;
- }
- return false;
- },
- showMenuOnLoad: true,
- contents: ":" + StrCast(this.layoutDoc._pivotField),
- toggle: this.toggleVisibility,
- color: "#f1efeb" // this.props.headingObject ? this.props.headingObject.color : "#f1efeb";
- };
return <div className={"pivotKeyEntry"}>
- <EditableView {...newEditableViewProps} display={"inline"} menuCallback={this.menuCallback} />
+ <EditableView
+ GetValue={returnEmptyString}
+ SetValue={(value: any) => {
+ if (value?.length) {
+ this.layoutDoc._pivotField = value;
+ return true;
+ }
+ return false;
+ }}
+ toggle={this.toggleVisibility}
+ background={"#f1efeb"} // this.props.headingObject ? this.props.headingObject.color : "#f1efeb";
+ contents={":" + StrCast(this.layoutDoc._pivotField)}
+ showMenuOnLoad={true}
+ display={"inline"}
+ menuCallback={this.menuCallback} />
</div>;
}