Skip to content

Commit 79add3f

Browse files
committed
Sync with Kendo UI Professional
1 parent 02c8d05 commit 79add3f

File tree

5 files changed

+182
-54
lines changed

5 files changed

+182
-54
lines changed

docs-aspnet/html-helpers/scheduling/scheduler/adaptive-rendering.md

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ position: 6
99

1010
# Adaptive Rendering
1111

12-
The Scheduler supports adaptive enhancements such as changes in styling and behavior in order to remain consistent with the specific user device experience.
12+
The Scheduler provides adaptive enhancements that adjust its styling and behavior to suit the viewing device.
1313

14-
For example, when editing on a mobile device, the edit container will slide in a new screen for the user, which is a departure from the more desktop-like popup behaviors.
14+
For example, when editing on a mobile device, the edit container slides in on full screen instead of appearing as a popup—providing a more mobile-friendly experience.
1515

1616
To enable the adaptive rendering feature, set the [`Mobile`](https://docs.telerik.com/{{ site.platform }}/api/kendo.mvc.ui.fluent/schedulerbuilder#mobile) property to `MobileMode.Auto` or `MobileMode.Phone`:
1717

18-
* If set to `MobileMode.Auto`, the component will use adaptive rendering when viewed on a mobile browser.
19-
* If set to `MobileMode.Phone`, the component will be forced to use adaptive rendering regardless of the browser type.
18+
* If set to `MobileMode.Auto`, the component uses adaptive rendering when viewed in a mobile browser.
19+
* If set to `MobileMode.Phone`, the component always uses adaptive rendering, regardless of the browser type.
2020

21-
> Important: With the mobile rendering, we recommend to set up `height` as well. Without setting an explicit height, every view of the scheduler might have a different height.
21+
> When using mobile rendering, set the `Height` explicitly. Otherwise, each Scheduler view might render with a different height.
2222
2323
The following example demonstrates how to configure the adaptive rendering mode of the Scheduler.
2424

@@ -50,49 +50,50 @@ The following example demonstrates how to configure the adaptive rendering mode
5050
)
5151
)
5252
```
53+
5354
{% if site.core %}
5455
```TagHelper
55-
@{
56-
string defaultTitle = "No Title";
57-
}
58-
<kendo-scheduler name="scheduler"
59-
mobile="MobileMode.Auto"
60-
date="new DateTime(2021, 6, 13)"
61-
start-time="new DateTime(2021, 6, 13, 7, 00, 00)"
62-
timezone="Etc/UTC"
63-
height="600">
64-
<views>
65-
<view type="day"></view>
66-
<view type="week" selected="true"></view>
67-
<view type="month"></view>
68-
<view type="agenda"></view>
69-
</views>
70-
<scheduler-datasource type="@DataSourceTagHelperType.Ajax">
71-
<transport>
72-
<read url="@Url.Action("Tasks_Read", "Home")" />
73-
<create url="@Url.Action("Tasks_Create", "Home")" />
74-
<destroy url="@Url.Action("Tasks_Destroy", "Home")" />
75-
<update url="@Url.Action("Tasks_Update", "Home")" />
76-
</transport>
77-
<schema data="Data" total="Total" errors="Errors">
78-
<scheduler-model id="TaskID">
79-
<fields>
80-
<field name="TaskID" type="number"></field>
81-
<field name="title" from="Title" type="string" default-value="@defaultTitle"></field>
82-
<field name="start" from="Start" type="date"></field>
83-
<field name="end" from="End" type="date"></field>
84-
<field name="description" from="Description" type="string"></field>
85-
<field name="recurrenceId" from="RecurrenceID" type="number" default-value=null></field>
86-
<field name="recurrenceRule" from="RecurrenceRule" type="string" ></field>
87-
<field name="recurrenceException" from="RecurrenceException" type="string"></field>
88-
<field name="startTimezone" from="StartTimezone" type="string"></field>
89-
<field name="endTimezone" from="EndTimezone" type="string"></field>
90-
<field name="isAllDay" from="IsAllDay" type="boolean"></field>
91-
</fields>
92-
</scheduler-model>
93-
</schema>
94-
</scheduler-datasource>
95-
</kendo-scheduler>
56+
@{
57+
string defaultTitle = "No Title";
58+
}
59+
<kendo-scheduler name="scheduler"
60+
mobile="MobileMode.Auto"
61+
date="new DateTime(2021, 6, 13)"
62+
start-time="new DateTime(2021, 6, 13, 7, 00, 00)"
63+
timezone="Etc/UTC"
64+
height="600">
65+
<views>
66+
<view type="day"></view>
67+
<view type="week" selected="true"></view>
68+
<view type="month"></view>
69+
<view type="agenda"></view>
70+
</views>
71+
<scheduler-datasource type="@DataSourceTagHelperType.Ajax">
72+
<transport>
73+
<read url="@Url.Action("Tasks_Read", "Home")" />
74+
<create url="@Url.Action("Tasks_Create", "Home")" />
75+
<destroy url="@Url.Action("Tasks_Destroy", "Home")" />
76+
<update url="@Url.Action("Tasks_Update", "Home")" />
77+
</transport>
78+
<schema data="Data" total="Total" errors="Errors">
79+
<scheduler-model id="TaskID">
80+
<fields>
81+
<field name="TaskID" type="number"></field>
82+
<field name="title" from="Title" type="string" default-value="@defaultTitle"></field>
83+
<field name="start" from="Start" type="date"></field>
84+
<field name="end" from="End" type="date"></field>
85+
<field name="description" from="Description" type="string"></field>
86+
<field name="recurrenceId" from="RecurrenceID" type="number" default-value="null"></field>
87+
<field name="recurrenceRule" from="RecurrenceRule" type="string"></field>
88+
<field name="recurrenceException" from="RecurrenceException" type="string"></field>
89+
<field name="startTimezone" from="StartTimezone" type="string"></field>
90+
<field name="endTimezone" from="EndTimezone" type="string"></field>
91+
<field name="isAllDay" from="IsAllDay" type="boolean"></field>
92+
</fields>
93+
</scheduler-model>
94+
</schema>
95+
</scheduler-datasource>
96+
</kendo-scheduler>
9697
```
9798
{% endif %}
9899

docs-aspnet/html-helpers/scheduling/scheduler/binding/overview.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,122 @@ The supported data-binding approaches are:
2525
{% endif %}
2626
* [Web API binding]({% slug htmlhelpers_scheduler_webapi_binding %})
2727

28+
## Model Requirements
29+
30+
The model that binds to the Scheduler extends the `ISchedulerEvent` interface, which has the following properties:
31+
32+
```C#
33+
public interface ISchedulerEvent
34+
{
35+
//Content Lines
36+
string Title
37+
{
38+
get;
39+
set;
40+
}
41+
string Description
42+
{
43+
get;
44+
set;
45+
}
46+
47+
//Duration
48+
bool IsAllDay
49+
{
50+
get;
51+
set;
52+
}
53+
54+
DateTime Start
55+
{
56+
get;
57+
set;
58+
}
59+
60+
DateTime End
61+
{
62+
get;
63+
set;
64+
}
65+
66+
string StartTimezone
67+
{
68+
get;
69+
set;
70+
}
71+
72+
string EndTimezone
73+
{
74+
get;
75+
set;
76+
}
77+
78+
string RecurrenceRule
79+
{
80+
get;
81+
set;
82+
}
83+
84+
string RecurrenceException
85+
{
86+
get;
87+
set;
88+
}
89+
}
90+
```
91+
92+
The next table lists the required model properties of the Scheduler and their default values.
93+
94+
| Property | Mandatory | Default Value | Description |
95+
|---------------------|-----------|----------------------|-----------------------------------------------------------------------------|
96+
| `Id` | Yes | none | The unique model identifier of the Scheduler event. Required for creating, editing, and deleting records. |
97+
| `Title` | Yes | none | The title or subject of the event. |
98+
| `Start` | Yes | none | The starting date and time of the event. |
99+
| `End` | Yes | none | The ending date and time of the event. Must be later than Start. |
100+
| `RecurrenceRule` | No | null | The rule that defines the recurrence pattern. If not provided or set to null, the event is not treated as a recurring event. |
101+
| `RecurrenceID` | No | null | Links an exception or occurrence to its recurring master event. |
102+
| `RecurrenceException` | No | null | A comma-separated list of dates when the recurring event will be skipped. |
103+
| `IsAllDay` | No | false | Indicates whether the event spans the entire day. |
104+
| `Description` | No | empty string ("") | Optional text description of the event. |
105+
106+
When using HtmlHelper Scheduler, the model properties are automatically mapped to camelCase fields on the client.
107+
108+
{% if site.core %}
109+
110+
When using TagHelper Scheduler, you need to set the "name" and "from" attributes manually in the schema configuration of the DataSource.
111+
112+
The following example shows how to set the properties of the DataSource for the TagHelper:
113+
114+
```TagHelper
115+
<scheduler-datasource type="@DataSourceTagHelperType.Ajax">
116+
<transport>
117+
<read url="@Url.Action("Overview_Read", "Scheduler")" />
118+
<create url="@Url.Action("Overview_Create", "Scheduler")" />
119+
<destroy url="@Url.Action("Overview_Destroy", "Scheduler")" />
120+
<update url="@Url.Action("Overview_Update", "Scheduler")" />
121+
</transport>
122+
<schema data="Data" total="Total" errors="Errors">
123+
<scheduler-model id="ID">
124+
<fields>
125+
<field name="ID" type="number"></field>
126+
<field name="title" from="Title" type="string" default-value="@defaultTitle"></field>
127+
<field name="start" from="Start" type="date"></field>
128+
<field name="end" from="End" type="date"></field>
129+
<field name="description" from="Description" type="string"></field>
130+
<field name="recurrenceId" from="RecurrenceID" type="number" default-value=null></field>
131+
<field name="recurrenceRule" from="RecurrenceRule" type="string" ></field>
132+
<field name="recurrenceException" from="RecurrenceException" type="string"></field>
133+
<field name="Attendee" type="number" default-value="1"></field>
134+
<field name="startTimezone" from="StartTimezone" type="string"></field>
135+
<field name="endTimezone" from="EndTimezone" type="string"></field>
136+
<field name="isAllDay" from="IsAllDay" type="boolean"></field>
137+
</fields>
138+
</scheduler-model>
139+
</schema>
140+
</scheduler-datasource>
141+
```
142+
{% endif %}
143+
28144
## See Also
29145

30146
* [Server-Side API](/api/scheduler)

docs/api/javascript/dataviz/ui/chart.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ data source is fired. By default the widget will bind to the data source specifi
2424
var dataSource = new kendo.data.DataSource({
2525
transport: {
2626
read: {
27-
url: "https://demos.telerik.com/service/v2/core/stockdata"
27+
url: "https://demos.telerik.com/service/v2/core/stockdata",
28+
contentType: "application/json"
2829
}
2930
}
3031
});
@@ -3146,7 +3147,8 @@ The maximum number of ticks, labels and grid lines to display. Applicable for da
31463147
dataSource: {
31473148
transport: {
31483149
read: {
3149-
url: "https://demos.telerik.com/service/v2/core/StockData"
3150+
url: "https://demos.telerik.com/service/v2/core/StockData",
3151+
contentType: "application/json"
31503152
}
31513153
},
31523154
schema: {
@@ -7797,7 +7799,8 @@ If the `dataSource` option is an existing [kendo.data.DataSource](/api/javascrip
77977799
var dataSource = new kendo.data.DataSource({
77987800
transport: {
77997801
read: {
7800-
url: "https://demos.telerik.com/service/v2/core/stockdata"
7802+
url: "https://demos.telerik.com/service/v2/core/stockdata",
7803+
contentType: "application/json"
78017804
}
78027805
}
78037806
});
@@ -18965,7 +18968,8 @@ Sets the visible property of a chart series
1896518968
var dataSource = new kendo.data.DataSource({
1896618969
transport: {
1896718970
read: {
18968-
url: "https://demos.telerik.com/service/v2/core/stockdata"
18971+
url: "https://demos.telerik.com/service/v2/core/stockdata",
18972+
contentType: "application/json"
1896918973
}
1897018974
}
1897118975
});

src/kendo.menu.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,11 @@ export const __meta__ = {
10971097
} else {
10981098
e.preventDefault();
10991099
}
1100+
1101+
const focusedSubItem = e.sender.element.find("." + FOCUSEDSTATE);
1102+
if (focusedSubItem.length) {
1103+
that._removeFocusItem();
1104+
}
11001105
}
11011106
}, options)).data(KENDOPOPUP);
11021107
},
@@ -1185,9 +1190,12 @@ export const __meta__ = {
11851190
$(menu.element).css({ height: "" });
11861191
}
11871192
}
1188-
const maxWidthNone = options.scrollable || options.autoSize;
1189-
const overflow = options.autoSize ? "auto" : "visible";
1190-
div.css({ maxHeight: maxWidthNone ? "" : maxHeight, overflow: overflow });
1193+
const rect = li[0].getBoundingClientRect();
1194+
const fits = ((menu && menu.inlineHeight) || maxHeight) <= (window.innerHeight - rect.top);
1195+
1196+
const maxHeightNone = options.scrollable || options.autoSize;
1197+
const overflow = options.autoSize && !fits ? "auto" : "visible";
1198+
div.css({ maxHeight: maxHeightNone ? "" : maxHeight, overflow: overflow });
11911199

11921200
li.data(ZINDEX, li.css(ZINDEX));
11931201
var nextZindex = that.nextItemZIndex++;

src/kendo.popup.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ export const __meta__ = {
320320

321321
that.wrapper = kendo.wrap(element, options.autosize, options._resizeOnWrap, shouldCorrectWidth, options.autowidth)
322322
.css({
323-
overflow: HIDDEN,
324323
display: "block",
325324
position: ABSOLUTE
326325
})

0 commit comments

Comments
 (0)