innetra-easy_navigation 3.0.0 → 3.1

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/Manifest CHANGED
@@ -1,5 +1,4 @@
1
1
  Manifest
2
- easy_navigation.gemspec
3
2
  generators/easy_navigation/templates/stylesheets/sass/easy_navigation.sass
4
3
  generators/easy_navigation/templates/javascripts/easy_navigation.js
5
4
  generators/easy_navigation/templates/images/arrow.png
data/README.rdoc CHANGED
@@ -1,11 +1,11 @@
1
1
  = Easy Navigation
2
2
 
3
- Rails gem/plugin for generating a tabbed navigation for Rails.
3
+ Full stack Rails gem/plugin for drop down/tabbed navigation.
4
4
 
5
5
  == Requirements
6
6
 
7
- This gem/plugin is intented to be used with Rails 2.2 as it uses i18n,
8
- also you'll need to install Haml as it uses Sass for CSS.
7
+ * Rails 2.3.2
8
+ * jQuery 1.5 (using jRails)
9
9
 
10
10
  == Install
11
11
 
@@ -30,7 +30,12 @@ And you're done!
30
30
 
31
31
  == Usage
32
32
 
33
- Once installed simply create config/initializers/easy_navigation.rb file like
33
+ After installation run the generator to place default stylesheet and javscript
34
+ code (jQuery):
35
+
36
+ script/generate easy_navigation
37
+
38
+ To create your menus create config/initializers/easy_navigation.rb file like
34
39
  this:
35
40
 
36
41
  EasyNavigation::Builder.config do |map|
@@ -113,16 +118,21 @@ simply override the following methods (from EasyNavigation::Helper):
113
118
 
114
119
  ====Tabs
115
120
 
121
+ def render_empty_tab(id, text, url, class_name)
122
+ content_tag("li", link_to(text, url, :class => 'tab_link'),
123
+ :id => id, :class => class_name)
124
+ end
125
+
116
126
  def render_tab(id, text, url, menus_html, class_name)
117
- content_tag("li",
118
- "#{link_to(t(text), url)} #{content_tag("ul", menus_html)}",
127
+ content_tag(:li, "#{link_to(text, url, :class => 'tab_link')} #{content_tag(:ul, menus_html, :id => "#{id}_menus", :style => "display:none;")}",
119
128
  :id => id, :class => class_name)
120
129
  end
121
130
 
122
131
  ====Menus
123
132
 
124
133
  def render_menu(id, text, url, class_name)
125
- content_tag("li", link_to(t(text), url), :id => id, :class => class_name)
134
+ content_tag("li", link_to(text, url, :class => "menu_link"),
135
+ :id => id, :class => class_name)
126
136
  end
127
137
 
128
138
  ====Separators
@@ -131,9 +141,6 @@ simply override the following methods (from EasyNavigation::Helper):
131
141
  content_tag("li", "|", :class => class_name)
132
142
  end
133
143
 
134
-
135
- Pretty easy... right?
136
-
137
144
  == License
138
145
 
139
146
  Copyright (c) 2008 Innetra Consultancy Services, S.C.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('easy_navigation', '3.0.0') do |e|
5
+ Echoe.new('easy_navigation', '3.1') do |e|
6
6
  e.description = "Easy navigation for Ruby on Rails 2.2 (i18n)"
7
7
  e.url = "http://github.com/innetra/easy_navigation"
8
8
  e.author = "Ivan Torres"
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{easy_navigation}
5
- s.version = "3.0.0"
5
+ s.version = "3.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ivan Torres"]
9
- s.date = %q{2009-05-12}
9
+ s.date = %q{2009-05-14}
10
10
  s.description = %q{Easy navigation for Ruby on Rails 2.2 (i18n)}
11
11
  s.email = %q{mexpolk@gmail.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/easy_navigation.rb"]
13
- s.files = ["Manifest", "easy_navigation.gemspec", "generators/easy_navigation/templates/stylesheets/sass/easy_navigation.sass", "generators/easy_navigation/templates/javascripts/easy_navigation.js", "generators/easy_navigation/templates/images/arrow.png", "generators/easy_navigation/templates/images/arrow.svg", "generators/easy_navigation/easy_navigation_generator.rb", "README.rdoc", "Rakefile", "init.rb", "lib/easy_navigation.rb"]
13
+ s.files = ["Manifest", "generators/easy_navigation/templates/stylesheets/sass/easy_navigation.sass", "generators/easy_navigation/templates/javascripts/easy_navigation.js", "generators/easy_navigation/templates/images/arrow.png", "generators/easy_navigation/templates/images/arrow.svg", "generators/easy_navigation/easy_navigation_generator.rb", "README.rdoc", "Rakefile", "init.rb", "lib/easy_navigation.rb", "easy_navigation.gemspec"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{http://github.com/innetra/easy_navigation}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Easy_navigation", "--main", "README.rdoc"]
@@ -6,11 +6,11 @@ class EasyNavigationGenerator < Rails::Generator::Base
6
6
 
7
7
  # CSS rules for EasyNavigation
8
8
  m.directory("public/stylesheets/sass")
9
- m.template "stylesheets/sass/easy_navigation.sass", "public/stylesheets/sass/easy_navigation.sass"
9
+ m.file "stylesheets/sass/easy_navigation.sass", "public/stylesheets/sass/easy_navigation.sass"
10
10
 
11
11
  # Javascript for horizontal dropdown menu's
12
12
  m.directory("public/javascripts")
13
- m.template "javascripts/easy_navigation.js", "public/javascripts/easy_navigation.js"
13
+ m.file "javascripts/easy_navigation.js", "public/javascripts/easy_navigation.js"
14
14
 
15
15
  m.directory("public/images/easy_navigation")
16
16
  m.file "images/arrow.png", "public/images/arrow.png"
@@ -75,7 +75,8 @@ module EasyNavigation
75
75
  end
76
76
 
77
77
  def render_empty_tab(id, text, url, class_name)
78
- content_tag("li", link_to(text, url, :class => 'tab_link'), :id => id, :class => class_name)
78
+ content_tag("li", link_to(text, url, :class => 'tab_link'),
79
+ :id => id, :class => class_name)
79
80
  end
80
81
 
81
82
  def render_navigation(id, tabs_html, class_name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: innetra-easy_navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: "3.1"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Torres
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-12 00:00:00 -07:00
12
+ date: 2009-05-14 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -24,7 +24,6 @@ extra_rdoc_files:
24
24
  - lib/easy_navigation.rb
25
25
  files:
26
26
  - Manifest
27
- - easy_navigation.gemspec
28
27
  - generators/easy_navigation/templates/stylesheets/sass/easy_navigation.sass
29
28
  - generators/easy_navigation/templates/javascripts/easy_navigation.js
30
29
  - generators/easy_navigation/templates/images/arrow.png
@@ -34,6 +33,7 @@ files:
34
33
  - Rakefile
35
34
  - init.rb
36
35
  - lib/easy_navigation.rb
36
+ - easy_navigation.gemspec
37
37
  has_rdoc: true
38
38
  homepage: http://github.com/innetra/easy_navigation
39
39
  post_install_message: