yui-on-rails 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/generators/templates/yui_on_rails.js +24 -0
- data/generators/yui_on_rails_generator.rb +16 -0
- data/lib/yui-on-rails/prototype_helper.rb +3 -3
- data/yui-on-rails.gemspec +3 -1
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
@@ -0,0 +1,24 @@
|
|
1
|
+
function yui_default_complete(){
|
2
|
+
|
3
|
+
}
|
4
|
+
function yui_default_failure(){
|
5
|
+
|
6
|
+
}
|
7
|
+
function yui_default_interactive(){
|
8
|
+
|
9
|
+
}
|
10
|
+
function yui_default_loaded(){
|
11
|
+
|
12
|
+
}
|
13
|
+
function yui_default_loading(){
|
14
|
+
|
15
|
+
}
|
16
|
+
function yui_default_success(){
|
17
|
+
|
18
|
+
}
|
19
|
+
function yui_default_before(){
|
20
|
+
|
21
|
+
}
|
22
|
+
function yui_default_after(){
|
23
|
+
|
24
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class YuiOnRailsGenerator < Rails::Generator::Base
|
2
|
+
|
3
|
+
def initialize(*runtime_args)
|
4
|
+
super
|
5
|
+
end
|
6
|
+
def manifest
|
7
|
+
record do |m|
|
8
|
+
m.directory File.join('public','javascripts')
|
9
|
+
m.template 'yui_on_rails.js', File.join('public','javascripts','yui_on_rails.js')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
protected
|
13
|
+
def banner
|
14
|
+
%{Usage: #{$0} #{spec.name}\nCopies yui_on_rails.css to public/javascripts/}
|
15
|
+
end
|
16
|
+
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
module ActionView
|
2
2
|
module Helpers
|
3
3
|
module PrototypeHelper
|
4
|
-
def
|
4
|
+
def link_to_remote(name, options = {}, html_options = nil)
|
5
5
|
#myopts = {}
|
6
|
-
[:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
|
6
|
+
[:before,:after,:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
|
7
7
|
options.merge!({symb=>"yui_default_#{symb.to_s}()"}) unless options.keys.include?(symb)
|
8
8
|
end
|
9
9
|
#options.merge!({:before=>"default_before()",:complete=>"alert('completed')"})
|
10
10
|
link_to_function(name, remote_function(options), html_options || options.delete(:html))
|
11
11
|
end
|
12
12
|
def form_remote_tag(options = {}, &block)
|
13
|
-
[:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
|
13
|
+
[:before,:after,:loading, :loaded, :interactive,:success,:failure,:complete].each do |symb|
|
14
14
|
options.merge!({symb=>"yui_default_#{symb.to_s}()"}) unless options.keys.include?(symb)
|
15
15
|
end
|
16
16
|
options[:form] = true
|
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.
|
8
|
+
s.version = "0.1.11"
|
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"]
|
@@ -23,6 +23,8 @@ Gem::Specification.new do |s|
|
|
23
23
|
"README.rdoc",
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
|
+
"generators/templates/yui_on_rails.js",
|
27
|
+
"generators/yui_on_rails_generator.rb",
|
26
28
|
"lib/yui-on-rails.rb",
|
27
29
|
"lib/yui-on-rails/prototype_helper.rb",
|
28
30
|
"lib/yui-on-rails/tabs.rb",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 11
|
9
|
+
version: 0.1.11
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- jeff durand
|
@@ -45,6 +45,8 @@ files:
|
|
45
45
|
- README.rdoc
|
46
46
|
- Rakefile
|
47
47
|
- VERSION
|
48
|
+
- generators/templates/yui_on_rails.js
|
49
|
+
- generators/yui_on_rails_generator.rb
|
48
50
|
- lib/yui-on-rails.rb
|
49
51
|
- lib/yui-on-rails/prototype_helper.rb
|
50
52
|
- lib/yui-on-rails/tabs.rb
|