jquery_notify_bar 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -2
- data/lib/jquery_notify_bar/version.rb +1 -1
- data/lib/jquery_notify_bar/view_helpers.rb +13 -25
- metadata +5 -3
data/README.rdoc
CHANGED
@@ -14,8 +14,8 @@ In your gem file add:
|
|
14
14
|
|
15
15
|
You need copy this files to your stylesheets and javascripts folder
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
https://github.com/ustrajunior/jquery_notify_bar/blob/master/public/javascripts/jquery.notifyBar.js
|
18
|
+
https://github.com/ustrajunior/jquery_notify_bar/blob/master/public/stylesheets/jquery.notifyBar.css
|
19
19
|
|
20
20
|
==Usage
|
21
21
|
|
@@ -6,31 +6,19 @@ module JqueryNotifyBar
|
|
6
6
|
content << "\n#{stylesheet_link_tag('jquery.notifyBar.css')}".html_safe
|
7
7
|
end
|
8
8
|
|
9
|
-
def jquery_notify_bar(opts = {})
|
9
|
+
def jquery_notify_bar(key, msg, opts = {})
|
10
10
|
opts.reverse_merge! :flash => :notice, :delay => 2000, :animation_speed => 'normal', :cls => 'notice'
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
%($(function () {
|
24
|
-
$.notifyBar({
|
25
|
-
html: '#{html}',
|
26
|
-
delay: #{opts[:delay]},
|
27
|
-
animationSpeed: '#{opts[:animation_speed]}',
|
28
|
-
cls: '#{opts[:cls]}'
|
29
|
-
});
|
30
|
-
});
|
31
|
-
)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
11
|
+
content_tag :div, msg, :class => [key, " message"], :id => "notice_ #{key}"
|
12
|
+
javascript_tag do
|
13
|
+
%($(function () {
|
14
|
+
$.notifyBar({
|
15
|
+
html: '#{msg}',
|
16
|
+
delay: #{opts[:delay]},
|
17
|
+
animationSpeed: '#{opts[:animation_speed]}',
|
18
|
+
cls: '#{opts[:cls]}'
|
19
|
+
});
|
20
|
+
});)
|
21
|
+
end
|
22
|
+
end
|
35
23
|
end
|
36
24
|
end
|
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.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-07-
|
12
|
+
date: 2011-07-26 00:00:00.000000000 -03:00
|
13
|
+
default_executable:
|
13
14
|
dependencies: []
|
14
15
|
description: A simple gem to include jquery.notifyBar to your rails app.
|
15
16
|
email:
|
@@ -30,6 +31,7 @@ files:
|
|
30
31
|
- lib/jquery_notify_bar/view_helpers.rb
|
31
32
|
- public/javascripts/jquery.notifyBar.js
|
32
33
|
- public/stylesheets/jquery.notifyBar.css
|
34
|
+
has_rdoc: true
|
33
35
|
homepage: http://ustrajunior.com/apps/jquery_notify_bar
|
34
36
|
licenses: []
|
35
37
|
post_install_message:
|
@@ -50,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
52
|
version: '0'
|
51
53
|
requirements: []
|
52
54
|
rubyforge_project: jquery_notify_bar
|
53
|
-
rubygems_version: 1.
|
55
|
+
rubygems_version: 1.6.2
|
54
56
|
signing_key:
|
55
57
|
specification_version: 3
|
56
58
|
summary: jquery.notifyBar in your app
|