diff options
| author | zaultavangar <zaul_tavangar@brown.edu> | 2023-12-16 17:26:32 -0500 |
|---|---|---|
| committer | zaultavangar <zaul_tavangar@brown.edu> | 2023-12-16 17:26:32 -0500 |
| commit | 4a1d64e470f7f8fae90e5014f3e6e64c5ffea2c8 (patch) | |
| tree | c9be41dc96a377e7e72d41e017c490bfba49a9f7 /src/client/views/DashboardView.tsx | |
| parent | ddf35f6b406a2f2e8c27c2c65d15206eaa3ddbe6 (diff) | |
more functionality for calendar feature
Diffstat (limited to 'src/client/views/DashboardView.tsx')
| -rw-r--r-- | src/client/views/DashboardView.tsx | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx index 2765e95e6..3c8221f6a 100644 --- a/src/client/views/DashboardView.tsx +++ b/src/client/views/DashboardView.tsx @@ -379,13 +379,42 @@ export class DashboardView extends React.Component { Doc.AddDocToList(Doc.MyDashboards, 'data', dashboardDoc); DashboardView.SetupDashboardTrails(dashboardDoc); - + DashboardView.SetupDashboardCalendars(dashboardDoc); // open this new dashboard Doc.ActiveDashboard = dashboardDoc; Doc.ActivePage = 'dashboard'; Doc.ActivePresentation = undefined; }; + public static SetupDashboardCalendars(dashboardDoc: Doc){ + // this section is creating the button document itself === myTrails = new Button + + // create a a list of calendars (as a CalendarCollectionDocument) and store it on the new dashboard + const reqdOpts: DocumentOptions = { + title: 'My Calendars', + _layout_showTitle: 'title', + _height: 100, + treeView_HideTitle: true, + _layout_fitWidth: true, + _gridGap: 5, + _forceActive: true, + childDragAction: 'embed', + treeView_TruncateTitleWidth: 150, + ignoreClick: true, + contextMenuIcons: new List<string>(['plus']), + contextMenuLabels: new List<string>(['Create New Calendar']), + _lockedPosition: true, + layout_boxShadow: '0 0', + childDontRegisterViews: true, + dropAction: 'same', + isSystem: true, + layout_explainer: 'All of the calendars that you have created will appear here.', + }; + const myCalendars = DocUtils.AssignScripts(Docs.Create.CalendarCollectionDocument([], reqdOpts)); + // { treeView_ChildDoubleClick: 'openPresentation(documentView.rootDoc)' } + dashboardDoc.myCalendars = new PrefetchProxy(myCalendars); + } + public static SetupDashboardTrails(dashboardDoc: Doc) { // this section is creating the button document itself === myTrails = new Button const reqdBtnOpts: DocumentOptions = { |
