jquery_notify_bar 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -4
- data/Gemfile.lock +14 -0
- data/README.rdoc +37 -0
- data/lib/jquery_notify_bar/version.rb +1 -1
- data/lib/jquery_notify_bar/view_helpers.rb +1 -1
- metadata +3 -2
- data/README +0 -3
data/.gitignore
CHANGED
data/Gemfile.lock
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
=JqueryNotifyBar
|
2
|
+
|
3
|
+
This is a simple ruby gem to include jquery.nofityBar from {Dmitri Smirnov}[http://github.com/dknight/jQuery-Notify-bar] to your rails app.
|
4
|
+
|
5
|
+
jquery.notifyBar is a twitter like notification bar.
|
6
|
+
|
7
|
+
With this gem, all your flash messages will be showed in the nofity bar. Visit the {demo page}[http://www.dmitri.me/misc/notify/] on Dmitri's website
|
8
|
+
|
9
|
+
==Installation
|
10
|
+
|
11
|
+
In your gem file add:
|
12
|
+
|
13
|
+
gem 'jquery_notify_bar'
|
14
|
+
|
15
|
+
==Usage
|
16
|
+
|
17
|
+
You just need add to helper in your layout page.
|
18
|
+
|
19
|
+
The first one you need put in your head section. It will include the required css and javascripts files.
|
20
|
+
|
21
|
+
<%= include_jquery_notify_bar %>
|
22
|
+
|
23
|
+
the seconde helper is to show the messages, you just need put it in your body
|
24
|
+
|
25
|
+
<%= jquery_notify_bar %>
|
26
|
+
|
27
|
+
==Parameters
|
28
|
+
|
29
|
+
You can pass options too:
|
30
|
+
|
31
|
+
<%= jquery_notify_bar :delay => 2000 %>
|
32
|
+
<%= jquery_notify_bar :animation_speed => 'normal' %>
|
33
|
+
<%= jquery_notify_bar :cls => :success %>
|
34
|
+
|
35
|
+
This gem was inspired in the notify_bar[https://github.com/emrekutlu/notify_bar] {by İ. Emre Kutlu}[https://github.com/emrekutlu]
|
36
|
+
|
37
|
+
Copyright (c) 2011 {Jose Carlos Ustra Junior}[http://ustrajunior.com], released under the MIT license
|
@@ -6,7 +6,7 @@ module JqueryNotifyBar
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def jquery_notify_bar(opts = {})
|
9
|
-
opts.reverse_merge! :flash => :notice, :delay => 2000, :animation_speed => 'normal', :
|
9
|
+
opts.reverse_merge! :flash => :notice, :delay => 2000, :animation_speed => 'normal', :cls => 'notice'
|
10
10
|
html = ''
|
11
11
|
Array.wrap(opts[:flash]).each do |f|
|
12
12
|
if html = flash[f]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery_notify_bar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -20,7 +20,8 @@ extra_rdoc_files: []
|
|
20
20
|
files:
|
21
21
|
- .gitignore
|
22
22
|
- Gemfile
|
23
|
-
-
|
23
|
+
- Gemfile.lock
|
24
|
+
- README.rdoc
|
24
25
|
- Rakefile
|
25
26
|
- jquery_notify_bar.gemspec
|
26
27
|
- lib/jquery_notify_bar.rb
|
data/README
DELETED