yui-on-rails 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.9
1
+ 0.1.10
@@ -1,13 +1,26 @@
1
1
  module ActionView
2
2
  module Helpers
3
3
  module PrototypeHelper
4
- #alias :original_link_to_remote :link_to_remote
5
-
6
4
  def link_to_remote_with_yui(name, options = {}, html_options = nil)
7
- options.merge!(:before=>"alert('blah blah')")
8
- link_to_remote_without_yui(name, options, html_options)
5
+ #myopts = {}
6
+ [:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
7
+ options.merge!({symb=>"yui_default_#{symb.to_s}()"}) unless options.keys.include?(symb)
8
+ end
9
+ #options.merge!({:before=>"default_before()",:complete=>"alert('completed')"})
10
+ link_to_function(name, remote_function(options), html_options || options.delete(:html))
11
+ end
12
+ def form_remote_tag(options = {}, &block)
13
+ [:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
14
+ options.merge!({symb=>"yui_default_#{symb.to_s}()"}) unless options.keys.include?(symb)
15
+ end
16
+ options[:form] = true
17
+ options[:html] ||= {}
18
+ options[:html][:onsubmit] =
19
+ (options[:html][:onsubmit] ? options[:html][:onsubmit] + "; " : "") +
20
+ "#{remote_function(options)}; return false;"
21
+
22
+ form_tag(options[:html].delete(:action) || url_for(options[:url]), options[:html], &block)
9
23
  end
10
- alias_method_chain :link_to_remote, :yui
11
24
  end
12
25
  end
13
26
  end
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.9"
8
+ s.version = "0.1.10"
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"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 9
9
- version: 0.1.9
8
+ - 10
9
+ version: 0.1.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - jeff durand