diff options
author | bobzel <zzzman@gmail.com> | 2020-08-05 18:05:09 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-05 18:05:09 -0400 |
commit | 1c01a1579f279237e364b230d42518aa678e3dcf (patch) | |
tree | 4d2648d2f1c1a6e432a674021f0582a37b340ca4 /src | |
parent | 99e1d8832805b67a88c8c7e6b7a48938289807df (diff) |
restored function lost in merge
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 70a4ceb68..ba97b9fe0 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -769,8 +769,19 @@ export class CurrentUserUtils { } } + static setupSidebarContainer(doc: Doc) { + if (doc["sidebar"] === undefined) { + const sidebarContainer = new Doc(); + sidebarContainer._chromeStatus = "disabled"; + sidebarContainer.onClick = ScriptField.MakeScript("freezeSidebar()"); + doc["sidebar"] = new PrefetchProxy(sidebarContainer); + } + return doc["sidebar"] as Doc; + } + // setup the list of sidebar mode buttons which determine what is displayed in the sidebar static async setupSidebarButtons(doc: Doc) { + CurrentUserUtils.setupSidebarContainer(doc); await CurrentUserUtils.setupToolsBtnPanel(doc); CurrentUserUtils.setupWorkspaces(doc); CurrentUserUtils.setupCatalog(doc); |