aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DashboardView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-16 19:17:57 -0500
committerbobzel <zzzman@gmail.com>2023-12-16 19:17:57 -0500
commit5c255f655bf8a8ab8d9a7522b3c80f66aa24a5a2 (patch)
treeeb8445a13a206a1daa27e97bc75205413cd57c8a /src/client/views/DashboardView.tsx
parent4c4b42ee00262bb1fed10c73a6d35e013e2b9ab0 (diff)
parentfe4150d92a5cf69441ef2855c90da6350509ac68 (diff)
merged with zaul's branch
Diffstat (limited to 'src/client/views/DashboardView.tsx')
-rw-r--r--src/client/views/DashboardView.tsx31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx
index 85cee83d4..523721b84 100644
--- a/src/client/views/DashboardView.tsx
+++ b/src/client/views/DashboardView.tsx
@@ -384,13 +384,42 @@ export class DashboardView extends ObservableReactComponent<{}> {
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 = {