From bbaf25c10a3e1fcb36c75d8dedc825a955eab369 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 29 Jan 2020 23:01:20 -0500 Subject: switched icons over to templates. a bunch of template fixes for working with textboxes as templates. --- src/client/util/DropConverter.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/client/util/DropConverter.ts') 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; } -- cgit v1.2.3-70-g09d2