• R/O
  • SSH
  • HTTPS

tenarai: 提交


Commit MetaInfo

修訂124 (tree)
時間2008-10-28 21:33:43
作者junkikuchi

Log Message

updated.

Change Summary

差異

--- trunk/webapp/Widget/YUI/Layout.rb (revision 123)
+++ trunk/webapp/Widget/YUI/Layout.rb (revision 124)
@@ -67,6 +67,12 @@
6767 css '.yui-layout-unit .yui-resize-handle-b .yui-layout-resize-knob'
6868 css '.yui-layout-unit .yui-resize-handle-l .yui-layout-resize-knob'
6969
70+ def init(builder, service, *param)
71+ super
72+ resource.modules << 'layout'
73+ resource.modules << 'resize'
74+ end
75+
7076 def render_css(_css)
7177 css.each do |val|
7278 a = val.name.split('_')
@@ -95,8 +101,8 @@
95101 'left',
96102 'center'
97103 ].inject([]) do |ret, pos|
98- if body = property["#{pos}_body".intern]
99- unit = {'position' => "'#{pos}'", 'body' => body}
104+ if _body = property["#{pos}_body".intern]
105+ unit = {'position' => "'#{pos}'", 'body' => _body}
100106
101107 [
102108 'header',
@@ -122,21 +128,15 @@
122128 ret
123129 end.join(', ')
124130
125- head.tag('script', 'type' => 'text/javascript').code <<-END
126-new YAHOO.util.YUILoader({
127- require: ['layout', 'resize'],
128- skin: { defaultSkin: 'sam' },
129- onSuccess: function() {
130- var Dom = YAHOO.util.Dom;
131- var Event = YAHOO.util.Event;
131+ body.code <<-END
132+var Dom = YAHOO.util.Dom;
133+var Event = YAHOO.util.Event;
132134
133- Event.onDOMReady(function() {
134- new YAHOO.widget.Layout({
135- units: [#{units}]
136- }).render();
137- });
138- }
139-}).insert();
135+Event.onDOMReady(function() {
136+ new YAHOO.widget.Layout({
137+ units: [#{units}]
138+ }).render();
139+});
140140 END
141141 end
142142 end
--- trunk/webapp/Widget/YUI/ResetCSS.rb (revision 123)
+++ trunk/webapp/Widget/YUI/ResetCSS.rb (revision 124)
@@ -9,12 +9,9 @@
99 class ResetCSS < ::Widget
1010 extend Tenarai::ClassLoader
1111
12- def render_html(head, body)
13- head.tag('script', 'type' => 'text/javascript').code <<-END
14-new YAHOO.util.YUILoader({
15- require: ['reset-fonts-grids']
16-}).insert();
17- END
12+ def init(builder, service, *param)
13+ super
14+ resource.modules << 'reset-fonts-grids'
1815 end
1916 end
2017 end
Show on old repository browser