yui-on-rails 0.1.6 → 0.1.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
data/lib/yui-on-rails.rb CHANGED
@@ -1 +1,2 @@
1
- require File.join(File.dirname(__FILE__), *%w[yui-on-rails tabs])
1
+ require File.join(File.dirname(__FILE__), *%w[yui-on-rails tabs])
2
+ require File.join(File.dirname(__FILE__), *%w[yui-on-rails prototype_helper])
@@ -0,0 +1,11 @@
1
+ module YuiOnRails
2
+ module PrototypeHelper
3
+ alias :original_link_to_remote :link_to_remote
4
+
5
+ def link_to_remote(name, options = {}, html_options = nil)
6
+ options.merge!(:before=>"alert('blah blah')")
7
+ original_link_to_remote name, options, html_options
8
+ end
9
+
10
+ end
11
+ end
@@ -47,39 +47,5 @@ module YuiOnRails
47
47
  @template.send( *args, &block )
48
48
  end
49
49
  end
50
-
51
-
52
- #@@tab_content = []
53
- #@@tab_titles = []
54
-
55
- #def yui_tabs(id,&block)
56
- # raise ArgumentError, "Missing block" unless block_given?
57
- # capture(&block)
58
- # concat(content_tag(:div, :class=>"yui-navset tabber", :id=>id) do
59
- # content_tag(:ul, yui_get_links, :class=>"yui-nav")+content_tag(:div,yui_get_content,:class=>"yui-content")
60
- # end,block.binding)
61
- # @@tab_content = []
62
- # @@tab_titles = []
63
- #end
64
- #def yui_get_links
65
- # links = ""
66
- # @@tab_titles.each_with_index do |title,index|
67
- # links += content_tag(:li,link_to(content_tag(:em, title), "#tab#{index}"),:class=>"#{index==0 ? "selected" : ""}")
68
- # end
69
- # return links
70
- #end
71
- #def yui_get_content
72
- # content = ""
73
- # @@tab_content.each_with_index do |cont, index|
74
- # content += content_tag(:div, cont.to_s, :id=>"tab#{index}")
75
- # end
76
- # return content
77
- #end
78
- #def yui_tab(title, &block)
79
- # raise ArgumentError, "Missing block" if title.blank?
80
- # raise ArgumentError, "Missing block" unless block_given?
81
- # @@tab_content << capture(&block)
82
- # @@tab_titles << title
83
- #end
84
50
  end
85
51
  end
data/rails/init.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require File.join(File.dirname(__FILE__), *%w[.. lib yui-on-rails])
2
- ActionView::Base.send :include, YuiOnRails::Tabs
2
+ ActionView::Base.send :include, YuiOnRails::Tabs
3
+ ActionView::Helpers::PrototypeHelper.send :include, YuiOnRails::PrototypeHelper
data/yui-on-rails.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yui-on-rails}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jeff durand"]
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "Rakefile",
25
25
  "VERSION",
26
26
  "lib/yui-on-rails.rb",
27
+ "lib/yui-on-rails/prototype_helper.rb",
27
28
  "lib/yui-on-rails/tabs.rb",
28
29
  "rails/init.rb",
29
30
  "test/helper.rb",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - jeff durand
@@ -46,6 +46,7 @@ files:
46
46
  - Rakefile
47
47
  - VERSION
48
48
  - lib/yui-on-rails.rb
49
+ - lib/yui-on-rails/prototype_helper.rb
49
50
  - lib/yui-on-rails/tabs.rb
50
51
  - rails/init.rb
51
52
  - test/helper.rb