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

Clicks in the inline edit template bleed through to OnClientTimeSlotClick event

8 Answers 67 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ron Michael Zettlemoyer
Top achievements
Rank 1
Ron Michael Zettlemoyer asked on 05 Aug 2010, 02:11 PM
I am using the OnClientTimeSlotClick event to allow users to insert and edit appointments with a single click.  But I find that whenever the user clicks inside the insert or edit template, the click event bleeds through to the scheduler and raises the OnClientTimeSlotClick event.

I can kinda work around this by checking to see if an object with the class rsAptEditFormWrapper exists and if it does not open the insert form.  But this also prevents a user from cancelling out of the edit by clicking on a blank slot to create a new appointment.

8 Answers, 1 is accepted

Sort by
0
Ron Michael Zettlemoyer
Top achievements
Rank 1
answered on 05 Aug 2010, 02:24 PM
PS - double-clicks also seem to bleed through too. 

I am able to reproduce this behavior in your demos - specifically the one that uses templates  It doesn't happen using your standard edit dialogs.
0
Peter
Telerik team
answered on 09 Aug 2010, 03:06 PM
Hello Ron,

You can fix this problem with jQuery:

function pageLoad() {
           $telerik.$(".rsTemplateWrapper").click(function (event) { event.stopImmediatePropagation(); });
       }


Kind regards,
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
Ron Michael Zettlemoyer
Top achievements
Rank 1
answered on 09 Aug 2010, 04:04 PM
That's perfect.  Thanks Peter.

Is this fix something you plan to build into the component in the future?
0
Peter
Telerik team
answered on 10 Aug 2010, 01:34 PM
Hello Ron,

Yes, I have logged the issue and we will fix it in one of the next releases. Thanks for your involvement.


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
Ron Michael Zettlemoyer
Top achievements
Rank 1
answered on 31 Aug 2010, 05:59 PM
Hi.  I finally got around to testing this and found that it doesn't quite work...  

I'm not sure what the $telerik in the beginning of the statement is for, but it doesn't seem to do anything when I do that.  I have to do something like this:

$(window).ready(function () {

        $(".rsTemplateWrapper").live("click"function (event) { event.stopImmediatePropagation(); });
        $(".rsTemplateWrapper").live("dblclick"function (event) { event.stopImmediatePropagation(); });
        
});
to get it to catch the click events at all.  But even though the dblclick event is caught, the double-click still leaks through to the calendar below.

Any thoughts?  Thanks.

0
Peter
Telerik team
answered on 03 Sep 2010, 04:40 PM
Hi Ron,

$telerik.$ is needed to access jQuery objects when the library is served by the Telerik.Web.UI assembly. For more information, please see this help topic.

Please, let me know if the problem persists.


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
Ron Michael Zettlemoyer
Top achievements
Rank 1
answered on 03 Sep 2010, 04:45 PM
I see, thank you.  I load jQuery in my own project so I guess I don't really need that.

I think the problem is that the original code only runs after the page loads -- and the rsTempalteWrapper isn't even on the page when it first loads.  It gets loaded via AJAX later on.  Using the live() function of jQuery helps to catch the new object created by AJAX and the actual event but it doesn't seem to stop the propagation.
0
Peter
Telerik team
answered on 08 Sep 2010, 01:39 PM
Hello Ron,

That's strange. The client pageLoad event will occur when the inline insert template is shown. Do you use Web Service binding? In that case you should handle OnClientFormCreated and use the same code as in pageLoad. Please, provide more information about your implementation.


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
Tags
Scheduler
Asked by
Ron Michael Zettlemoyer
Top achievements
Rank 1
Answers by
Ron Michael Zettlemoyer
Top achievements
Rank 1
Peter
Telerik team
Share this question
or