OnClientAppointmentMoveEnd

12 posts, 0 answers
  1. Jacob
    Jacob avatar
    8 posts
    Member since:
    Apr 2010

    Posted 05 Aug 2010 Link to this post

    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.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Aug 2010 Link to this post

    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
  3. Kevin Kembel
    Kevin Kembel avatar
    48 posts
    Member since:
    Mar 2009

    Posted 11 Sep 2010 Link to this post

    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?
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 15 Sep 2010 Link to this post

    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
  5. Raghav
    Raghav avatar
    4 posts
    Member since:
    Oct 2010

    Posted 30 Nov 2010 Link to this post

    Observe same issue as  that of Kevin. Is there any plan to fix this issue in upcoming release?

    -Raghav Gangaraju
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 06 Dec 2010 Link to this post

    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.
  7. Brian Taylor
    Brian Taylor avatar
    13 posts
    Member since:
    May 2010

    Posted 31 Mar 2011 Link to this post

    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);
        }

  8. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 05 Apr 2011 Link to this post

    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
  9. Kevin Kembel
    Kevin Kembel avatar
    48 posts
    Member since:
    Mar 2009

    Posted 12 May 2011 Link to this post

    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?
  10. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 May 2011 Link to this post

    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.

  11. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 24 May 2011 Link to this post

    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.

  12. Kevin Kembel
    Kevin Kembel avatar
    48 posts
    Member since:
    Mar 2009

    Posted 24 May 2011 Link to this post

    Hi Peter,

    Thanks for working this one in this week.  We hope to update to a web services solution soon.
Back to Top