Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Full Calendar
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Scott LaBounty  
View profile  
 More options Sep 14, 6:42 pm
From: Scott LaBounty <slabou...@gmail.com>
Date: Mon, 14 Sep 2009 15:42:46 -0700
Local: Mon, Sep 14 2009 6:42 pm
Subject: Full Calendar

Has anyone used FullCalendar(http://arshaw.com/fullcalendar/) with Ramaze?
I'm can't get it to show the events I'm passing back (AJAX) from my
controller. I'm definitely getting the request. Here's the controller code:

    def show_calendar
        @page_javascript = 'show_calendar'
        if request.xhr? # came from ajax request
            # Create a JSON "object" of the choice that can in through the
post
            # request and the current time. For the time, we need to enclose
it
            # in double quotes so that it will be interpreted as a string.
            # "{ choice: #{request['choice']}, time: \"#{Time.now}\" }"

            Ramaze::Log.debug("show_calendar: Have an Ajax request start:
#{request['start']} end: #{request['end']}")
            # "{ id: 1, title: \"Event1\", start: \"2009-09-15\" }"
            Ramaze::Log.debug("#{JSON.pretty_generate([{"id"=>1, "title" =>
"Event1", "start" => "2009-09-15"}])}")
            json = JSON.generate [{"id"=>1, "title" => "Event1", "start" =>
"2009-09-15"}]
            return json
        end

    end

You can see I've tried a couple of different ways of passing (straight
string and then using the JSON plugin).

Any ideas?
--
Scott
http://steamcode.blogspot.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kez  
View profile  
 More options Sep 15, 2:45 am
From: kez <kdob...@gmail.com>
Date: Mon, 14 Sep 2009 23:45:06 -0700 (PDT)
Local: Tues, Sep 15 2009 2:45 am
Subject: Re: Full Calendar
I've been trying to do something like this with DatePicker...had no
idea this was out there.

Hopefully can try and implement it today, so will let you know if I
get events working.

kez.

On Sep 14, 11:42 pm, Scott LaBounty <slabou...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hrnt  
View profile  
 More options Sep 15, 5:11 am
From: hrnt <aotu...@gmail.com>
Date: Tue, 15 Sep 2009 02:11:27 -0700 (PDT)
Local: Tues, Sep 15 2009 5:11 am
Subject: Re: Full Calendar

On 15 syys, 01:42, Scott LaBounty <slabou...@gmail.com> wrote:

Instead of "return json", try "respond(json, 200)".
If you just return the string, it will be wrapped in your layout, or
completely ignored
if you have a view for that action.

(I am not sure if it is necessary to use that second parameter with
respond, but I don't have
Ramaze docs open at the moment)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nick Robinson-Wall  
View profile  
 More options Sep 15, 6:35 am
From: Nick Robinson-Wall <n...@robinson-wall.com>
Date: Tue, 15 Sep 2009 11:35:26 +0100
Local: Tues, Sep 15 2009 6:35 am
Subject: Re: Full Calendar
2009/9/15 hrnt <aotu...@gmail.com>:

> (I am not sure if it is necessary to use that second parameter with
> respond, but I don't have
> Ramaze docs open at the moment)

Nope, that's optional. I didn't even realise there was a second
parameter for respond, you learn something new every day.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott LaBounty  
View profile  
 More options Sep 15, 10:17 am
From: Scott LaBounty <slabou...@gmail.com>
Date: Tue, 15 Sep 2009 07:17:03 -0700
Local: Tues, Sep 15 2009 10:17 am
Subject: Re: Full Calendar

I'll give this a try today, but I do have the line:

    layout(:page){ !request.xhr? }

that should make it so that it doesn't use the layout for this. The respond
does make it more clear though, what's going on, so I'll give it a shot.

Thanks for the help.
--
Scott
http://steamcode.blogspot.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott LaBounty  
View profile  
 More options Sep 15, 12:21 pm
From: Scott LaBounty <slabou...@gmail.com>
Date: Tue, 15 Sep 2009 09:21:26 -0700
Local: Tues, Sep 15 2009 12:21 pm
Subject: Re: Full Calendar

OK, I admit to being skeptical but ... the respond worked but ... it did
have to have the 2nd parameter of 200 so what I ended up with was

respond(json, 200)

I'm not sure why or how, but that did it.

Thanks everyone!

--
Scott
http://steamcode.blogspot.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Saunderson  
View profile  
 More options Sep 15, 1:28 am
From: Greg Saunderson <greg.saunder...@gmail.com>
Date: Tue, 15 Sep 2009 07:28:59 +0200
Local: Tues, Sep 15 2009 1:28 am
Subject: Re: Full Calendar
Hi Scott,

generally when troubleshooting AJAX issues, I rely on the Net tab in
Firebug to show me the output of the requested page.

I find any extraneous output on that page (error messages, warnings)
will break the AJAX call and the function handling the response will
not know what to do with the mangled response.

Not sure if that's at all useful to you.

Cheers,

Greg


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott LaBounty  
View profile  
 More options Sep 15, 12:58 pm
From: Scott LaBounty <slabou...@gmail.com>
Date: Tue, 15 Sep 2009 09:58:10 -0700
Local: Tues, Sep 15 2009 12:58 pm
Subject: Re: Full Calendar

Greg,

I hadn't seen that before and yes, I can see where that would be really
useful. I'm going to try with my not working version just to see what I get
there.

Thanks!

Scott

On Mon, Sep 14, 2009 at 10:28 PM, Greg Saunderson <greg.saunder...@gmail.com

--
Scott
http://steamcode.blogspot.com/

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google