flash_growler

github.com/midas/flash_growler/tree/master

DESCRIPTION:

A Guilded (github.com/midas/guilded/tree/master) component that displays Rails flash messages in an interface similar to OS/X’s growler.

FEATURES:

Looks for flash messages in flash, flash and flash and displays a message that will slide out of view if JavaScript is enabled.

INSTALL:

sudo gem install midas-flash_growler

USE:

Include the gems in your Rails project:

config.gem 'midas-guilded', :version => '0.0.5', :lib => 'guilded', :source => 'http://gems.github.com'
config.gem 'midas-flash_growler', :version => '1.0.2', :lib => 'flash_growler', :source => 'http://gems.github.com'

Run generator to create the CSS and JavaScript assets:

script/generate flash_growler_assets

Call the flash growler helper somewhere in your view(s). I usually call it in the application layout (or another layout):

<%= g_flash_growler :id => 'growler', :position => 'bottom' %>

Also, as with all Guilded components, a call to the apply behavior helper. It also makes the most sense to do this in your layout(s):

<%= g_apply_behavior %>

OPTIONS:

  • :position - ‘top’ to display the message at the top of the browser or ‘bottom’ to display message at the bottom (defaults to bottom).

  • :delay - Number of milliseconds to display the message before starting the slide out of view (defaults to 4000 ms).

  • :speed - Number of milliseconds to animate the slide out of view (defaults to 1000 ms).

REQUIREMENTS:

LICENSE:

(The MIT License)

Copyright © 2009 C. Jason Harrelson (midas)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.