Skip to content

A twitter like notification bar using jQuery for Ruby on Rails

License

Notifications You must be signed in to change notification settings

emrekutlu/notify_bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotifyBar

NotifyBar uses Dmitri Smirnov's jQuery plugin to create Twitter like notifications for Rails. It uses flash messages. You can visit Dmitri's website to see demos of jQuery plugin.

Installation

script/plugin install git://github.com/emrekutlu/notify_bar.git

Usage

Add necessary javascript and css files to your layout.

<%= stylesheet_link_tag 'jquery.notifyBar' %>
<%= javascript_include_tag 'jquery.notifyBar' %>

Add notify_bar helper in body.

<%= notify_bar %>

By default notifyBar displays flash[:notice]. If you use a different key, you can specify it with :flash option.

<%= notify_bar :flash => :success %>

To use multiple keys :

<%= notify_bar :flash => [:notice, :success] %>

If multiple keys exist, notify_bar try to find in order they added. Just displays the first one found, not all of them.

NotifyBar tries to be compatible with jQuery-Notify-bar. It uses the same options except html and jqObject . It doesn't accept html because it uses flash messages to create it. It doesn't accept jqObject because I don't know what to do with it :)

An example with all options:

<%= notify_bar :flash => [:notice, :success], :delay => 2500, :animation_speed => 'slow', :close => true, :cls => 'notify' %>

Visit here to see the explanations of the options. One special note for cls , if cls is not assigned flash option is used for cls .

Copyright (c) 2010 İ. Emre Kutlu, released under the MIT license

About

A twitter like notification bar using jQuery for Ruby on Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published