Skip to content
Merged

Next #42

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions docs/api/configs/activeproject_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ description: You can learn about the activeProject config in the documentation o
If the specified active project doesn't exist or there are no projects loaded into To Do List at all, the *No project* section will be displayed on initialization of the component.

The tasks will belong to the *No project* section in the following cases:
- if the **project** parameter is not specified in the [object of the root task](api/configs/tasks_config.md)
- if **project: null | undefined** is specified in the [object of the root task](api/configs/tasks_config.md)
- if the `project` parameter is not specified in the [object of the root task](api/configs/tasks_config.md)
- if `project: null | undefined` is specified in the [object of the root task](api/configs/tasks_config.md)
:::

### Usage
Expand All @@ -25,7 +25,7 @@ activeProject?: string | number | null;
~~~

:::info
If **activeProject** is not specified and there are no tasks which belong to the *No project* section, the first project from the list of project objects will be loaded as an active one.
If `activeProject` is not specified and there are no tasks which belong to the *No project* section, the first project from the list of project objects will be loaded as an active one.
:::

### Example
Expand All @@ -50,4 +50,4 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Related article:** [Managing projects](guides/project_index.md)
**Related article**: [Managing projects](guides/project_index.md)
4 changes: 2 additions & 2 deletions docs/api/configs/drag_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Change log:** Added in v1.1
**Change log**: Added in v1.1

**Related article:** [Configuration](guides/configuration.md#drag-n-drop)
**Related article**: [Configuration](guides/configuration.md#drag-n-drop)
4 changes: 2 additions & 2 deletions docs/api/configs/history_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ new ToDo("#root", {
});
~~~

**Change log:** The `history` config was added in v1.3
**Change log**: The `history` config was added in v1.3

**Related API:**
**Related API**:
- [`redo`](api/methods/redo_method.md)
- [`undo`](api/methods/undo_method.md)
4 changes: 2 additions & 2 deletions docs/api/configs/locale_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ The Toolbar is a separate component of To Do List . Thus, you also need to apply
To change the locale dynamically, use the [`setLocale()`](api/methods/setlocale_method.md) method
:::

**Related article:** [Localization](guides/localization.md)
**Related article**: [Localization](guides/localization.md)

**Related sample:** [To do list. Localization](https://snippet.dhtmlx.com/kzjwvuq5)
**Related sample**: [To do list. Localization](https://snippet.dhtmlx.com/kzjwvuq5)
18 changes: 9 additions & 9 deletions docs/api/configs/menu_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The callback should return one of the following values:
~~~

- `id` - (required) the ID of the menu item
- `icon` - (optional) the icon for the menu item (by default taken from the **wxi** font)
- `icon` - (optional) the icon for the menu item (by default taken from the `wxi` font)
- `label` - (optional) the text for the menu item
- `hotkey` - (optional) a hotkey for the action from this menu item
- `value` - (optional) the due date, valid for "datepicker"
Expand All @@ -88,7 +88,7 @@ The callback should return one of the following values:
- `"item"` - the basic menu item

<details>
<summary>The **"item"** type default structure</summary>
<summary>The `"item"` type default structure</summary>
~~~js {2}
{
type: "item",
Expand All @@ -107,7 +107,7 @@ The callback should return one of the following values:
- `"separator"` - the line for separating menu items

<details>
<summary>The **"separator"** type default structure</summary>
<summary>The `"separator"` type default structure</summary>
~~~js
{ type: "separator" }
~~~
Expand All @@ -116,7 +116,7 @@ The callback should return one of the following values:
- `"priority"` - the menu item intended for setting priorities

<details>
<summary>The **"priority"** type default structure</summary>
<summary>The `"priority"` type default structure</summary>

By default, there are **High**, **Medium**, and **Low** items displayed in the submenu of the `"setPriority"` item.

Expand Down Expand Up @@ -153,9 +153,9 @@ The callback should return one of the following values:
- `"datepicker"` - the menu item intended for setting dates

<details>
<summary>The **"datepicker"** type default structure</summary>
<summary>The `"datepicker"` type default structure</summary>

By default, the **"datepicker"** item displayed in the submenu of the `"setDate"` item.
By default, the `"datepicker"` item displayed in the submenu of the `"setDate"` item.

~~~js {2}
{
Expand All @@ -172,7 +172,7 @@ The callback should return one of the following values:
- `"user"` - the menu item intended for assigning users to tasks

<details>
<summary>The **"user"** type default structure</summary>
<summary>The `"user"` type default structure</summary>

~~~js {2}
{
Expand Down Expand Up @@ -268,9 +268,9 @@ new ToDo("#root", {
});
~~~

**Change log:** The `menu` config was added in v1.3
**Change log**: The `menu` config was added in v1.3

**Related samples:**
**Related samples**:
- [To do list. Menu customization. Adding and removing options](https://snippet.dhtmlx.com/slpjstbb)
- [To do list. Menu customization. Custom icons](https://snippet.dhtmlx.com/cmfqmg00)
- [To do list. Remove menu for specific part of interface](https://snippet.dhtmlx.com/5pnk7y0d)
8 changes: 4 additions & 4 deletions docs/api/configs/priorities_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ priorities?: [

### Parameters

The **priorities** property presents an array of priorities objects. Each object includes the following set of parameters:
The `priorities` property presents an array of priorities objects. Each object includes the following set of parameters:

- `id` - (required) the priority id
- `label` - (required) the priority label
- `hotkey` - (optional) the name of custom keyboard shortcut to apply a priority. To define a custom shortcut combination, you need to handle a custom event as shown in the example below
- `color` - (optional) the priority color

:::info
If the **color** parameter is not specified, the widget will apply one of the default colors:
If the `color` parameter is not specified, the widget will apply one of the default colors:

`"#ff5252" "#ffc975" "#0ab169" "#607D8B" "#00C7B5"`

Expand Down Expand Up @@ -118,7 +118,7 @@ document.addEventListener("keydown", event => {
});
~~~

**Related articles:**
**Related articles**:
- [Loading and storing data](guides/loading_data.md)

**Related sample:** [To do list. Custom hotkeys for setting priorities](https://snippet.dhtmlx.com/5cymicwt?tag=todolist)
**Related sample**: [To do list. Custom hotkeys for setting priorities](https://snippet.dhtmlx.com/5cymicwt?tag=todolist)
4 changes: 2 additions & 2 deletions docs/api/configs/projects_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ projects?: [

### Parameters

The **projects** property presents an array of project objects. Each object includes the following set of parameters:
The `projects` property presents an array of project objects. Each object includes the following set of parameters:

- `id` - (required) the id of a project
- `label` - (required) the name of a project. It is displayed in the list of available projects
Expand Down Expand Up @@ -55,6 +55,6 @@ const toolbar = new Toolbar("#toolbar", {
By default, the first project from the list of project objects will be loaded as an active project. To specify any other project as an active one, use the [`activeProject`](api/configs/activeproject_config.md) property
:::

**Related articles:**
**Related articles**:
- [Loading and storing data](guides/loading_data.md)
- [Managing projects](guides/project_index.md)
2 changes: 1 addition & 1 deletion docs/api/configs/readonly_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Related article:** [Read-only mode](guides/readonly_mode.md)
**Related article**: [Read-only mode](guides/readonly_mode.md)
4 changes: 2 additions & 2 deletions docs/api/configs/selected_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Change log:** Added in v1.1
**Change log**: Added in v1.1

**Related article:** [Multiple select and bulk operations](guides/multiselection.md)
**Related article**: [Multiple select and bulk operations](guides/multiselection.md)
2 changes: 1 addition & 1 deletion docs/api/configs/tags_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Related articles:**
**Related articles**:
- [Loading and storing data](guides/loading_data.md)
- [Inline editing](guides/inline_editing.md)
8 changes: 4 additions & 4 deletions docs/api/configs/tasks_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ tasks?: [

### Parameters

The **tasks** property presents an array of task objects. Each object includes the following set of parameters:
The `tasks` property presents an array of task objects. Each object includes the following set of parameters:

- `id` - (optional) the id of a task
- `parent` - (optional) the id of the parent task. The value of the parameter is **null | undefined** for root tasks
- `parent` - (optional) the id of the parent task. The value of the parameter is `null | undefined` for root tasks
- `project` - (optional) the id of the project where the task should be rendered. To initialize the projects, use the [projects](api/configs/projects_config.md) property.

:::info
Expand Down Expand Up @@ -112,8 +112,8 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Change log:** The `priority` parameter was added in v1.2
**Change log**: The `priority` parameter was added in v1.2

**Related articles:**
**Related articles**:
- [Loading and storing data](guides/loading_data.md)
- [Managing tasks](guides/task_index.md)
34 changes: 17 additions & 17 deletions docs/api/configs/taskshape_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ taskShape: {

### Parameters

To configure the task's appearance, you can specify the following parameters in the **taskShape** object:
To configure the task's appearance, you can specify the following parameters in the `taskShape` object:

- `counter` - (optional) an object with settings for the counter of completed first-level subtasks:
- `type` - (required) the type of display of the counter. There are two types:
- *"number"* - the value of the counter is displayed as a ratio between two numbers: the number of completed subtasks and the total number of subtasks
- *"percentage"* - the value of the counter is displayed as a percentage
- `date` - (optional) an object with date settings:
- `format` - (required) defines the format of displaying dates. By default, "%d %M %Y". The full list of available characters is given [below](#list-of-characters)
- `validate` - (required) defines whether the **due_date** property of the [task object](api/configs/tasks_config.md) should be validated
- `validate` - (required) defines whether the `due_date` property of the [task object](api/configs/tasks_config.md) should be validated
- `completed` - (optional) an object with settings for managing the marking and display of completed tasks. It takes one parameter:
- `behavior` - (required) sets behavior for the parent and child tasks when marking them as completed/uncompleted. There are two options:
- *"auto"* - enables the **"auto"** mode:
- *"auto"* - enables the `"auto"` mode:
- When you mark all child tasks as completed, the parent task automatically becomes marked as completed
- When you mark the parent task as completed, all its child automatically become marked as completed
- If you mark at least one child of a completed task as uncompleted, the task automatically becomes marked as uncompleted
- If you mark the parent task as uncompleted, all its child automatically become uncompleted
- *"manual"* - enables the **"manual"** mode. You need to manually mark each task (be it a child task or its parent) as completed
- *"manual"* - enables the `"manual"` mode. You need to manually mark each task (be it a child task or its parent) as completed
- `taskHide` - (required) enables/disables the mode of hiding completed tasks from the list
- `priority` - (optional) - an object with settings that defines a priority appearance. Here you can specify the following parameters:
- `cover` - (required) - specifies whether to show a priority cover
Expand Down Expand Up @@ -120,31 +120,31 @@ DHTMLX To Do List uses the following characters for setting a date format:

| Character | Definition |
|-----------|---------------------------------------------------|
| **%d** | day as a number with leading zero, 01..31 |
| **%j** | day as a number, 1..31 |
| **%D** | short name of the day, Su Mo Tu... |
| **%l** | full name of the day, Sunday Monday Tuesday... |
| **%m** | month as a number with leading zero, 01..12 |
| **%n** | month as a number, 1..12 |
| **%M** | short name of the month, Jan Feb Mar... |
| **%F** | full name of the month, January February March... |
| **%y** | year as a number, 2 digits |
| **%Y** | year as a number, 4 digits |
| `%d` | day as a number with leading zero, 01..31 |
| `%j` | day as a number, 1..31 |
| `%D` | short name of the day, Su Mo Tu... |
| `%l` | full name of the day, Sunday Monday Tuesday... |
| `%m` | month as a number with leading zero, 01..12 |
| `%n` | month as a number, 1..12 |
| `%M` | short name of the month, Jan Feb Mar... |
| `%F` | full name of the month, January February March... |
| `%y` | year as a number, 2 digits |
| `%Y` | year as a number, 4 digits |

:::tip
Check the [**Localization**](guides/localization.md) article to learn how to present the date labels in the necessary language
:::

**Change log:**
**Change log**:

- The `priority` parameter was added in v1.2

**Related articles:**
**Related articles**:

- [Configuration](guides/configuration.md#tasks)
- [Show/hide completed tasks](guides/hide_completed_tasks.md)

**Related samples:**
**Related samples**:
- [To do list. Subtask counter and date format](https://snippet.dhtmlx.com/magidhw8?tag=todolist)
- [To do list. Two variants of marking a parent task done](https://snippet.dhtmlx.com/5892fcr2?tag=todolist)
- [To do list. Custom hotkeys for setting priorities](https://snippet.dhtmlx.com/5cymicwt?tag=todolist)
6 changes: 3 additions & 3 deletions docs/api/configs/users_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ users?: [

### Parameters

The **users** property presents an array of people objects. Each object includes the following set of parameters:
The `users` property presents an array of people objects. Each object includes the following set of parameters:

- `id` - (required) the id of a person
- `label` - (required) the description of the person
- `avatar` - (optional) a path to the image of the person
- `color` - (optional) the color of the icon if the image isn't uploaded

:::info
If the **color** parameter is not specified, the color from the default set of colors will be applied.
If the `color` parameter is not specified, the color from the default set of colors will be applied.
:::

### Example
Expand Down Expand Up @@ -96,6 +96,6 @@ const toolbar = new Toolbar("#toolbar", {
});
~~~

**Related articles:**
**Related articles**:
- [Loading and storing data](guides/loading_data.md)
- [Task users](guides/task_users.md)
4 changes: 2 additions & 2 deletions docs/api/events/addproject_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: You can learn about the add-project event in the documentation of t

### Parameters

The callback of the **add-project** event can take an object with the following parameters:
The callback of the `add-project` event can take an object with the following parameters:

- `id` - (required) the ID of the created project
- `project` - (optional) an object with project parameters:
Expand Down Expand Up @@ -53,4 +53,4 @@ list.api.on("add-project", ({id, project}) => {
});
~~~

**Related article:** [Operations with projects](guides/project_operations.md#adding-a-new-project)
**Related article**: [Operations with projects](guides/project_operations.md#adding-a-new-project)
6 changes: 3 additions & 3 deletions docs/api/events/addtask_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ description: You can learn about the add-task event in the documentation of the

### Parameters

The callback of the **add-task** event can take an object with the following parameters:
The callback of the `add-task` event can take an object with the following parameters:

- `id` - (required) the ID of the added task
- `parent` - (optional) the ID of the parent task
- `project` - (optional) the ID of the project
- `targetId` - (optional) the ID of the target task
- `reverse` - (optional) **true**, if the task is added before the target task; otherwise, **false**
- `reverse` - (optional) `true`, if the task is added before the target task; otherwise, `false`
- `task` - (required) the object of the added task

:::info
Expand Down Expand Up @@ -60,4 +60,4 @@ list.api.on("add-task", (obj) => {
});
~~~

**Related article:** [Operations with tasks](guides/task_operations.md#adding-a-new-task)
**Related article**: [Operations with tasks](guides/task_operations.md#adding-a-new-task)
4 changes: 2 additions & 2 deletions docs/api/events/assignuser_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: You can learn about the assign-user event in the documentation of t

### Parameters

The callback of the **assign-user** event can take an object with the following parameters:
The callback of the `assign-user` event can take an object with the following parameters:

- `id` - (required) the id of a task
- `userId` - (required) the id of the user assigned to the task
Expand Down Expand Up @@ -52,4 +52,4 @@ list.api.on("assign-user", ({id, userId}) => {
});
~~~

**Related article:** [Task users](guides/task_users.md)
**Related article**: [Task users](guides/task_users.md)
Loading
Loading