0

I've searched the documentation and found nothing about associating a FullCalendar Resource with Event Sources from Google Calendar.

This is the relevant code:

resources: [
            { id: 'room01', title: 'Room 1' },
            { id: 'room02', title: 'Room 2' },
            { id: 'room03', title: 'Room 3' },
            { id: 'room04', title: 'Room 4' }
        ],
        eventSources: [
           {
               id: 'e1',
               resourceId: 'room01',
               googleCalendarId: '[GOOGLE CALENDAR ID #1]'
           },
           {
               id: 'e2',
               resourceId: 'room02',
               googleCalendarId: '[GOOGLE CALENDAR ID #2]'
           }
        ],

Please, help :-)

ejcortes
  • 609
  • 7
  • 13

1 Answers1

1

In that you can associate any event with anything, the specific bit about google calendar I cannot really answer, however from what you showed here (i.e. adding the googleCalendarId to your events as you have), I am thinking what you may be looking for is the next piece of the puzzle, being the eventClick part ?

For what you have I would think this would look something like :

        eventClick: function(calEvent) {
            if (calEvent.googleCalendarId) {
                var edit_url = "/url_to_get_to_the_google_calendar/" + calEvent.googleCalendarId + "/";
                window.open(edit_url,"_self");
                return false;
            }
        },

I use the same technique as you showed above to add various associations to my events, and then simply add eventClick code (which would simply follow your code above in your calendar page entry) - except I am adding my data in methods in the scheduler views.py methods.....but it's the same concept !

Does that help ? I was not clear on what actually you were needing help with !