diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-01-29 23:01:20 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-01-29 23:01:20 -0500 |
commit | bbaf25c10a3e1fcb36c75d8dedc825a955eab369 (patch) | |
tree | 34ac3ca93cc9fef67db676376b2a231a44d64f71 /src/client/util/DropConverter.ts | |
parent | ab7c316818248bc7216b1b8f3b00b8bcf006a8a5 (diff) |
switched icons over to templates. a bunch of template fixes for working with textboxes as templates.
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r-- | src/client/util/DropConverter.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts index 5543edf78..03d8ac953 100644 --- a/src/client/util/DropConverter.ts +++ b/src/client/util/DropConverter.ts @@ -15,16 +15,15 @@ export function makeTemplate(doc: Doc): boolean { let any = false; docs.forEach(d => { if (!StrCast(d.title).startsWith("-")) { - any = true; - Doc.MakeMetadataFieldTemplate(d, Doc.GetProto(layoutDoc)); + any = Doc.MakeMetadataFieldTemplate(d, Doc.GetProto(layoutDoc)) || any; } else if (d.type === DocumentType.COL || d.data instanceof RichTextField) { any = makeTemplate(d) || any; } }); if (layoutDoc[fieldKey] instanceof RichTextField) { - layoutDoc._textTemplate = ComputedField.MakeFunction("copyField(this.data)", { this: Doc.name }); - layoutDoc.isTemplateForField = "data"; - any = true; + if (!StrCast(layoutDoc.title).startsWith("-")) { + any = Doc.MakeMetadataFieldTemplate(layoutDoc, Doc.GetProto(layoutDoc)); + } } return any; } |