Skip to content

Commit

Permalink
[update] tabs to spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiipylypchuk1991 committed Jan 24, 2024
1 parent ecb9ea3 commit 9630c97
Show file tree
Hide file tree
Showing 61 changed files with 1,048 additions and 1,048 deletions.
2 changes: 1 addition & 1 deletion docs/api/api_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: You can explore an API overview in the documentation of the DHTMLX

~~~jsx {}
new eventCalendar.EventCalendar("#root", {
// configuration parameters
// configuration parameters
});
~~~

Expand Down
148 changes: 74 additions & 74 deletions docs/api/config/js_eventcalendar_calendars_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ A **calendar** is a set of parameters you can apply to the events to group them

~~~jsx {}
calendars?: [
{
id: string | number,
label: string,
readonly: boolean,
active: boolean,
color?: {
background?: string,
border?: string,
textColor?: string
}
}, {...}
{
id: string | number,
label: string,
readonly: boolean,
active: boolean,
color?: {
background?: string,
border?: string,
textColor?: string
}
}, {...}
];
~~~

Expand All @@ -41,9 +41,9 @@ For each **calendar** (*event type*) you can specify the following parameters (d
- `active` - (required) shows/hides events of the current calendar
- `readonly` - (optional) enables/disables an ability to edit and delete the current calendar
- `color` - (optional) an object with the style parameters, applied to the events of current calendar. Here you can specify the following parameters (styles):
- `background` - (optional) a HEX code of the event background color related to the current calendar
- `border` - (optional) a HEX code of the event border color related to the current calendar
- `textColor` - (optional) a HEX code of the event text color related to the current calendar
- `background` - (optional) a HEX code of the event background color related to the current calendar
- `border` - (optional) a HEX code of the event border color related to the current calendar
- `textColor` - (optional) a HEX code of the event text color related to the current calendar

### Default config

Expand All @@ -53,46 +53,46 @@ You can export the default config using the `eventCalendar.defaultCalendars` exp

~~~jsx {}
const defaultCalendars = [
{
id: "work",
label: "Work",
readonly: false,
active: true,
color: {
background: "#d5eaf7",
border: "#098CDC"
}
},
{
id: "meeting",
label: "Meeting",
readonly: false,
active: true,
color: {
background: "#E6E5EC",
border: "#7A67EB"
}
},
{
id: "rest",
label: "Rest",
readonly: false,
active: true,
color: {
background: "#EDD1EC",
border: "#AD44AB"
}
},
{
id: "movie",
label: "Movie",
readonly: false,
active: true,
color: {
background: "#CEEDC3",
border: "#77D257"
}
}
{
id: "work",
label: "Work",
readonly: false,
active: true,
color: {
background: "#d5eaf7",
border: "#098CDC"
}
},
{
id: "meeting",
label: "Meeting",
readonly: false,
active: true,
color: {
background: "#E6E5EC",
border: "#7A67EB"
}
},
{
id: "rest",
label: "Rest",
readonly: false,
active: true,
color: {
background: "#EDD1EC",
border: "#AD44AB"
}
},
{
id: "movie",
label: "Movie",
readonly: false,
active: true,
color: {
background: "#CEEDC3",
border: "#77D257"
}
}
];
~~~

Expand All @@ -107,32 +107,32 @@ To set the **calendars** config dynamically, you can use the
// custom calendars
const calendars = [
{
id: "rest",
label: "Custom Rest",
readonly: true,
active: true,
color: {
background: "#EDD1EC",
border: "#AD44AB",
id: "rest",
label: "Custom Rest",
readonly: true,
active: true,
color: {
background: "#EDD1EC",
border: "#AD44AB",
textColor: "#3e98db"
}
},
{
id: "movie",
label: "Custom Movie",
readonly: false,
active: false,
color: {
background: "#CEEDC3",
border: "#77D257",
}
},
{
id: "movie",
label: "Custom Movie",
readonly: false,
active: false,
color: {
background: "#CEEDC3",
border: "#77D257",
textColor: "#3e98db"
}
}
}
}
];
// create Event Calendar
new eventCalendar.EventCalendar("#root", {
calendars
// other configuration parameters
// other configuration parameters
});
~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/api/config/js_eventcalendar_colors_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ new eventCalendar.EventCalendar("#root", {
colorpicker: "border"
}
],
// other configuration parameters
// other configuration parameters
});
~~~

Expand Down
128 changes: 64 additions & 64 deletions docs/api/config/js_eventcalendar_config_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,39 +257,39 @@ sections: [

~~~jsx {}
const defaultWeekConfig = {
eventHorizontalSpace: 3,
columnPadding: "8px",
eventHorizontalSpace: 3,
columnPadding: "8px",

};

const defaultMonthConfig = {
maxEventsPerCell: 4,
maxEventsPerCell: 4,
};

const defaultTimelineConfig = {
colsCount: 90,
minEventWidth: 50,
colsWidth: 90,
minSectionHeight: 100,
sectionWidth: 158,
step: [1, "day"],
key: "section",
header: [
{ unit: "month", step: 1, format: "MMM" },
{ unit: "day", step: 1, format: "d MMM" },
],
sections: [
{ id: "1", label: "Section 1" },
{ id: "2", label: "Section 2" },
{ id: "3", label: "Section 3" },
{ id: "4", label: "Section 4" },
{ id: "5", label: "Section 5" },
{ id: "6", label: "Section 6" },
{ id: "7", label: "Section 7" },
{ id: "8", label: "Section 8" },
{ id: "9", label: "Section 9" },
],
unassignedCol: false,
colsCount: 90,
minEventWidth: 50,
colsWidth: 90,
minSectionHeight: 100,
sectionWidth: 158,
step: [1, "day"],
key: "section",
header: [
{ unit: "month", step: 1, format: "MMM" },
{ unit: "day", step: 1, format: "d MMM" },
],
sections: [
{ id: "1", label: "Section 1" },
{ id: "2", label: "Section 2" },
{ id: "3", label: "Section 3" },
{ id: "4", label: "Section 4" },
{ id: "5", label: "Section 5" },
{ id: "6", label: "Section 6" },
{ id: "7", label: "Section 7" },
{ id: "8", label: "Section 8" },
{ id: "9", label: "Section 9" },
],
unassignedCol: false,
};

const defaultConfig = {
Expand All @@ -316,27 +316,27 @@ const defaultConfig = {
viewControl: "auto",

views: [
{
id: "week",
label: "Week",
config: defaultWeekConfig,
layout: "week"
},
{
{
id: "week",
label: "Week",
config: defaultWeekConfig,
layout: "week"
},
{
id: "day",
label: "Day",
config: defaultWeekConfig,
layout: "day"
},
{
id: "month",
label: "Month",
config: defaultMonthConfig,
layout: "month"
},
{ id: "year", label: "Year", layout: "year" },
{ id: "agenda", label: "Agenda", layout: "agenda" },
],
{
id: "month",
label: "Month",
config: defaultMonthConfig,
layout: "month"
},
{ id: "year", label: "Year", layout: "year" },
{ id: "agenda", label: "Agenda", layout: "agenda" },
],
};
~~~

Expand All @@ -360,29 +360,29 @@ new eventCalendar.EventCalendar("#root", {
eventVerticalSpace: 8,
dateTitle: (date, [start, end]) => `${format(start, "do")} - ${format(end, "do")} ${format(date, "LLL")}`,
views: [
{
id: "timeline",
label: "Timeline",
layout: "timeline",
config: {
unassignedCol: true,
sections: [
{
label: "Andy Warh",
id: "1",
img: "../src/data/common/img/01/avatar_01.jpg",
},
{
label: "Nataly Tamer",
id: "2",
img: "../src/data/common/img/02/avatar_02.jpg",
},
// other sections config
],
},
},
{
id: "timeline",
label: "Timeline",
layout: "timeline",
config: {
unassignedCol: true,
sections: [
{
label: "Andy Warh",
id: "1",
img: "../src/data/common/img/01/avatar_01.jpg",
},
{
label: "Nataly Tamer",
id: "2",
img: "../src/data/common/img/02/avatar_02.jpg",
},
// other sections config
],
},
},
// other custom views config
],
],
},
// other configuration parameters
});
Expand Down
Loading

0 comments on commit 9630c97

Please sign in to comment.