aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ButtonBox.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-07-29 11:27:58 -0400
committerFawn <fangrui_tong@brown.edu>2019-07-29 11:27:58 -0400
commit7ea25f83dfcb3fb31bf6fce1f4112c8bded294e2 (patch)
tree1d3cfa0d5f8e3424423c1ed5fdfc06c027c2df48 /src/client/views/nodes/ButtonBox.tsx
parent7098f381f3f93e77880f3589427c81e61a5ee25a (diff)
parente7ea2028f54787d6c92fb22b789f17b7268d3793 (diff)
fixed sub collections having wrong children
Diffstat (limited to 'src/client/views/nodes/ButtonBox.tsx')
-rw-r--r--src/client/views/nodes/ButtonBox.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/ButtonBox.tsx b/src/client/views/nodes/ButtonBox.tsx
index 744611661..d2c23fdab 100644
--- a/src/client/views/nodes/ButtonBox.tsx
+++ b/src/client/views/nodes/ButtonBox.tsx
@@ -14,6 +14,7 @@ import { Doc } from '../../../new_fields/Doc';
import './ButtonBox.scss';
import { observer } from 'mobx-react';
+import { DocumentIconContainer } from './DocumentIcon';
library.add(faEdit);
@@ -51,7 +52,8 @@ export class ButtonBox extends DocComponent<FieldViewProps, ButtonDocument>(Butt
const script = CompileScript(text, {
params: { this: Doc.name },
typecheck: false,
- editable: true
+ editable: true,
+ transformer: DocumentIconContainer.getTransformer()
});
if (!script.compiled) {
onError(script.errors.map(error => error.messageText).join("\n"));
@@ -59,7 +61,7 @@ export class ButtonBox extends DocComponent<FieldViewProps, ButtonDocument>(Butt
}
this.Document.onClick = new ScriptField(script);
overlayDisposer();
- }} />;
+ }} showDocumentIcons />;
overlayDisposer = OverlayView.Instance.addWindow(scriptingBox, { x: 400, y: 200, width: 500, height: 400, title: `${this.Document.title || ""} OnClick` });
}
});