diff options
author | bobzel <zzzman@gmail.com> | 2023-01-13 10:04:53 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-01-13 10:04:53 -0500 |
commit | 603d3c0d500fd14dd732040d588fec0e91768729 (patch) | |
tree | 497e4e30cfe544ab45d912609e44f13e24be8a99 /src/client/documents/Documents.ts | |
parent | bb185ceffcac42af373faf40e0bc2225150c243d (diff) |
cleaned up linkmanager a little. maded myshareddocs a folder in myfilesystem. fixed setting author on copied documents to current user.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index a5190e66c..b51fcb454 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -834,13 +834,11 @@ export namespace Docs { viewDoc = Doc.assign(Doc.MakeDelegate(dataDoc, delegId), viewFirstProps, true, true); } Doc.assign(viewDoc, viewProps, true, true); - ![DocumentType.LINK, DocumentType.MARKER, DocumentType.LABEL].includes(viewDoc.type as any) && DocUtils.MakeLinkToActiveAudio(() => viewDoc); + if (![DocumentType.LINK, DocumentType.MARKER, DocumentType.LABEL].includes(viewDoc.type as any)) { + DocUtils.MakeLinkToActiveAudio(() => viewDoc); + } - !Doc.IsSystem(dataDoc) && - ![DocumentType.MARKER, DocumentType.KVP, DocumentType.LINK, DocumentType.LINKANCHOR].includes(proto.type as any) && - !dataDoc.isFolder && - !dataProps.annotationOn && - Doc.AddDocToList(Doc.MyFileOrphans, undefined, dataDoc); + Doc.AddFileOrphan(dataDoc); updateCachedAcls(dataDoc); updateCachedAcls(viewDoc); @@ -1875,7 +1873,7 @@ export namespace DocUtils { export function copyDragFactory(dragFactory: Doc) { if (!dragFactory) return undefined; const ndoc = dragFactory.isTemplateDoc ? Doc.ApplyTemplate(dragFactory) : Doc.MakeCopy(dragFactory, true); - ndoc && Doc.AddDocToList(Doc.MyFileOrphans, 'data', Doc.GetProto(ndoc)); + ndoc && Doc.AddFileOrphan(Doc.GetProto(ndoc)); if (ndoc && dragFactory['dragFactory-count'] !== undefined) { dragFactory['dragFactory-count'] = NumCast(dragFactory['dragFactory-count']) + 1; Doc.SetInPlace(ndoc, 'title', ndoc.title + ' ' + NumCast(dragFactory['dragFactory-count']).toString(), true); |