javascript - jquery ui dialog - button click event handlers -


I'm JS Nobody I'm using the jquery FullCalendar plugin, which is an EventClick (Calistent, Js Event, View) event Displays what you click on an event on the calendar. In my event handler, I want to pop up a dialogue whether the user wants to edit a recurring event or an incident of the whole event. The problem is that for the dialog click on the button handler needs to use the calEvent variable, but I have to instantify the dialog within $ (the document).

My code is here:

  $ (document) .ready (function () {$ ('# calendar'). FullCalendar ({events: getEvents, header : {Left: 'title', center: 'prev, next', right: 'Today's Month Agenda Calendar'}, Subject: True, eventClick: function (calEvent, jsEvent, view) {if (calEvent.readOnly == true } {Return;} if (calEvent.recurring) {if (calEvent.persisted) {editOccurrence (calEvent);} and {$ ("# edit_type_dialog") dialog ("open");}} else {editEvent (calEvent) ($) "$" ("# Edit_type_dialog") dialog ({modal: true, autoOpen: false, button: {all: function}}, it: function () {$ (this) .dialog ("close "); EditOccurrence (calEvent);}, cancel: function () {$ (this) .dialog (" close ");}}}); function getEve en S (start, end, callback) {// Get some events} Edit the function edit (calendar) {warning ("edit event");} function edition (calendar) {warning ("edit enforcement")}}) ;  

So the question boils down: How do I get the event on event handlers, by clicking the button from the eventClick function in event_clip_dialog?

What I have done here (it is not certain that this is suggestible, but it works ):

1) Click on the dialog to start the dialog on the method, which gives it access to the Calvert Variable. 2) Full calendar out of urgency, but still within $ (document) .ready () I added $ ("# edit_type_dialog"). Hide ()


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -