Hi,
Unfortunately I'm not able to run angular code with inside a custom scheduler template.
Here's what I'm trying to do:
I'm binding the scheduler component with my controller to a HTML element.
$scope.init =
function
() {
$(
"#scheduler"
).kendoScheduler({
date:
new
Date(),
selectable:
true
,
height: $(
'cg-contentviewer > div'
).innerHeight() -68,
views: [
"day"
,
{ type:
"workWeek"
, selected:
true
},
"week"
,
"month"
,
"agenda"
,
{ type:
"timeline"
, eventHeight: 50}
],
timezone:
"Etc/UTC"
,
editable: {
template: kendo.template($(
"#customEventModal"
).html()),
},
eventTemplate: kendo.template($(
"#customEventModal"
).html()),
dataSource: {
batch:
true
,
transport: {
read:
function
(options) {
$apiplanings.getPlaningItemsForUser({id : $rootScope.profile.id}).$promise.then(
function
(response){
options.success(response);
},
function
errorCallback(response) {
});
},
update:
function
(options) {
},
create:
function
(options){
},
destroy:
function
(options){
},
parameterMap:
function
(options, operation) {
if
(operation !==
"read"
&& options.models) {
return
{models: kendo.stringify(options.models)};
}
}
},
schema: {
model: {
id:
"id"
,
fields: {
ID: { from:
"id"
, type:
"number"
},
taskId: { from:
"id"
, type:
"number"
},
title: { from:
"title"
, defaultValue:
"No title"
, validation: { required:
true
} },
start: { type:
"date"
, from:
"planedfrom"
},
end: { type:
"date"
, from:
"planedto"
},
description: { from:
"description"
},
ownerId: { from:
"createUserId"
},
isAllDay: { type:
"boolean"
, field:
"IsAllDay"
,
default
:
false
}
}
}
}
}
});