I have a scheduler with the following code for moveEnd
moveEnd: function (e) {
//For Work Managers this code will give the option to clone or move when an event is moved.
if ($WorkManager == 'true') {
e.preventDefault();
eventHolder = e;
var dialog = $("#schedulerWindow").data("kendoWindow");
dialog.center();
dialog.open();
}
},
The dialog has just two buttons CLONE which has an onclick function of onClone() and MOVE which has an onclick function of onMove(). These functions are listed below.
function onClone() {
var dialog = $("#schedulerWindow").data("kendoWindow");
var scheduler = $("#scheduler").data("kendoScheduler");
dialog.close();
var copy = eventHolder.event.toJSON();
copy.start = eventHolder.start;
copy.end = eventHolder.end;
copy.RID = -1;
delete copy.uid;
scheduler.dataSource.add(copy);
scheduler.dataSource.sync();
eventHolder = null;
}
function onMove() {
var dialog = $("#schedulerWindow").data("kendoWindow");
var scheduler = $("#scheduler").data("kendoScheduler");
dialog.close();
eventHolder.event.set("start", eventHolder.start);
eventHolder.event.set("end", eventHolder.end);
scheduler.dataSource.sync();
eventHolder = null;
}
This was fine when you could only select one event at a time. The latest version of the code will allow the use of Ctrl Click to select several events
If I select several events and try and clone or move only the last clicked event is cloned/moved. What changes to the Clone and Move functions do I need to make for this to work with one or more selected events.
Thanks