innetra-easy_navigation 2.1.2 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('easy_navigation', '2.1.2') do |e|
5
+ Echoe.new('easy_navigation', '3.0.0') 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,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{easy_navigation}
5
- s.version = "2.1.2"
5
+ s.version = "3.0.0"
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-02}
9
+ s.date = %q{2009-05-12}
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"]
@@ -1,37 +1,6 @@
1
- var EasyNavigation = Class.create();
2
- EasyNavigation.prototype = {
3
-
4
- timeout: null,
5
- menu: null,
6
-
7
- initialize: function(navigation) {
8
- $(navigation).select('li.tab.drop, li.tab div').each(
9
- function(node) {
10
- Event.observe(node, 'mouseover', this.displayMenu.bind(this));
11
- Event.observe(node, 'mouseout', this.hideMenu.bind(this));
12
- }.bind(this)
13
- );
14
- },
15
-
16
- displayMenu: function(event) {
17
- clearTimeout(this.timeout);
18
- this.menu = $(Event.element(event)).up('.tab div') ||
19
- $(Event.element(event)).down('.tab div') ||
20
- $(Event.element(event)).next('.tab div');
21
- if (this.menu.style.display == 'none')
22
- this.toggleMenu(this.menu);
23
- },
24
-
25
- hideMenu: function(event) {
26
- if (this.menu.style.display == 'none') {
27
- clearTimeout(this.timeout);
28
- } else {
29
- this.timeout = window.setTimeout(this.toggleMenu.bind(this, this.menu), 1000);
30
- }
31
- },
32
-
33
- toggleMenu: function(element) {
34
- Effect.toggle($(element), 'slide', {duration: 0.3});
35
- }
36
-
37
- }
1
+ // EasyNavigation requires jQuery
2
+ $(document).ready(function(){
3
+ $('li.tab.drop').hover(
4
+ function() { $('ul', this).css('display', 'block'); },
5
+ function() { $('ul', this).css('display', 'none'); });
6
+ });
@@ -44,8 +44,8 @@
44
44
  color = !tab_text_color
45
45
  background-color = !tab_bg_color
46
46
 
47
- div
48
- background-color: !tab_bg_color
47
+ ul
48
+ background-color = !tab_bg_color
49
49
  left: auto
50
50
  min-width: 150px
51
51
  padding: 0
@@ -70,8 +70,7 @@ module EasyNavigation
70
70
  end
71
71
 
72
72
  def render_tab(id, text, url, menus_html, class_name)
73
- content_tag(:li,"#{link_to(text, url, :class => 'tab_link')} #{content_tag(:div,
74
- content_tag(:ul, menus_html), :id => "#{id}_menus", :style => "display:none;")}",
73
+ content_tag(:li, "#{link_to(text, url, :class => 'tab_link')} #{content_tag(:ul, menus_html, :id => "#{id}_menus", :style => "display:none;")}",
75
74
  :id => id, :class => class_name)
76
75
  end
77
76
 
@@ -80,7 +79,6 @@ module EasyNavigation
80
79
  end
81
80
 
82
81
  def render_navigation(id, tabs_html, class_name)
83
- tabs_html << javascript_tag("var navigation = new EasyNavigation('#{id}');")
84
82
  content_tag("ul", tabs_html, :id => id, :class => class_name)
85
83
  end
86
84
 
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: 2.1.2
4
+ version: 3.0.0
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-02 00:00:00 -07:00
12
+ date: 2009-05-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15