From 3893d4913852bd92b2a71880bb7c7cf39aba0c2c Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 14 Sep 2020 12:23:50 -0400 Subject: fixes to sidebar menus to simplify them for novices. fixed clearAll menu items --- src/client/util/CurrentUserUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/util/CurrentUserUtils.ts') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 3dc16b864..17f1146b1 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -779,7 +779,7 @@ export class CurrentUserUtils { treeViewTruncateTitleWidth: 150, treeViewPreventOpen: false, lockedPosition: true, boxShadow: "0 0", dontRegisterChildViews: true, targetDropAction: "same", system: true })); - const clearAll = ScriptField.MakeScript(`self.data = new List([])`); + const clearAll = ScriptField.MakeScript(`getProto(self).data = new List([])`); (doc.myRecentlyClosedDocs as any as Doc).contextMenuScripts = new List([clearAll!]); (doc.myRecentlyClosedDocs as any as Doc).contextMenuLabels = new List(["Clear All"]); } @@ -794,7 +794,7 @@ export class CurrentUserUtils { treeViewTruncateTitleWidth: 150, treeViewPreventOpen: false, lockedPosition: true, boxShadow: "0 0", dontRegisterChildViews: true, targetDropAction: "same", system: true })); - const clearAll = ScriptField.MakeScript(`self.data = new List([])`); + const clearAll = ScriptField.MakeScript(`getProto(self).data = new List([])`); (doc.myFilter as any as Doc).contextMenuScripts = new List([clearAll!]); (doc.myFilter as any as Doc).contextMenuLabels = new List(["Clear All"]); } -- cgit v1.2.3-70-g09d2