Hi Guys,
I'm hoping for some collective genius as i've hit a stumbling block trying to implement a feature request on a Scheduling application I've written.
The desired effect i'm after is that on a moveEnd event, the user should be prompted with the option to either, Move or Copy the event, with an option to cancel the drag operation also.
So far i have the following (sections of code for illustration purpose only)
So i'm preventing the default operation, populating a global placeholder variable with the event data so it's accessible from the following buttons.
My scheduler data source is quite complex, but in essence contains, create:, update:, read: and destroy: elements, a parameterMap: function to parse the data before the ajax post and a parse: function to format the response.
But i'm at a bit of a loss on where to go next, ideally it would be as easy as calling a method to either create or edit the event but i get the feeling it's not going to be that simple.
Thanks in advance for any suggestions!
I'm hoping for some collective genius as i've hit a stumbling block trying to implement a feature request on a Scheduling application I've written.
The desired effect i'm after is that on a moveEnd event, the user should be prompted with the option to either, Move or Copy the event, with an option to cancel the drag operation also.
So far i have the following (sections of code for illustration purpose only)
var eventHolder;$("#scheduler").kendoScheduler({moveEnd: function (e) { e.preventDefault(); eventHolder = e; var dialog = $("#schedulerWindow").data("kendoWindow"); dialog.center(); dialog.open(); }});So i'm preventing the default operation, populating a global placeholder variable with the event data so it's accessible from the following buttons.
$("#moveEventButton").kendoButton({ click:function(e){ var dialog = $("#schedulerWindow").data("kendoWindow"); eventHolder = null; dialog.close(); } }); $("#copyEventButton").kendoButton({ click:function(e){ var dialog = $("#schedulerWindow").data("kendoWindow"); eventHolder = null; dialog.close(); } }); $("#cancelDragButton").kendoButton({ click:function(e){ var dialog = $("#schedulerWindow").data("kendoWindow"); eventHolder = null; dialog.close(); } });My scheduler data source is quite complex, but in essence contains, create:, update:, read: and destroy: elements, a parameterMap: function to parse the data before the ajax post and a parse: function to format the response.
But i'm at a bit of a loss on where to go next, ideally it would be as easy as calling a method to either create or edit the event but i get the feeling it's not going to be that simple.
Thanks in advance for any suggestions!