Hi all,

I've been working on adapting FullCalendar to load the event into the sidebar rather in a new page or colorbox. So far, this is what I have in fullcalendar.views.js on line 74:

else {
              $('#block-block-1 .content').load('event/test-event .content');
            }

"#block-block-1 .content" is the sidebar block where the event will load.
"event/test-event" is the url to the event, and ".content" is the div on the event page that will load into the block.

This code works correctly. However, if I replace "event/test-event" with "calEvent.url," the code breaks. I'm not sure why this is; maybe "calEvent.url" calls the entire url rather than a relative url? Any help would be appreciated.

Comments

aspilicious’s picture

you can try to print the "calEvent.url" so you know what it is.
If it's an absolute path you can substract "Drupal.settings.basePath" from it to get the relative part.

tim.plunkett’s picture

Status: Active » Postponed (maintainer needs more info)

Some more work on your part to debug this would be helpful.

console.log(calEvent); and then viewing it in your JS console (Safari/Chrome natively or Firebug in Firefox).

CoreyMoore’s picture

I've been working on other projects, so I'm just getting back to this.

When I use colsole.log(calEvent); in my JS console, I get "ReferenceError: calEvent is not defined" error. I may be using it wrong, though.

CoreyMoore’s picture

Status: Postponed (maintainer needs more info) » Fixed

Sorry guys for not giving you more information. I was finally able to get this to work using the following method:


else {
              $('#block-block-1 .content').load(calEvent.url+' .content');
            }

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.