Skip to content

Commit 42e5bfa

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent de188f3 commit 42e5bfa

File tree

13 files changed

+168
-217
lines changed

13 files changed

+168
-217
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3302,6 +3302,7 @@ See [crossorigin attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/El
33023302
for more details.
33033303

33043304
#### Returns
3305+
33053306
`Promise` A promise that will be resolved with a PNG image encoded as a Data URI.
33063307

33073308
#### Example - Exporting a diagram to an image
@@ -3341,6 +3342,7 @@ The promise will be resolved with a PDF file encoded as a [Data URI](https://dev
33413342
Parameters for the exported PDF file.
33423343

33433344
#### Returns
3345+
33443346
`Promise` A promise that will be resolved with a PDF file encoded as a Data URI.
33453347

33463348
#### Example - Exporting a diagram to a PDF file
@@ -3624,6 +3626,7 @@ Saves the diagram.
36243626
Saves the diagram content as PDF document.
36253627

36263628
#### Returns
3629+
36273630
`Promise` A promise that will be resolved when the export completes.
36283631

36293632
#### Example - Exporting a diagram to a PDF document

docs/api/javascript/ui/grid.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8355,6 +8355,7 @@ Initiates the PDF export and returns a promise. Also triggers the [pdfExport](/a
83558355
> Calling this method may trip the built-in browser pop-up blocker. To avoid that, call this method as a response to an end-user action, e.g. a button click.
83568356
83578357
#### Returns
8358+
83588359
`Promise` A promise that will be resolved when the export completes. The same promise is available in the [pdfExport](/api/javascript/ui/grid/events/pdfexport) event arguments.
83598360

83608361
#### Example - manually initiate PDF export

docs/controls/conversational-ui/chat/configure-chat-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The following example uses the [Microsoft Bot Framework](https://dev.botframewor
2121
<div id="chat"></div>
2222

2323
<!-- Load Bot Framework Client API -->
24-
<script src="http://unpkg.com/botframework-directlinejs/directLine.js"></script>
24+
<script src="https://unpkg.com/botframework-directlinejs/directLine.js"></script>
2525

2626
<script>
2727
$(document).ready(function () {

docs/controls/conversational-ui/chat/overview.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ position: 1
1010

1111
The [Kendo UI Chat](http://demos.telerik.com/kendo-ui/chat/index) widget allows the user to participate in chat sessions with other users or with chat bots.
1212

13-
For additional information on new Chat features, refer to the [Kendo UI Roadmap](http://www.telerik.com/support/whats-new/kendo-ui-web/roadmap).
14-
1513
## Getting Started
1614

1715
### Create the Chat

docs/controls/scheduling/scheduler/how-to/custom-views/custom-month-view-with-event-count-in-show-more-button.md

Lines changed: 19 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_title: Create Custom Month Views with Event Count in the Show More Button |
44
description: "Learn how to inherit some of the built-in views and implement specific custom logic in a Kendo UI Scheduler."
55
previous_url: /controls/scheduling/scheduler/how-to/custom-month-view-with-event-count-in-show-more-button
66
slug: howto_create_custom_monthview_eventcount_showmore_button_scheduler
7+
position: 3
78
---
89

910
# Create Custom Month Views with Event Count in the Show More Button
@@ -16,12 +17,12 @@ The following example demonstrates how to inherit the built-in Month view and im
1617
<div id="scheduler"></div>
1718
<script>
1819
var MORE_BUTTON_TEMPLATE = kendo.template(
19-
'<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span style="font-size:8pt; margin-top: 0;"> #=getEventCountForRange(startSlot, endSlot, rowsCount)# more events..</span></div>');
20-
20+
'<div style="width:#=width#px;left:#=left#px;top:#=top#px"' +
21+
'class="k-more-events k-button"><span style="font-size:8pt; margin-top: 0;">' +
22+
'#=getEventCountForRange(startSlot, endSlot, rowsCount)# more events..</span></div>');
2123
2224
function getEventCountForRange(startSlot, endSlot, rowsCount) {
2325
var scheduler = $(startSlot.element).closest("[data-role=scheduler]").getKendoScheduler();
24-
2526
var currentTimezoneOffset = kendo.date.MS_PER_MINUTE * new Date().getTimezoneOffset();
2627
var rangeStart = new Date(startSlot.start + currentTimezoneOffset);
2728
var rangeEnd = new Date(endSlot.end + currentTimezoneOffset);
@@ -66,7 +67,6 @@ The following example demonstrates how to inherit the built-in Month view and im
6667
}
6768
}
6869
69-
7070
if (rows.length > eventCount) {
7171
for (var slotIndex = startIndex; slotIndex <= endIndex; slotIndex++) {
7272
var collection = slotRange.collection;
@@ -89,7 +89,6 @@ The following example demonstrates how to inherit the built-in Month view and im
8989
top: slot.offsetTop + slot.firstChildHeight + eventCount * eventHeight + 3 * eventCount
9090
}));
9191
92-
9392
this.content[0].appendChild(slot.more[0]);
9493
}
9594
@@ -122,9 +121,8 @@ The following example demonstrates how to inherit the built-in Month view and im
122121
date: new Date("2013/6/13"),
123122
startTime: new Date("2013/6/13 07:00 AM"),
124123
height: 600,
125-
views: [{
126-
type: "CustomMonthView"
127-
},
124+
views: [
125+
{ type: "CustomMonthView", selected: true },
128126
"day"
129127
],
130128
timezone: "Etc/UTC",
@@ -159,94 +157,23 @@ The following example demonstrates how to inherit the built-in Month view and im
159157
model: {
160158
id: "taskId",
161159
fields: {
162-
taskId: {
163-
from: "TaskID",
164-
type: "number"
165-
},
166-
title: {
167-
from: "Title",
168-
defaultValue: "No title",
169-
validation: {
170-
required: true
171-
}
172-
},
173-
start: {
174-
type: "date",
175-
from: "Start"
176-
},
177-
end: {
178-
type: "date",
179-
from: "End"
180-
},
181-
startTimezone: {
182-
from: "StartTimezone"
183-
},
184-
endTimezone: {
185-
from: "EndTimezone"
186-
},
187-
description: {
188-
from: "Description"
189-
},
190-
recurrenceId: {
191-
from: "RecurrenceID"
192-
},
193-
recurrenceRule: {
194-
from: "RecurrenceRule"
195-
},
196-
recurrenceException: {
197-
from: "RecurrenceException"
198-
},
199-
ownerId: {
200-
from: "OwnerID",
201-
defaultValue: 1
202-
},
203-
isAllDay: {
204-
type: "boolean",
205-
from: "IsAllDay"
206-
}
160+
taskId: { from: "TaskID", type: "number" },
161+
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
162+
start: { type: "date", from: "Start" },
163+
end: { type: "date", from: "End" },
164+
startTimezone: { from: "StartTimezone" },
165+
endTimezone: { from: "EndTimezone" },
166+
description: { from: "Description" },
167+
recurrenceId: { from: "RecurrenceID" },
168+
recurrenceRule: { from: "RecurrenceRule" },
169+
recurrenceException: { from: "RecurrenceException" },
170+
ownerId: { from: "OwnerID", defaultValue: 1 },
171+
isAllDay: { type: "boolean", from: "IsAllDay" }
207172
}
208173
}
209-
},
210-
filter: {
211-
logic: "or",
212-
filters: [{
213-
field: "ownerId",
214-
operator: "eq",
215-
value: 1
216-
}, {
217-
field: "ownerId",
218-
operator: "eq",
219-
value: 2
220-
}]
221174
}
222-
},
223-
resources: [{
224-
field: "ownerId",
225-
title: "Owner",
226-
dataSource: [{
227-
text: "Alex",
228-
value: 1,
229-
color: "#f8a398"
230-
}, {
231-
text: "Bob",
232-
value: 2,
233-
color: "#51a0ed"
234-
}, {
235-
text: "Charlie",
236-
value: 3,
237-
color: "#56ca85"
238-
}]
239-
}]
175+
}
240176
}).data("kendoScheduler");
241-
242-
$("#days").change(function() {
243-
//change the number of days option of the view
244-
scheduler.setOptions({
245-
numberOfDays: parseInt($(this).val())
246-
});
247-
//reload the view
248-
scheduler.view(scheduler.view().name);
249-
});
250177
});
251178
</script>
252179
```

docs/controls/scheduling/scheduler/how-to/custom-views/custom-todo-view.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_title: Create Custom To-Do Views | Kendo UI Scheduler
44
description: "Learn how to create a custom To-Do view for a Kendo UI Scheduler."
55
previous_url: /controls/scheduling/scheduler/how-to/custom-todo-view
66
slug: howto_create_custom_todo_view
7+
position: 4
78
---
89

910
# Create Custom To-Do Views

docs/controls/scheduling/scheduler/how-to/custom-views/custom-view.md

Lines changed: 34 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ page_title: Create Custom Views by Inheriting Built-In Views | Kendo UI Schedule
44
description: "Learn how to inherit some of the built-in views and implement specific custom logic in a Kendo UI Scheduler widget."
55
previous_url: /controls/scheduling/scheduler/how-to/custom-view
66
slug: howto_create_custom_view_inheriting_builtinview_scheduler
7+
position: 2
78
---
89

910
# Create Custom Views by Inheriting Built-In Views
@@ -15,51 +16,48 @@ The following example demonstrates how to inherit some of the built-in views and
1516
```html
1617
<div id="scheduler"></div>
1718
<script>
18-
var CustomAgenda = kendo.ui.AgendaView.extend({
19-
endDate: function() {
20-
var date = kendo.ui.AgendaView.fn.endDate.call(this);
21-
return kendo.date.addDays(date, 31);
22-
}
23-
});
24-
25-
var ThreeDayView = kendo.ui.MultiDayView.extend({
26-
nextDate: function () {
27-
return kendo.date.nextDay(this.startDate());
28-
},
29-
30-
options: {
31-
selectedDateFormat: "{0:D} - {1:D}"
32-
},
33-
34-
name: "ThreeDayView",
35-
36-
calculateDateRange: function () {
37-
//create a range of dates to be shown within the view
38-
var start = this.options.date,
39-
idx, length,
40-
dates = [];
19+
var CustomAgenda = kendo.ui.AgendaView.extend({
20+
endDate: function() {
21+
var date = kendo.ui.AgendaView.fn.endDate.call(this);
22+
return kendo.date.addDays(date, 31);
23+
}
24+
});
4125
42-
for (idx = 0, length = 3; idx < length; idx++) {
43-
dates.push(start);
44-
start = kendo.date.nextDay(start);
45-
}
26+
var ThreeDayView = kendo.ui.MultiDayView.extend({
27+
nextDate: function () {
28+
return kendo.date.nextDay(this.startDate());
29+
},
30+
options: {
31+
selectedDateFormat: "{0:D} - {1:D}"
32+
},
33+
name: "ThreeDayView",
34+
calculateDateRange: function () {
35+
//create a range of dates to be shown within the view
36+
var start = this.options.date,
37+
idx, length,
38+
dates = [];
39+
40+
for (idx = 0, length = 3; idx < length; idx++) {
41+
dates.push(start);
42+
start = kendo.date.nextDay(start);
43+
}
4644
47-
this._render(dates);
48-
}
49-
});
45+
this._render(dates);
46+
}
47+
});
5048
5149
$(function() {
5250
$("#scheduler").kendoScheduler({
5351
date: new Date("2013/6/13"),
5452
startTime: new Date("2013/6/13 07:00 AM"),
5553
height: 600,
5654
views: [
57-
"day",
58-
{ type: "week", selected: true },
59-
// "custom week",
60-
{ type: "ThreeDayView", title: "Three day view" },
61-
// "custom agenda",
62-
{ type: "CustomAgenda", title: "Custom Agenda" }
55+
"day",
56+
"week",
57+
// "custom week",
58+
{ type: "ThreeDayView", title: "Three day view", selected: true },
59+
// "custom agenda",
60+
{ type: "CustomAgenda", title: "Custom Agenda" }
6361
],
6462
timezone: "Etc/UTC",
6563
dataSource: {
@@ -105,60 +103,9 @@ The following example demonstrates how to inherit some of the built-in views and
105103
isAllDay: { type: "boolean", from: "IsAllDay" }
106104
}
107105
}
108-
},
109-
filter: {
110-
logic: "or",
111-
filters: [
112-
{ field: "ownerId", operator: "eq", value: 1 },
113-
{ field: "ownerId", operator: "eq", value: 2 }
114-
]
115-
}
116-
},
117-
resources: [
118-
{
119-
field: "ownerId",
120-
title: "Owner",
121-
dataSource: [
122-
{ text: "Alex", value: 1, color: "#f8a398" },
123-
{ text: "Bob", value: 2, color: "#51a0ed" },
124-
{ text: "Charlie", value: 3, color: "#56ca85" }
125-
]
126106
}
127-
],
128-
edit: function(e) {
129-
var container = e.container;
130-
131-
/* ACTION: ADD custom button */
132-
var newButton = $('<a class="k-button" href="#">New button</a>');
133-
134-
//wire its click event
135-
newButton.click(function(e) { alert("Clicked"); });
136-
137-
//add the button to the container
138-
var buttonsContainer = container.find(".k-edit-buttons");
139-
buttonsContainer.append(newButton);
140-
141-
/* ACTION: Accessing dropdownlist widget */
142-
container.find("[data-container-for=ownerId]")
143-
.find("[data-role=dropdownlist]")
144-
.data("kendoDropDownList")
145-
.wrapper.width("400px");
146107
}
147108
});
148-
149-
$("#people :checkbox").change(function(e) {
150-
var checked = $.map($("#people :checked"), function(checkbox) {
151-
return parseInt($(checkbox).val());
152-
});
153-
154-
var scheduler = $("#scheduler").data("kendoScheduler");
155-
156-
scheduler.dataSource.filter({
157-
operator: function(task) {
158-
return $.inArray(task.ownerId, checked) >= 0;
159-
}
160-
});
161-
});
162109
});
163110
</script>
164111
```

0 commit comments

Comments
 (0)