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 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
- http://ustrajunior.com/assets/jquery_notify_bar/stylesheets/jquery.notifyBar.css
18
- http://ustrajunior.com/assets/jquery_notify_bar/javascripts/jquery.notifyBar.js
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
 
@@ -1,3 +1,3 @@
1
1
  module JqueryNotifyBar
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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
- html = ''
12
- Array.wrap(opts[:flash]).each do |f|
13
- if html = flash[f]
14
- opts[:cls] ||= f.to_s
15
- break
16
- end
17
- end
18
-
19
- if html.blank?
20
- ''
21
- else
22
- javascript_tag do
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.3
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-18 00:00:00.000000000Z
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.8.5
55
+ rubygems_version: 1.6.2
54
56
  signing_key:
55
57
  specification_version: 3
56
58
  summary: jquery.notifyBar in your app