diff --git a/src/public/app/doc_notes/en/User Guide/!!!meta.json b/src/public/app/doc_notes/en/User Guide/!!!meta.json index f7ee2b545..b90fd4f50 100644 --- a/src/public/app/doc_notes/en/User Guide/!!!meta.json +++ b/src/public/app/doc_notes/en/User Guide/!!!meta.json @@ -11,7 +11,7 @@ "title": "User Guide", "notePosition": 20, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [ @@ -166,7 +166,7 @@ "title": "Features", "notePosition": 40, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [], @@ -314,7 +314,7 @@ "title": "Note Types", "notePosition": 70, "prefix": null, - "isExpanded": false, + "isExpanded": true, "type": "text", "mime": "text/html", "attributes": [], @@ -536,6 +536,208 @@ "dataFileName": "19_Geo map_image.png" } ] + }, + { + "isClone": false, + "noteId": "pSDzQIgLGswQ", + "notePath": [ + "OkOZllzB3fqN", + "wmegHv51MJMd", + "pSDzQIgLGswQ" + ], + "title": "Book", + "notePosition": 30, + "prefix": null, + "isExpanded": true, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "label", + "name": "iconClass", + "value": "bx bx-book-alt", + "isInheritable": false, + "position": 10 + } + ], + "format": "html", + "attachments": [], + "dirFileName": "Book", + "children": [ + { + "isClone": false, + "noteId": "fDGg7QcJg3Xm", + "notePath": [ + "OkOZllzB3fqN", + "wmegHv51MJMd", + "pSDzQIgLGswQ", + "fDGg7QcJg3Xm" + ], + "title": "Calendar View", + "notePosition": 10, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "label", + "name": "iconClass", + "value": "bx bx-calendar", + "isInheritable": false, + "position": 10 + } + ], + "format": "html", + "dataFileName": "Calendar View.html", + "attachments": [ + { + "attachmentId": "j1NIQJvjsFrc", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "Calendar View_image.png" + }, + { + "attachmentId": "9FxGltAPWr9V", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "1_Calendar View_image.png" + }, + { + "attachmentId": "8kfaJPGjJ1t5", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "2_Calendar View_image.png" + }, + { + "attachmentId": "GaH4K6lKfcQe", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "3_Calendar View_image.png" + }, + { + "attachmentId": "xr4c0Mdf7gPm", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "4_Calendar View_image.png" + }, + { + "attachmentId": "K8NQktF9sCss", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "5_Calendar View_image.png" + }, + { + "attachmentId": "fFaq1mWTFlJA", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "6_Calendar View_image.png" + }, + { + "attachmentId": "2CExLYphNtCd", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "7_Calendar View_image.png" + }, + { + "attachmentId": "UaXBPb7fINm4", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "8_Calendar View_image.png" + }, + { + "attachmentId": "TIzqtnGIPlxu", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "9_Calendar View_image.png" + }, + { + "attachmentId": "p7eRe4TFFdIt", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "10_Calendar View_image.png" + }, + { + "attachmentId": "bnKESYv4Toa1", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "11_Calendar View_image.png" + }, + { + "attachmentId": "MwECr6EjQjEE", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "12_Calendar View_image.png" + }, + { + "attachmentId": "0J8MfQPq7E1H", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "13_Calendar View_image.png" + }, + { + "attachmentId": "0yGXmgB3yfGg", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "14_Calendar View_image.png" + }, + { + "attachmentId": "XBOyB2RH28OS", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "15_Calendar View_image.png" + }, + { + "attachmentId": "BsiAqW51VJOz", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "16_Calendar View_image.png" + }, + { + "attachmentId": "RTFdV19BHn28", + "title": "image.png", + "role": "image", + "mime": "image/png", + "position": 10, + "dataFileName": "17_Calendar View_image.png" + } + ] + } + ] } ] }, @@ -624,7 +826,7 @@ "title": "Examples", "notePosition": 10, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [], @@ -895,7 +1097,7 @@ "title": "ETAPI", "notePosition": 10, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [], @@ -945,7 +1147,7 @@ "title": "Internal API", "notePosition": 20, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [], diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/10_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/10_Calendar View_image.png new file mode 100644 index 000000000..f60aa0acc Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/10_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/11_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/11_Calendar View_image.png new file mode 100644 index 000000000..7e97245a6 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/11_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/12_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/12_Calendar View_image.png new file mode 100644 index 000000000..b594af6a6 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/12_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/13_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/13_Calendar View_image.png new file mode 100644 index 000000000..d3d64f75c Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/13_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/14_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/14_Calendar View_image.png new file mode 100644 index 000000000..d588ed568 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/14_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/15_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/15_Calendar View_image.png new file mode 100644 index 000000000..71f7d2dc3 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/15_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/16_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/16_Calendar View_image.png new file mode 100644 index 000000000..46698faac Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/16_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/17_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/17_Calendar View_image.png new file mode 100644 index 000000000..fceb0563c Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/17_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/1_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/1_Calendar View_image.png new file mode 100644 index 000000000..71d6c38f1 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/1_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/2_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/2_Calendar View_image.png new file mode 100644 index 000000000..d8d8f87c1 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/2_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/3_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/3_Calendar View_image.png new file mode 100644 index 000000000..052cddb18 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/3_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/4_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/4_Calendar View_image.png new file mode 100644 index 000000000..bec9d93e1 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/4_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/5_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/5_Calendar View_image.png new file mode 100644 index 000000000..acf382206 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/5_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/6_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/6_Calendar View_image.png new file mode 100644 index 000000000..57964953a Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/6_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/7_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/7_Calendar View_image.png new file mode 100644 index 000000000..53ac5632f Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/7_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/8_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/8_Calendar View_image.png new file mode 100644 index 000000000..aa9e445ad Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/8_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/9_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/9_Calendar View_image.png new file mode 100644 index 000000000..e050184a7 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/9_Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html new file mode 100644 index 000000000..d5364a1e9 --- /dev/null +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html @@ -0,0 +1,192 @@ + + + + + + + + Calendar View + + + +
+

Calendar View

+ +
+
+ +
+

The Calendar view of Book notes will display each child note in a calendar + that has a start date and optionally an end date, as an event.

+

Unlike other Book view types, the Calendar view also allows some kind + of interaction, such as moving events around as well as creating new ones.

+

Creating a calendar

+
+ + + + + + + + + + + + + + + + + + +
1 +
+ +
+

 

+
+

The Calendar View works only for Book note types. To create a new note, + right click on the note tree on the left and select Insert note after, + or Insert child note and then select Book.

+

 

+
2 +
+ +
+
Once created, the “View type” of the Book needs changed to “Calendar”, + by selecting the “Book Properties” tab in the ribbon.
+
+

Creating a new event/note

+ +

Interacting with events

+ +

Configuring the calendar

+ +

How the calendar works

+

+ The calendar displays all the child notes of the book that have a #startDate. + An #endDate can optionally be added.

+

If editing the start date and end date from the note itself is desirable, + the following attributes can be added to the book note:

#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes 
+

This will result in:

+

+ +

+

Advanced use-cases

+

Using a different attribute as event title

+

By default, events are displayed on the calendar by their note title. + However, it is possible to configure a different attribute to be displayed + instead.

+

To do so, assign #calendar:title to the child note (not the + calendar/book note), with the value being #name where name can + be any label. The attribute can also come through inheritance such as a + template attribute. If the note does not have the requested label, the + title of the note will be used instead.

+
+ + + + + + + +
+
+ +
+
+
+ +
+
+
+

Using a relation attribute as event title

+

Similarly to using an attribute, use #calendar:title and set + it to ~name where name is the name of the relation + to use.

+

Moreover, if there are more relations of the same name, they will be displayed + as multiple events coming from the same note.

+
+ + + + + + + +
+
+ +
+
+
+ +
+
+
+

Note that it's even possible to have a #calendar:title on the + target note (e.g. “John Smith”) which will try to render an attribute of + it. Note that it's not possible to use a relation here as well for safety + reasons (an accidental recursion  of attributes could cause the application + to loop infinitely).

+
+ + + + + + + +
+
+ +
+
+
+ +
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View_image.png new file mode 100644 index 000000000..d46f327a2 Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View_image.png differ diff --git a/src/public/app/doc_notes/en/User Guide/navigation.html b/src/public/app/doc_notes/en/User Guide/navigation.html index 77cf9ca53..85143e944 100644 --- a/src/public/app/doc_notes/en/User Guide/navigation.html +++ b/src/public/app/doc_notes/en/User Guide/navigation.html @@ -29,6 +29,12 @@
  • Geo map
  • +
  • Book + +
  • Shared notes diff --git a/src/public/app/widgets/buttons/global_menu.ts b/src/public/app/widgets/buttons/global_menu.ts index 9d04c8e56..67a235709 100644 --- a/src/public/app/widgets/buttons/global_menu.ts +++ b/src/public/app/widgets/buttons/global_menu.ts @@ -365,6 +365,7 @@ export default class GlobalMenuWidget extends BasicWidget { this.$zoomState = this.$widget.find(".zoom-state"); this.$toggleZenMode = this.$widget.find('[data-trigger-command="toggleZenMode"'); + this.$toggleZenMode.toggle(!utils.isMobile()); this.$widget.on("show.bs.dropdown", () => this.#onShown()); if (this.tooltip) { this.$widget.on("hide.bs.dropdown", () => this.tooltip.enable()); diff --git a/src/public/app/widgets/view_widgets/calendar_view.ts b/src/public/app/widgets/view_widgets/calendar_view.ts index 27ba46d74..70b68e98f 100644 --- a/src/public/app/widgets/view_widgets/calendar_view.ts +++ b/src/public/app/widgets/view_widgets/calendar_view.ts @@ -155,16 +155,10 @@ export default class CalendarView extends ViewMode { async #onEventMoved(e: EventChangeArg) { const startDate = CalendarView.#formatDateToLocalISO(e.event.start); + // Fullcalendar end date is exclusive, not inclusive but we store it the other way around. let endDate = CalendarView.#formatDateToLocalISO(CalendarView.#offsetDate(e.event.end, -1)); const noteId = e.event.extendedProps.noteId; - // Fullcalendar end date is exclusive, not inclusive but we store it the other way around. - if (endDate) { - const endDateParsed = new Date(endDate); - endDateParsed.setDate(endDateParsed.getDate() - 1); - endDate = CalendarView.#formatDateToLocalISO(endDateParsed); - } - // Don't store the end date if it's empty. if (endDate === startDate) { endDate = undefined;