Hi !! I am trying to create a template for a SCHEDULE but my question is where i must put my event function if the object is not created in the init.
Example object BUTTON BTN1
<div id="example">
<div id="team-schedule">
</div>
<script id="event-template" type="text/x-kendo-template">
<div>#:description #</div>
# for (var i = 0; i < resources.length; i++) { #
<div>
#:resources[i].text #
</div>
# } #
</script>
<script id="customEditorTemplate" type="text/x-kendo-template">
<button class="btn1" type="button">Foo</button>
</script>
<script>
</script>
<div id="scheduler"></div>
</div> <script id="customEditorTemplate" type="text/x-kendo-template">
<button class="btn1" type="button">Foo</button>
</script>
$("#scheduler").kendoScheduler({
date: new Date("2013/6/13"),
startTime: new Date("2013/6/13 08:00 AM"),
endTime: new Date("2013/6/13 05:30 PM"),
height: 1200,
eventTemplate: $("#event-template").html(), //template event id
views: [
"workWeek",
{ type: "day", minorTickCount: 4, selected: true },
"week",
"month",
"agenda",
{ type: "timeline", eventHeight: 20}
],
editable: {
template: $("#customEditorTemplate").html(),
},
majorTick: 60,
timezone: "Etc/UTC",
dataSource: {
batch: true,
transport: {
read: {
url: "http://demos.telerik.com/kendo-ui/service/tasks",
dataType: "jsonp"
},
update: {
url: "http://demos.telerik.com/kendo-ui/service/tasks/update",
dataType: "jsonp"
},
create: {
url: "http://demos.telerik.com/kendo-ui/service/tasks/create",
dataType: "jsonp"
},
destroy: {
url: "http://demos.telerik.com/kendo-ui/service/tasks/destroy",
dataType: "jsonp"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number" },
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "Start", interval:"15" },
end: { type: "date", from: "End", interval:"15" },
startTimezone: { from: "StartTimezone"},
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
ownerId: { from: "OwnerID", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" },
phone :{type:"text"},
ownerId: { from: "OwnerID", defaultValue: 1 },
}
}
},
},
group: {
resources: ["Rooms"]
},
resources: [
{
field: "roomId",
name: "Rooms",
dataSource: [
{ text: "test 1", value: 1},
{ text: "test 2", value: 2}
],
title: "Room"
}
]
});