Ok, got this working pretty good now. Had to modify hobo-1.0.0/lib/
hobo/model_controller.rb:562 to read:
flash[:gritter] = '<script> jQuery.gritter.add({title: "Done!",
text:"'+message+'"}); </script>'
And of course include the right js, css, and images in my application
for Gritter to work and look proper.
In order to make the messages more meaningful, I'll also add "title"
and "icon" to the to flash_message definition and update the method
wherever it's called in model_controller.rb to include those new
params.
I'm not sure if there is a cleaner way to do this, I'm open to any and
all suggestions. I don't really like to hack hobo itself, but don't
know how I might extend it to do the things I'm trying to do here.
thanks,
Jeremy
On May 7, 9:38 am, Jeremy Savoy <[email protected]> wrote:
> Ok, Pawel gave me an example of how to use Gritter with Rails at this
> URL
>
> http://pawelpogorzelski.iblogger.org/2010/05/07/rails-tips-gritter-in...
>
> I'm sure you could functionize the javascript and make this code more
> reusable. Now to integrate this with a Hobo application.
>
> After looking at the definition of flash_notice in model_controller.rb:
> 561 in the hobo-1.0.0 gem, it looks like I would have to hack up hobo
> itself to get Gritter to work in place of the current flash_notice
> function, modifying the calls to flash_notice in all the hobo CRUD
> methods ...
>
> After looking at the code at the link above, can anyone recommend to
> me a way to extend hobo to use these Gritter notifications instead of
> hacking hobo to replace flash_notice functionality to use Gritter?
>
> thanks!
> --jeremy
>
> On May 6, 4:30 pm, Jeremy Savoy <[email protected]> wrote:
>
>
>
>
>
> > Yeah I saw that list as well, mostly looking to see if anyone else has
> > tried this. Gritter looks to be the nicest of the pack.
>
> > There is a tutorial on how to integrate Gritter with CakePHP to use
> > Gritter notifications any time you use a flash message - this is
> > basically what I want to do with Gritter in Hobo and I'm betting this
> > is easy enough to do .... so I'll try and get it worked out.
>
> > Gritter:http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/
>
> > English tutorial on integrating Gritter + CakePHP for flash message
> > replacement...http://duckranger.com/2010/04/use-gritter-for-jquery-growl-for-flash-...
>
> > -jeremy
>
> > On May 6, 4:14 pm, Matt Jones <[email protected]> wrote:
>
> > > On Thu, May 6, 2010 at 3:56 PM, Jeremy Savoy <[email protected]>
> > > wrote:
> > > > Can anyone here recommend any javascript notification frameworks that
> > > > would provide similar functionality to growl? Has anyone here made an
> > > > attempt at integrating such notifications into a Hobo application?
>
> > > What exactly are you looking for? Any javascript solution is obviously
> > > going to be constrained to the browser window, and it's still a pretty
> > > tough thing to get asynchronous data back to the browser. With those
> > > limitations, there's quite a variety to choose from:
>
> > >http://webtoolkit4.me/2009/08/13/jquery-growl-likenotification-systems/
>
> > > Haven't used any of the above, but it might be a good place to start.
>
> > > --Matt Jones
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Hobo Users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group
> > > athttp://groups.google.com/group/hobousers?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Hobo Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/hobousers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/hobousers?hl=en.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.