midas-guilded 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +0 -1
- data/lib/guilded.rb +3 -1
- data/lib/guilded/guilder.rb +5 -2
- data/lib/guilded/rails/view_helpers.rb +2 -0
- metadata +1 -2
- data/init.rb +0 -3
data/Manifest.txt
CHANGED
data/lib/guilded.rb
CHANGED
data/lib/guilded/guilder.rb
CHANGED
@@ -68,6 +68,7 @@ module Guilded
|
|
68
68
|
@combined_css_srcs.each { |css| to_init << "<link href=\"/stylesheets/#{css}\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />" }
|
69
69
|
@combined_js_srcs.each { |js| to_init << "<script type=\"text/javascript\" src=\"/javascripts/#{js}\"></script>" }
|
70
70
|
to_init << generate_javascript_init
|
71
|
+
reset!
|
71
72
|
end
|
72
73
|
|
73
74
|
# Writes an initialization method that calls each Guilded components initialization method. This
|
@@ -77,9 +78,9 @@ module Guilded
|
|
77
78
|
code = "<script type=\"text/javascript\">"
|
78
79
|
code << "var initGuildedElements = function(){"
|
79
80
|
@g_elements.each_value do |guilded_def|
|
80
|
-
|
81
|
+
code << "g.#{guilded_def.kind.to_s.camelize( :lower )}Init( #{guilded_def.options.to_json} );" unless guilded_def.exclude_js?
|
81
82
|
end
|
82
|
-
|
83
|
+
code << "};jQuery('document').ready( initGuildedElements );</script>"
|
83
84
|
end
|
84
85
|
|
85
86
|
def js_cache_name
|
@@ -202,6 +203,8 @@ module Guilded
|
|
202
203
|
possibles.each do |full_path, part_path|
|
203
204
|
return part_path if File.exists?( full_path )
|
204
205
|
end
|
206
|
+
|
207
|
+
"#{part}.#{ext}"
|
205
208
|
end
|
206
209
|
|
207
210
|
def combine_css_sources( component, skin, styles=[] ) #:doc:
|
@@ -15,6 +15,8 @@ module Guilded
|
|
15
15
|
html = stylesheet_link_tag( g.combined_css_srcs, :cache => "cache/#{g.css_cache_name}" )
|
16
16
|
html << javascript_include_tag( g.combined_js_srcs, :cache => "cache/#{g.js_cache_name}" )
|
17
17
|
html << g.generate_javascript_init
|
18
|
+
g.reset!
|
19
|
+
html
|
18
20
|
end
|
19
21
|
|
20
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midas-guilded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- midas
|
@@ -50,7 +50,6 @@ files:
|
|
50
50
|
- PostInstall.txt
|
51
51
|
- README.rdoc
|
52
52
|
- Rakefile
|
53
|
-
- init.rb
|
54
53
|
- lib/guilded.rb
|
55
54
|
- lib/guilded/base.rb
|
56
55
|
- lib/guilded/component_def.rb
|
data/init.rb
DELETED