diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-13 18:47:56 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-13 18:47:56 -0400 |
| commit | ab500561d6924d867c828b6e407827b7d6b34278 (patch) | |
| tree | 1b0603c8fcd2024dd8cc912abf50878d7cd18c8b /src/fields | |
| parent | a2a1f480a9af6cdf9863750df9314e29455cba60 (diff) | |
| parent | 3debb7fedcd9c955ede46e57d4da182a5fa9acae (diff) | |
Merge branch 'master' into schema_search
Diffstat (limited to 'src/fields')
| -rw-r--r-- | src/fields/ScriptField.ts | 4 | ||||
| -rw-r--r-- | src/fields/documentSchemas.ts | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/fields/ScriptField.ts b/src/fields/ScriptField.ts index 4cc3a7cc7..9391f56ac 100644 --- a/src/fields/ScriptField.ts +++ b/src/fields/ScriptField.ts @@ -56,6 +56,9 @@ async function deserializeScript(script: ScriptField) { if (script.script.originalScript === 'self.userDoc.noviceMode') { return (script as any).script = (ScriptField.NoviceMode ?? (ScriptField.NoviceMode = ComputedField.MakeFunction('self.userDoc.noviceMode')))?.script; } + if (script.script.originalScript === `selectMainMenu(self)`) { + return (script as any).script = (ScriptField.SelectMenu ?? (ScriptField.SelectMenu = ComputedField.MakeFunction('selectMainMenu(self)')))?.script; + } const captures: ProxyField<Doc> = (script as any).captures; if (captures) { const doc = (await captures.value())!; @@ -89,6 +92,7 @@ export class ScriptField extends ObjectField { public static DeiconifyView: Opt<ScriptField>; public static ConvertToButtons: Opt<ScriptField>; public static NoviceMode: Opt<ScriptField>; + public static SelectMenu: Opt<ScriptField>; constructor(script: CompiledScript, setterscript?: CompiledScript) { super(); diff --git a/src/fields/documentSchemas.ts b/src/fields/documentSchemas.ts index ada13226e..848a648e1 100644 --- a/src/fields/documentSchemas.ts +++ b/src/fields/documentSchemas.ts @@ -102,7 +102,7 @@ export const documentSchema = createSchema({ _lockedTransform: "boolean",// whether a freeformview can pan/zoom // drag drop properties - stayInCollection: "boolean",// whether document can be dropped into a different collection + _stayInCollection: "boolean",// whether document can be dropped into a different collection dragFactory: Doc, // the document that serves as the "template" for the onDragStart script. ie, to drag out copies of the dragFactory document. dropAction: "string", // override specifying what should happen when this document is dropped (can be "alias", "copy", "move") targetDropAction: "string", // allows the target of a drop event to specify the dropAction ("alias", "copy", "move") NOTE: if the document is dropped within the same collection, the dropAction is coerced to 'move' |
