This is a migrated thread and some comments may be shown as answers.

OnClientAppointmentMoveEnd

11 Answers 108 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 05 Aug 2010, 07:01 AM
Hi,
I am using OnClientAppointmentMoveEnd to determine if the user is trying to move an appointment to a disabled timeslot:

function onAppointmentMoveEnd(sender, args) {
    var start = args.get_targetSlot().get_startTime();
    var end = new Date(start.getTime() + args.get_appointment().get_duration());
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
         
    warnIfOccupied(start, end, sender, args);
}

It runs without an error but it also skips over the conditional statement when it shouldn't.

I can verify that this works when I use it on the event OnClientAppointmentResizeEnd. This code works correctly and stops the user dragging the appointment into a disabled area:

function onAppointmentResizeEnd(sender, args) {
    var start = args.get_appointment().get_start();
    var end = args.get_targetSlot().get_endTime();
 
    warnIfOccupied(start, end, sender, args);
 
    var slotElement = $telerik.$(args.get_targetSlot().get_domElement());
    if (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) {
        // Prevent appointment move to disabled timeslots.
        alert("This venue is not available in this time period.");
        args.set_cancel(true);
    }
}

It seems that the (slotElement.is(".Disabled") || slotElement.parent().is(".Disabled")) is not available to the OnClientAppointmentMoveEnd event.

Please advise if I am simply "doing it wrong" or, if this is in fact, a bug.

Thanks.

11 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Aug 2010, 02:15 PM
Hello Adam,

I was able to replicate the problem too, but I am not sure what exactly is causing it. It is indeed strange, that this approach works for onClientApponitmentInserting as well, but not for onClientAppointmentMoveEnd. We will investigate the issue, but in the meantime you can handle the server-side AppointmentUpdate event as shown in this kb article. I hope this is an acceptable workaround for you


Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kevin Kembel
Top achievements
Rank 1
answered on 12 Sep 2010, 12:50 AM
I have this same problem, it appears that OnClientAppointmentMoveEnd is firing twice if I move an appointment to a different time slot.  The first time it fires, the get_targetSlot() is actually returning the appointment, not the target timeslot, so the dom element in my case has a class of "rsApt" rather than "Disabled".  The second time the event fires, which is back-to-back, the get_targetSlot() returns the actual time slot this time, and my code catches the disabled time slot and executes set_cancel(true); but it has no effect (maybe because the first execution of the event didn't cancel, only the second execution of the event did?).

The server-side is less than ideal for me, I've implemented it but am hoping this bug will be fixed shortly, or a clientside workaround can be posted?
0
Peter
Telerik team
answered on 15 Sep 2010, 02:51 PM
Hi Kevin,

I will escalate this issue to the attention of our developers. However, I can't say for sure when it will be fixed.

Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Raghav
Top achievements
Rank 1
answered on 30 Nov 2010, 06:15 PM
Observe same issue as  that of Kevin. Is there any plan to fix this issue in upcoming release?

-Raghav Gangaraju
0
Peter
Telerik team
answered on 06 Dec 2010, 12:53 PM
Hi Raghav,

There is good chance that we will be able to fix the bug for the upcoming Q1 2011 release.

Thanks for your inquiry.

Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Brian Taylor
Top achievements
Rank 1
answered on 31 Mar 2011, 03:40 PM

Hi,
I am using 2011 Q1 release and the problem still exists

OnClientAppointmentMoveEnd called "SchMove" below.

"Series.IsSeries" is a web service called from javascript
When the web service js call-back function fires, it calls an alert('test');

Removing the alert appears to fix’s the issue.

 

    function SchMove(sender, args) {
        alert('move');
        args.set_cancel(true);
            CurrentApp = args.get_appointment();
            Series.IsSeries(CurrentApp.get_id(), CallbackSeries);
    }

0
Peter
Telerik team
answered on 05 Apr 2011, 02:42 PM
Hello Brian,

Unfortunately, we still haven't gotten to this problem. Please, accept our apologies for any inconvenience caused by this.

All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kevin Kembel
Top achievements
Rank 1
answered on 13 May 2011, 02:49 AM
This is pretty disappointing that this seemingly small but important bug still hasn't been addressed at some point in the last 9 months.

Back in September we worked in a server-side solution and decided to revisit the issue this summer, we want to redesign our application using web services and client-side code, but this bug was preventing us last year from working in all the features that our scheduler requires.

Now we're ready to redesign it client-side, but the bug has still not been fixed?  Is this to be included in a Q1 SP2 or the next release at least?
0
Peter
Telerik team
answered on 18 May 2011, 02:53 PM
Hello Kevin,

We will do our best to fix the problem for the upcoming service pack.

Best wishes,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Peter
Telerik team
answered on 24 May 2011, 04:11 PM
Hi guys,

We believe we have fixed the problem. You can try with the latest internal build that will be uploaded by the end of this week. Unfortunately we didn't have time to commit the changes to the official version of service pack 2.

Kind regards,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Kevin Kembel
Top achievements
Rank 1
answered on 24 May 2011, 04:59 PM
Hi Peter,

Thanks for working this one in this week.  We hope to update to a web services solution soon.
Tags
Scheduler
Asked by
Jacob
Top achievements
Rank 1
Answers by
Peter
Telerik team
Kevin Kembel
Top achievements
Rank 1
Raghav
Top achievements
Rank 1
Brian Taylor
Top achievements
Rank 1
Share this question
or