title: jQuery fullCalendar + Fancybox popup to edit event
body: <p>I am generating events on fullCalendar with this code</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  $(document).ready(function() {
  
      $('#calendar').fullCalendar({
          // put your options and callbacks here
              header: {
                  right: 'today month,agendaWeek,agendaDay prev,next'
              },
              events: [
                      &lt;?php foreach($cal_data as $row): ?&gt;
                              {   
                            title : '&lt;?php echo $row-&gt;plant_name . ' ' . $row-&gt;value_2; ?&gt;',
                            start : '&lt;?php echo $row-&gt;date . ' ' . $row-&gt;time; ?&gt;',
                            allDay: false,
                            url   : '&lt;?php echo base_url() . 'events/events_edit/' . $row-&gt;record_id; ?&gt;'
                              },
                      &lt;?php endforeach; ?&gt;
                      ],
  
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>This works fine for data display. When I click on the event a new page is loaded for editing.</p>
  
  <p>Now I need to edit inside a jQuery Fancybox popup.</p>
  
  <p>Based on the fullCalendar API, I would use</p>
  
  <pre><code>eventClick: function(event) {
          if (event.url) {
              window.open(event.url);
              return false;
          }
      }
  </code></pre>
  
  <p>I am using this Fancybox code throughout the project to successfully edit other things inside popups:</p>
  
  <pre><code>$.fancybox({
      'transitionIn': 'none',
      'transitionOut': 'none',
      'type': 'ajax',
      'href': link,
      'onClosed': function() {
          parent.location.reload(true);
      }
  });
  $.bind("submit", function() {
  
      $.fancybox.showActivity();
  
      $.ajax({
          type: "POST",
          cache: false,
          data: $(this).serializeArray(),
          success: function(data) {
              $.fancybox(data);
          }
      });
      return false;
  });
  </code></pre>
  
  <p>But I haven't been able to integrate it into the fullCalendar script.</p>
  
  <p>For example this doesn't work:</p>
  
  <pre><code>eventClick: function(event) {
          if (event.url) {
      $.fancybox({
          'transitionIn': 'none',
          'transitionOut': 'none',
          'type': 'ajax',
          'href': link,
          'onClosed': function() {
              parent.location.reload(true);
          }
      });
      $.bind("submit", function() {
  
          $.fancybox.showActivity();
  
          $.ajax({
              type: "POST",
              cache: false,
              data: $(this).serializeArray(),
              success: function(data) {
                  $.fancybox(data);
              }
          });
          return false;
      });
              return false;
          }
      }
  </code></pre>
  
  <p>Any suggestions how to get this done?</p>
  
  <p>Thanks a lot for helping!</p>