title: Showing events for multiple eventSources depend on checkboxes' choice in Fullcalendar
body: <p>I'm adding the feature like in Solgema Fullcalendar - <a href="http://plone.org/products/solgema.fullcalendar/releases/2.1.2" rel="nofollow">http://plone.org/products/solgema.fullcalendar/releases/2.1.2</a>
  (selecting and showing events with checkboxes selection)</p>
  
  <p>My eventSourses look like:</p>
  
  <pre><code>eventSources: [
              ...
              {
                  url: '/admin_schedule/get_schedule_db_recurring_events_on_daysweek/',//"&lt;?echo $data_path?&gt;",
                  type: 'GET',
                  data: {sch_teacher_id: sch_teacher_id},
                  backgroundColor: 'red',
              }
  
          ],
  </code></pre>
  
  <p>And I want implement checkboxes for "filtering" events by teachers, checked in checkboxes. For beginning make just one checkbox (later make foreach cover)</p>
  
  <pre><code>&lt;div class="box"&gt;
          &lt;?php
          $js = 'onClick="rerender_schedule()"';
          echo form_checkbox('teacher', 'vika', FALSE, $js)." Vika";  
          ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>By this code as I think, fullcalendar must call rerender_schedule() function which filters data from eventSource with <strong>vika's sch_teacher_id</strong></p>
  
  <p>If somebody could help with rerender_schedule() function, I will be thankful, because not good in ajax.</p>
  
  <p>EDIT: (thanks to tocallaghan!). It's just a beginning right now.</p>
  
  <ol>
  <li><p>My 3 checkboxes:</p>
  
  <pre><code>    $data = array(
          'name'        =&gt; 'teacher',
          'class'       =&gt; 'teacher',
          'id'          =&gt; 'teacher',
          'value'       =&gt; '128',
          'checked'     =&gt; FALSE,
          'style'       =&gt; 'margin:10px',
          );
  
      echo form_checkbox($data); echo "Вика";  
  
      $data = array(
          'name'        =&gt; 'teacher',
          'class'       =&gt; 'teacher',
          'id'          =&gt; 'teacher2',
          'value'       =&gt; '111',
          'checked'     =&gt; FALSE,
          'style'       =&gt; 'margin:10px',
          );
  
      echo form_checkbox($data); echo "Вася"; 
  
      $data = array(
          'name'        =&gt; 'teacher',
          'class'       =&gt; 'teacher',
          'id'          =&gt; 'teacher3',
          'value'       =&gt; '1',
          'checked'     =&gt; FALSE,
          'style'       =&gt; 'margin:10px',
          );
  
      echo form_checkbox($data); echo "Саша";          
  </code></pre></li>
  <li><p>ajax on change them:</p>
  
  <pre><code>$('.teacher').change(function (event) {
          events1.data.sch_teacher_id = $(this).val(); 
          events2.data.sch_teacher_id = $(this).val();
          events3.data.sch_teacher_id = $(this).val();
          $calendar.fullCalendar('refetchEvents');
      });
  </code></pre></li>
  <li><p>vars for eventSourses:</p>
  
  <pre><code>var events1 = {
      url: 'url1',
      type: 'GET',
      data: {sch_teacher_id: $('#teacher').val() },
      success: function (response) {
          return response;
      }
  };
  var events2 = {
      url: 'url2',
      type: 'GET',
      data: {sch_teacher_id: $('#teacher').val() },
      backgroundColor: 'green',
      success: function (response) {
          return response;
      }
  };
  var events3 = {
      url: 'url3',
      type: 'GET',
      data: { sch_teacher_id: $('#teacher').val() },
      backgroundColor: 'red',
      success: function (response) {
          return response;
      }
  };
  </code></pre></li>
  <li><p>my eventSources call</p>
  
  <pre><code>eventSources: [
      events1,
      events2,
      events3
  ],
  </code></pre></li>
  </ol>